Changeset 320
- Timestamp:
- Oct 31, 2017, 10:46:28 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r319 r320 1669 1669 my $computerdb = computerdb_load(); 1670 1670 1671 printf "%-28s %8s %-40s %-15s %-18s %-16s %s\n", qw(Switch Port Hostname-FQ IPv4-Address MAC-Address Date VLAN); 1672 print "--------------------------------------------------------------------------------------------------------------------------------------------\n"; 1671 #printf "%-28s %8s %-40s %-15s %-18s %-16s %s\n", qw(Switch Port Hostname-FQ IPv4-Address MAC-Address Date VLAN); 1672 #print "--------------------------------------------------------------------------------------------------------------------------------------------\n"; 1673 my $tb_computer = Text::Table->new( 1674 {align => 'left', align_title => 'left', title => 'Switch'}, 1675 {align => 'right', align_title => 'right', title => 'Port'}, 1676 {align => 'center', align_title => 'center', title => 'Link'}, 1677 {align => 'left', align_title => 'left', title => 'Hostname-FQ'}, 1678 {align => 'left', align_title => 'left', title => 'IPv4-Address'}, 1679 {align => 'left', align_title => 'left', title => 'MAC-Address'}, 1680 {align => 'left', align_title => 'left', title => 'Date'}, 1681 {align => 'left', align_title => 'left', title => 'VLAN'}, 1682 ); 1673 1683 1674 1684 LOOP_ON_IP_ADDRESS: … … 1686 1696 $vlan = $computerdb->{$ip}{'network'}.'('.get_current_vlan_id($computerdb->{$ip}{'network'}).')' if $computerdb->{$ip}{'network'}; 1687 1697 1688 my $arrow ='<--- --------';1689 $arrow ='<=== ========' if $computerdb->{$ip}{'switch_port_hr'} =~ m/^(Trk|Br|Po)/;1690 1691 printf "%-28s %8s %12s %-40s %-15s %-18s %-16s %s\n",1698 my $arrow ='<---'; 1699 $arrow ='<===' if $computerdb->{$ip}{'switch_port_hr'} =~ m/^(Trk|Br|Po)/; 1700 1701 $tb_computer->add( 1692 1702 $computerdb->{$ip}{'switch_hostname'} || $computerdb->{$ip}{'switch_description'}, 1693 1703 $computerdb->{$ip}{'switch_port_hr'}, … … 1697 1707 $computerdb->{$ip}{'mac_address'}, 1698 1708 $date, 1699 $vlan; 1700 } 1709 $vlan, 1710 ); 1711 # printf "%-28s %8s %12s %-40s %-15s %-18s %-16s %s\n", 1712 # $computerdb->{$ip}{'switch_hostname'} || $computerdb->{$ip}{'switch_description'}, 1713 # $computerdb->{$ip}{'switch_port_hr'}, 1714 # $arrow, 1715 # $computerdb->{$ip}{'hostname_fq'}, 1716 # $ip, 1717 # $computerdb->{$ip}{'mac_address'}, 1718 # $date, 1719 # $vlan; 1720 } 1721 1722 print $tb_computer->title(); 1723 print $tb_computer->rule('-'); 1724 print $tb_computer->body(); 1725 1701 1726 return; 1702 1727 }
Note: See TracChangeset
for help on using the changeset viewer.