Changeset 317 for trunk/klask
- Timestamp:
- Oct 31, 2017, 9:55:08 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r314 r317 496 496 my $port_hr = shift; 497 497 $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ - /; # First occurence 498 $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence498 $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence 499 499 return $port_hr; 500 } 501 502 #--------------------------------------------------------------- 503 # fqdn_html_breakable change it's parameter, use it like chomp perl function 504 505 sub fqdn_html_breakable { 506 my $ref_fqdn = \($_[0]); 507 508 # Add HTML <wbr> before every . to permit line break 509 $$ref_fqdn =~ s{\.}{<wbr />.}g; 500 510 } 501 511 … … 1779 1789 my $parent_port_hr = format_aggregator4html($computerdb->{$ip}{'switch_port_hr'}); 1780 1790 1791 fqdn_html_breakable($switch_hostname); 1792 fqdn_html_breakable(my $hostname_fq_html = $computerdb->{$ip}{'hostname_fq'}); 1793 1781 1794 print <<"END_HTML"; 1782 1795 <tr class="$typerow"> … … 1784 1797 <td class="bklask-port">$parent_port_hr</td> 1785 1798 <td class="bklask-arrow">$arrow</td> 1786 <td sorttable_customkey="$host_short">$ computerdb->{$ip}{'hostname_fq'}</td>1799 <td sorttable_customkey="$host_short">$hostname_fq_html</td> 1787 1800 <td sorttable_customkey="$ip_sort">$ip</td> 1788 1801 <td sorttable_customkey="$mac_sort">$computerdb->{$ip}{'mac_address'}</td> … … 1791 1804 </tr> 1792 1805 END_HTML 1793 # <td colspan="2">$arrow</td>1794 1806 } 1795 1807 … … 1839 1851 my $parent_port_hr = format_aggregator4html($db_switch_output_port{$sw}); 1840 1852 my $child_port_hr = format_aggregator4html($db_switch_parent{$sw}->{'port_hr'}); 1853 1854 fqdn_html_breakable($sw); 1855 fqdn_html_breakable(my $sw_child_html = $db_switch_parent{$sw}->{'switch'}); 1841 1856 1842 1857 print <<"END_HTML"; … … 1845 1860 <td class="bklask-port">$parent_port_hr</td> 1846 1861 <td class="bklask-arrow">$arrow $child_port_hr</td> 1847 <td sorttable_customkey="$host_short">$ db_switch_parent{$sw}->{'switch'}</td>1862 <td sorttable_customkey="$host_short">$sw_child_html</td> 1848 1863 <td sorttable_customkey="$ip_sort">$ipv4_address</td> 1849 1864 <td sorttable_customkey="$mac_sort">$mac_address</td> … … 1877 1892 my $arrow ='⟻'; 1878 1893 $arrow ='⟽' if $db_switch_output_port{$sw} =~ m/^(Trk|Br|Po)/; 1894 1895 fqdn_html_breakable($sw); 1879 1896 1880 1897 print <<"END_HTML"; … … 1890 1907 </tr> 1891 1908 END_HTML 1892 #<td>$arrow</td><td>$parent_port_hr</td>1893 1894 1909 next LOOP_ON_OUTPUT_SWITCH; 1895 1896 # Old print1897 print <<"END_HTML";1898 <tr class="$typerow">1899 <td sorttable_customkey="$switch_hostname_sort">$sw</td>1900 <td class="bklask-port">$parent_port_hr</td>1901 <td class="bklask-arrow">$arrow</td><td></td>1902 <td sorttable_customkey="router">router</td>1903 <td sorttable_customkey="999999999999"></td>1904 <td sorttable_customkey="99999"></td>1905 <td></td>1906 <td></td>1907 </tr>1908 END_HTML1909 1910 } 1910 1911 } … … 1946 1947 my $parent_port_hr = format_aggregator4html($port_connect); 1947 1948 my $child_port_hr = format_aggregator4html($db_switch_output_port{$sw}); 1949 1950 fqdn_html_breakable($sw); 1951 fqdn_html_breakable($sw_connect); 1948 1952 1949 1953 print <<"END_HTML"; … … 1962 1966 else { 1963 1967 my $parent_port_hr = format_aggregator4html($port_connect); 1968 1969 fqdn_html_breakable($sw); 1970 fqdn_html_breakable($sw_connect); 1964 1971 1965 1972 print <<"END_HTML";
Note: See TracChangeset
for help on using the changeset viewer.