Changeset 163 for trunk/klask
- Timestamp:
- Jun 10, 2016, 12:00:07 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r162 r163 1243 1243 <th scope="col" class="klask-footer-left">Switch</th> 1244 1244 <th scope="col" class="fklask-port">Port</th> 1245 <th scope="col" class="fklask-link" >Link</th>1245 <th scope="col" class="fklask-link" colspan="2">Link</th> 1246 1246 <th scope="col" class="fklask-hostname">Hostname-FQ</th> 1247 1247 <th scope="col" class="fklask-ipv4">IPv4-Address</th> … … 1281 1281 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 1282 1282 1283 my $arrow ='←'; 1284 $arrow ='⇐' if $computerdb->{$ip}{switch_port_hr} =~ m/^(Trk|Br|Po)/; 1285 1283 1286 my $switch_hostname = $computerdb->{$ip}{switch_hostname} || $computerdb->{$ip}{switch_description} || 'unkown'; 1284 1287 chomp $switch_hostname; … … 1298 1301 <td sorttable_customkey="$switch_hostname_sort">$switch_hostname</td> 1299 1302 <td class="bklask-port">$computerdb->{$ip}{switch_port_hr}</td> 1300 <td ><-------</td>1303 <td colspan="2">$arrow</td> 1301 1304 <td sorttable_customkey="$host_short">$computerdb->{$ip}{hostname_fq}</td> 1302 1305 <td sorttable_customkey="$ip_sort">$ip</td> … … 1321 1324 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 1322 1325 1326 my $arrow ='⇾'; 1327 $arrow ='⇨' if $db_switch_output_port{$sw} =~ m/^(Trk|Br|Po)/; 1328 1323 1329 if (exists $db_switch_parent{$sw}) { 1324 1325 my $mac_address = $db_switch{$db_switch_parent{$sw}->{switch}}->{mac_address}; 1326 my $ipv4_address = $db_switch{$db_switch_parent{$sw}->{switch}}->{ipv4_address}; 1327 my $timestamp = $db_switch{$db_switch_parent{$sw}->{switch}}->{timestamp}; 1328 1329 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime $timestamp; 1330 $year += 1900; 1331 $mon++; 1332 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min; 1333 1334 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ipv4_address; 1335 1336 my $mac_sort = sprintf '%04i-%s', 9999, $mac_address; 1337 1338 my ( $host_short ) = sprintf '%s %3s' , split(m/ \. /xms, $db_switch_parent{$sw}->{switch}, 1), $db_switch_parent{$sw}->{port_hr}; 1339 1340 print <<"END_HTML"; 1330 my $mac_address = $db_switch{$db_switch_parent{$sw}->{switch}}->{mac_address}; 1331 my $ipv4_address = $db_switch{$db_switch_parent{$sw}->{switch}}->{ipv4_address}; 1332 my $timestamp = $db_switch{$db_switch_parent{$sw}->{switch}}->{timestamp}; 1333 1334 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime $timestamp; 1335 $year += 1900; 1336 $mon++; 1337 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min; 1338 1339 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ipv4_address; 1340 1341 my $mac_sort = sprintf '%04i-%s', 9999, $mac_address; 1342 1343 my ( $host_short ) = sprintf '%s %3s' , split(m/ \. /xms, $db_switch_parent{$sw}->{switch}, 1), $db_switch_parent{$sw}->{port_hr}; 1344 1345 print <<"END_HTML"; 1341 1346 <tr class="$typerow"> 1342 1347 <td sorttable_customkey="$switch_hostname_sort">$sw</td> 1343 1348 <td class="bklask-port">$db_switch_output_port{$sw}</td> 1344 <td> +-->$db_switch_parent{$sw}->{port_hr}</td>1349 <td>$arrow</td></td>$db_switch_parent{$sw}->{port_hr}</td> 1345 1350 <td sorttable_customkey="$host_short">$db_switch_parent{$sw}->{switch}</td> 1346 1351 <td sorttable_customkey="$ip_sort">$ipv4_address</td> … … 1356 1361 <td sorttable_customkey="$switch_hostname_sort">$sw</td> 1357 1362 <td class="bklask-port">$db_switch_output_port{$sw}</td> 1358 <td> +--></td>1363 <td>$arrow</td></td></td> 1359 1364 <td sorttable_customkey="router">router</td> 1360 1365 <td sorttable_customkey="999999999999"></td> … … 1373 1378 my $switch_hostname_sort = sprintf '%s %3s' ,$sw_connect, $port_connect; 1374 1379 1375 my $mac_address = $db_switch{$sw}->{mac_address}; 1376 my $ipv4_address = $db_switch{$sw}->{ipv4_address}; 1377 my $timestamp = $db_switch{$sw}->{timestamp}; 1378 1379 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime $timestamp; 1380 $year += 1900; 1381 $mon++; 1382 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year,$mon,$mday,$hour,$min; 1383 1384 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ipv4_address; 1385 1386 my $mac_sort = sprintf '%04i-%s', 9999, $mac_address; 1387 1388 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 1380 my $mac_address = $db_switch{$sw}->{mac_address}; 1381 my $ipv4_address = $db_switch{$sw}->{ipv4_address}; 1382 my $timestamp = $db_switch{$sw}->{timestamp}; 1383 1384 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime $timestamp; 1385 $year += 1900; 1386 $mon++; 1387 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year,$mon,$mday,$hour,$min; 1388 1389 my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ipv4_address; 1390 1391 my $mac_sort = sprintf '%04i-%s', 9999, $mac_address; 1392 1393 $typerow = $typerow eq 'even' ? 'odd' : 'even'; 1394 1395 my $arrow ='⇽'; 1396 $arrow ='⇦' if $port_connect =~ m/^(Trk|Br|Po)/; 1389 1397 1390 1398 if (exists $db_switch_output_port{$sw}) { … … 1396 1404 <td sorttable_customkey="$switch_hostname_sort">$sw_connect</td> 1397 1405 <td class="bklask-port">$port_connect</td> 1398 <td> <--+$db_switch_output_port{$sw}</td>1406 <td>$arrow</td><td>$db_switch_output_port{$sw}</td> 1399 1407 <td sorttable_customkey="$host_short">$sw</td> 1400 1408 <td sorttable_customkey="$ip_sort">$ipv4_address</td> … … 1410 1418 <td sorttable_customkey="$switch_hostname_sort">$sw_connect</td> 1411 1419 <td class="bklask-port">$port_connect</td> 1412 <td> <--+</td>1420 <td>$arrow</td><td></td> 1413 1421 <td sorttable_customkey="$sw">$sw</td> 1414 1422 <td sorttable_customkey="">$ipv4_address</td>
Note: See TracChangeset
for help on using the changeset viewer.