Changeset 349
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r348 r349 1755 1755 1756 1756 print <<'END_HTML'; 1757 <table class="sortable" summary="Klask Host Database">1757 <table class="sortable"> 1758 1758 <caption>Klask Host Database</caption> 1759 1759 <thead> … … 1769 1769 </tr> 1770 1770 </thead> 1771 <tfoot>1772 <tr>1773 <th scope="col" class="klask-footer-left">Switch</th>1774 <th scope="col" class="fklask-port">Port</th>1775 <th scope="col" class="fklask-link">Link</th>1776 <th scope="col" class="fklask-hostname">Hostname-FQ</th>1777 <th scope="col" class="fklask-ipv4">IPv4-Address</th>1778 <th scope="col" class="fklask-mac">MAC-Address</th>1779 <th scope="col" class="fklask-vlan">VLAN</th>1780 <th scope="col" class="klask-footer-right">Date</th>1781 </tr>1782 </tfoot>1783 1771 <tbody> 1784 1772 END_HTML … … 2031 2019 print <<'END_HTML'; 2032 2020 </tbody> 2021 <tfoot> 2022 <tr> 2023 <th scope="col" class="klask-footer-left">Switch</th> 2024 <th scope="col" class="fklask-port">Port</th> 2025 <th scope="col" class="fklask-link">Link</th> 2026 <th scope="col" class="fklask-hostname">Hostname-FQ</th> 2027 <th scope="col" class="fklask-ipv4">IPv4-Address</th> 2028 <th scope="col" class="fklask-mac">MAC-Address</th> 2029 <th scope="col" class="fklask-vlan">VLAN</th> 2030 <th scope="col" class="klask-footer-right">Date</th> 2031 </tr> 2032 </tfoot> 2033 2033 </table> 2034 2034 END_HTML … … 2201 2201 2202 2202 print <<'END_HTML'; 2203 <table class="sortable" summary="Klask Bad VLAN ID Database">2204 <caption>Klask Bad VLAN IDDatabase</caption>2203 <table class="sortable"> 2204 <caption>Klask VLAN ID Mismatch Database</caption> 2205 2205 <thead> 2206 2206 <tr> … … 2215 2215 </tr> 2216 2216 </thead> 2217 <tbody> 2218 END_HTML 2219 2220 my $typerow = 'even'; 2221 2222 for my $item (@result) { 2223 2224 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 2225 2226 my $switch_hostname_sort = format_switchport4sort($item->{'switch'}, $item->{'port_hr'}); 2227 my ( $host_short ) = split m/ \. /xms, $item->{'hostname_fq'}; 2228 2229 my $vlan_nameid = $item->{'vlan_good'} . ' (' . $item->{'vlan_id'} . ')'; 2230 2231 fqdn_html_breakable(my $hostname_fq_html = $item->{'hostname_fq'}); 2232 2233 print <<"END_HTML"; 2234 <tr class="$typerow"> 2235 <td sorttable_customkey="$switch_hostname_sort">$item->{'switch'}</td> 2236 <td class="bklask-port">$item->{'port_hr'}</td> 2237 <td>!$item->{'vlan_bad'}</td> 2238 <td>$vlan_nameid</td> 2239 <td>$item->{'date_last'}</td> 2240 <td>$item->{'date_good'}</td> 2241 <td>$item->{'mac_address'}</td> 2242 <td sorttable_customkey="$host_short">$hostname_fq_html</td> 2243 </tr> 2244 END_HTML 2245 } 2246 print <<'END_HTML'; 2247 </tbody> 2217 2248 <tfoot> 2218 2249 <tr> … … 2227 2258 </tr> 2228 2259 </tfoot> 2229 <tbody>2230 END_HTML2231 2232 my $typerow = 'even';2233 2234 for my $item (@result) {2235 2236 $typerow = $typerow eq 'even' ? 'odd' : 'even';2237 2238 my $switch_hostname_sort = format_switchport4sort($item->{'switch'}, $item->{'port_hr'});2239 my ( $host_short ) = split m/ \. /xms, $item->{'hostname_fq'};2240 2241 my $vlan_nameid = $item->{'vlan_good'} . ' (' . $item->{'vlan_id'} . ')';2242 2243 fqdn_html_breakable(my $hostname_fq_html = $item->{'hostname_fq'});2244 2245 print <<"END_HTML";2246 <tr class="$typerow">2247 <td sorttable_customkey="$switch_hostname_sort">$item->{'switch'}</td>2248 <td class="bklask-port">$item->{'port_hr'}</td>2249 <td>!$item->{'vlan_bad'}</td>2250 <td>$vlan_nameid</td>2251 <td>$item->{'date_last'}</td>2252 <td>$item->{'date_good'}</td>2253 <td>$item->{'mac_address'}</td>2254 <td sorttable_customkey="$host_short">$hostname_fq_html</td>2255 </tr>2256 END_HTML2257 }2258 print <<'END_HTML';2259 </tbody>2260 2260 </table> 2261 2261 END_HTML … … 2758 2758 2759 2759 print <<'END_HTML'; 2760 <table class="sortable" summary="Klask Free IP Database">2760 <table class="sortable"> 2761 2761 <caption>Klask Free IP Database</caption> 2762 2762 <thead> … … 2768 2768 </tr> 2769 2769 </thead> 2770 <tbody> 2771 END_HTML 2772 2773 my $typerow = 'even'; 2774 2775 LOOP_ON_IP_ADDRESS: 2776 for my $ip (Net::Netmask::sort_by_ip_address(keys %result_ip)) { 2777 2778 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 2779 2780 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ip; 2781 my ( $host_short ) = split m/ \. /xms, $result_ip{$ip}->{'hostname_fq'}; 2782 2783 my $vlan_nameid = $result_ip{$ip}->{'vlan'}.' ('.get_current_vlan_id($result_ip{$ip}->{'vlan'}).')'; 2784 2785 fqdn_html_breakable(my $hostname_fq_html = $result_ip{$ip}->{'hostname_fq'}); 2786 2787 print <<"END_HTML"; 2788 <tr class="$typerow"> 2789 <td sorttable_customkey="$ip_sort">$ip</td> 2790 <td sorttable_customkey="$host_short">$hostname_fq_html</td> 2791 <td>$vlan_nameid</td> 2792 <td>$result_ip{$ip}->{'date_last_detection'}</td> 2793 </tr> 2794 END_HTML 2795 } 2796 print <<'END_HTML'; 2797 </tbody> 2770 2798 <tfoot> 2771 2799 <tr> … … 2776 2804 </tr> 2777 2805 </tfoot> 2778 <tbody>2779 END_HTML2780 2781 my $typerow = 'even';2782 2783 LOOP_ON_IP_ADDRESS:2784 for my $ip (Net::Netmask::sort_by_ip_address(keys %result_ip)) {2785 2786 $typerow = $typerow eq 'even' ? 'odd' : 'even';2787 2788 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ip;2789 my ( $host_short ) = split m/ \. /xms, $result_ip{$ip}->{'hostname_fq'};2790 2791 my $vlan_nameid = $result_ip{$ip}->{'vlan'}.' ('.get_current_vlan_id($result_ip{$ip}->{'vlan'}).')';2792 2793 fqdn_html_breakable(my $hostname_fq_html = $result_ip{$ip}->{'hostname_fq'});2794 2795 print <<"END_HTML";2796 <tr class="$typerow">2797 <td sorttable_customkey="$ip_sort">$ip</td>2798 <td sorttable_customkey="$host_short">$hostname_fq_html</td>2799 <td>$vlan_nameid</td>2800 <td>$result_ip{$ip}->{'date_last_detection'}</td>2801 </tr>2802 END_HTML2803 }2804 print <<'END_HTML';2805 </tbody>2806 2806 </table> 2807 2807 END_HTML -
trunk/push-web
r344 r349 50 50 51 51 cat <<END > ${TMP}/index.html 52 <!DOCTYPE html> 52 53 <html> 53 54 <head> 54 55 <link rel="stylesheet" type="text/css" href="style-klask.css" /> 55 56 <meta http-equiv="refresh" content="1800"> 57 <title>Klask mapping net-tools</title> 56 58 <noscript> 57 59 </noscript>
Note: See TracChangeset
for help on using the changeset viewer.