Changeset 317 for trunk


Ignore:
Timestamp:
Oct 31, 2017, 9:55:08 AM (6 years ago)
Author:
g7moreau
Message:
  • Add fqdn_html_breakable function and change unit to ex in style file
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r314 r317  
    496496   my $port_hr = shift;
    497497   $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ - /; # First occurence
    498    $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g; # Other occurence
     498   $port_hr =~ s/($SEP_AGGREGATOR_PORT)/ /g;  # Other occurence
    499499   return $port_hr;
     500   }
     501
     502#---------------------------------------------------------------
     503# fqdn_html_breakable change it's parameter, use it like chomp perl function
     504
     505sub 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;
    500510   }
    501511
     
    17791789      my $parent_port_hr = format_aggregator4html($computerdb->{$ip}{'switch_port_hr'});
    17801790
     1791      fqdn_html_breakable($switch_hostname);
     1792      fqdn_html_breakable(my $hostname_fq_html = $computerdb->{$ip}{'hostname_fq'});
     1793
    17811794      print <<"END_HTML";
    17821795  <tr class="$typerow">
     
    17841797   <td class="bklask-port">$parent_port_hr</td>
    17851798   <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>
    17871800   <td sorttable_customkey="$ip_sort">$ip</td>
    17881801   <td sorttable_customkey="$mac_sort">$computerdb->{$ip}{'mac_address'}</td>
     
    17911804  </tr>
    17921805END_HTML
    1793 #   <td colspan="2">$arrow</td>
    17941806      }
    17951807
     
    18391851         my $parent_port_hr = format_aggregator4html($db_switch_output_port{$sw});
    18401852         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'});
    18411856
    18421857         print <<"END_HTML";
     
    18451860   <td class="bklask-port">$parent_port_hr</td>
    18461861   <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>
    18481863   <td sorttable_customkey="$ip_sort">$ipv4_address</td>
    18491864   <td sorttable_customkey="$mac_sort">$mac_address</td>
     
    18771892         my $arrow ='&#10235;';
    18781893            $arrow ='&#10237;' if $db_switch_output_port{$sw} =~ m/^(Trk|Br|Po)/;
     1894
     1895         fqdn_html_breakable($sw);
    18791896
    18801897         print <<"END_HTML";
     
    18901907  </tr>
    18911908END_HTML
    1892          #<td>$arrow</td><td>$parent_port_hr</td>
    1893 
    18941909         next LOOP_ON_OUTPUT_SWITCH;
    1895 
    1896          # Old print
    1897          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_HTML
    19091910         }
    19101911      }
     
    19461947            my $parent_port_hr = format_aggregator4html($port_connect);
    19471948            my $child_port_hr  = format_aggregator4html($db_switch_output_port{$sw});
     1949
     1950            fqdn_html_breakable($sw);
     1951            fqdn_html_breakable($sw_connect);
    19481952
    19491953            print <<"END_HTML";
     
    19621966         else {
    19631967            my $parent_port_hr = format_aggregator4html($port_connect);
     1968
     1969            fqdn_html_breakable($sw);
     1970            fqdn_html_breakable($sw_connect);
    19641971
    19651972            print <<"END_HTML";
  • trunk/style-klask.css

    r316 r317  
    2323
    2424th.klask-header-left {
    25   -moz-border-radius-topleft : 1em;
     25  -moz-border-radius-topleft : 1ex;
    2626  }
    2727
    2828th.klask-header-right {
    29   -moz-border-radius-topright : 1em;
     29  -moz-border-radius-topright : 1ex;
    3030  }
    3131
    3232th.klask-footer-left {
    33   -moz-border-radius-bottomleft : 1em;
     33  -moz-border-radius-bottomleft : 1ex;
    3434  }
    3535
    3636th.klask-footer-right {
    37   -moz-border-radius-bottomright : 1em;
     37  -moz-border-radius-bottomright : 1ex;
    3838  }
    3939
     
    5050  border-collapse : collapse;
    5151  font-family     : Courier;
    52   padding-left    : 0.5em;
    53   padding-right   : 0.5em;
     52  padding-left    : 0.5ex;
     53  padding-right   : 0.5ex;
    5454  }
    5555
     
    5858  border-collapse : collapse;
    5959  font-family     : Courier;
    60   padding-left    : 0.5em;
    61   padding-right   : 0.5em;
     60  padding-left    : 0.5ex;
     61  padding-right   : 0.5ex;
    6262  }
    6363
     
    6868td.bklask-arrow {
    6969  text-align      : left;
    70   text-indent     : -6em;
    71   padding-left    : 7em !important;
     70  text-indent     : -5.5ex;
     71  padding-left    : 6.5em !important;
    7272  }
Note: See TracChangeset for help on using the changeset viewer.