Changeset 249


Ignore:
Timestamp:
Sep 8, 2017, 4:30:42 PM (3 years ago)
Author:
g7moreau
Message:
  • Test better html export output
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r248 r249  
    77use strict;
    88use warnings;
    9 use version; our $VERSION = qv('0.6.3');
     9use version; our $VERSION = qv('0.6.4');
    1010
    1111use Readonly;
     
    14831483      $vlan = $computerdb->{$ip}{network}.' ('.get_current_vlan_id($computerdb->{$ip}{network}).')' if $computerdb->{$ip}{network};
    14841484
     1485      my $switch_port_hr = $computerdb->{$ip}{switch_port_hr} =~ s/($SEP_AGGREGATOR_PORT)/: /r; # First occurence
     1486      $switch_port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence
     1487
    14851488      print <<"END_HTML";
    14861489  <tr class="$typerow">
    14871490   <td sorttable_customkey="$switch_hostname_sort">$switch_hostname</td>
    1488    <td class="bklask-port">$computerdb->{$ip}{switch_port_hr}</td>
     1491   <td class="bklask-port">$switch_port_hr</td>
    14891492   <td colspan="2">$arrow</td>
    14901493   <td sorttable_customkey="$host_short">$computerdb->{$ip}{hostname_fq}</td>
     
    15291532         my ( $host_short ) = sprintf '%s %3s' , split(m/ \. /xms, $db_switch_parent{$sw}->{'switch'}, 1), $db_switch_parent{$sw}->{port_hr};
    15301533
     1534         my $switch_port_hr = $db_switch_output_port{$sw} =~ s/($SEP_AGGREGATOR_PORT)/: /r; # First occurence
     1535         $switch_port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence
     1536
     1537         my $switch_connected_port_hr = $db_switch_parent{$sw}->{port_hr} =~ s/($SEP_AGGREGATOR_PORT)/: /r; # First occurence
     1538         $switch_connected_port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence
     1539
    15311540         print <<"END_HTML";
    15321541  <tr class="$typerow">
    15331542   <td sorttable_customkey="$switch_hostname_sort">$sw</td>
    1534    <td class="bklask-port">$db_switch_output_port{$sw}</td>
    1535    <td>$arrow</td><td>$db_switch_parent{$sw}->{port_hr}</td>
     1543   <td class="bklask-port">$switch_port_hr</td>
     1544   <td>$arrow</td><td>$switch_connected_port_hr</td>
    15361545   <td sorttable_customkey="$host_short">$db_switch_parent{$sw}->{'switch'}</td>
    15371546   <td sorttable_customkey="$ip_sort">$ipv4_address</td>
     
    15431552         }
    15441553      else {
     1554         my $switch_port_hr = $db_switch_output_port{$sw} =~ s/($SEP_AGGREGATOR_PORT)/: /r; # First occurence
     1555         $switch_port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence
     1556
    15451557         print <<"END_HTML";
    15461558  <tr class="$typerow">
    15471559   <td sorttable_customkey="$switch_hostname_sort">$sw</td>
    1548    <td class="bklask-port">$db_switch_output_port{$sw}</td>
     1560   <td class="bklask-port">$switch_port_hr</td>
    15491561   <td>$arrow</td><td></td>
    15501562   <td sorttable_customkey="router">router</td>
Note: See TracChangeset for help on using the changeset viewer.