mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dark mode fix routing tabs & pages (#15485)
* Dark mode fix routing tabs * Fix styling * Fix styling * move tbody --------- Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -110,28 +110,17 @@ if ($vars['view'] == 'macaccounting_pkts') {
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
echo '<table border="0" cellspacing="0" cellpadding="5" width="100%">';
|
||||
echo '<table border="0" cellspacing="0" cellpadding="5" width="100%" class="table sortable">';
|
||||
echo '<tr style="height: 30px"><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>Peer description</th><th>State</th><th>Last error</th><th>Uptime</th></tr>';
|
||||
|
||||
$i = '1';
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? $extra_sql ORDER BY `bgpPeerRemoteAs`, `bgpPeerIdentifier`", [$device['device_id']]) as $peer) {
|
||||
$has_macaccounting = dbFetchCell('SELECT COUNT(*) FROM `ipv4_mac` AS I, mac_accounting AS M WHERE I.ipv4_address = ? AND M.mac = I.mac_address', [$peer['bgpPeerIdentifier']]);
|
||||
if (! is_integer($i / 2)) {
|
||||
$bg_colour = \LibreNMS\Config::get('list_colour.even');
|
||||
} else {
|
||||
$bg_colour = \LibreNMS\Config::get('list_colour.odd');
|
||||
}
|
||||
|
||||
unset($alert);
|
||||
unset($peerhost, $peername);
|
||||
|
||||
if (! is_integer($i / 2)) {
|
||||
$bg_colour = \LibreNMS\Config::get('list_colour.odd');
|
||||
} else {
|
||||
$bg_colour = \LibreNMS\Config::get('list_colour.even');
|
||||
}
|
||||
|
||||
if ($peer['bgpPeerState'] == 'established') {
|
||||
$col = 'green';
|
||||
} else {
|
||||
@@ -241,7 +230,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? $extra_sql
|
||||
$last_error = describe_bgp_error_code($peer['bgpPeerLastErrorCode'], $peer['bgpPeerLastErrorSubCode']) . '<br/>' . $peer['bgpPeerLastErrorText'];
|
||||
}
|
||||
|
||||
echo '<tr bgcolor="' . $bg_colour . '"' . (empty($peer['alert']) ? '' : ' bordercolor="#cc0000"') . (empty($peer['disabled']) ? '' : ' bordercolor="#cccccc"') . '>
|
||||
echo '<tr class="bgp"' . (empty($peer['alert']) ? '' : ' bordercolor="#cc0000"') . (empty($peer['disabled']) ? '' : ' bordercolor="#cccccc"') . '>
|
||||
';
|
||||
|
||||
echo '
|
||||
@@ -255,8 +244,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? $extra_sql
|
||||
<td>' . \LibreNMS\Util\Time::formatInterval($peer['bgpPeerFsmEstablishedTime']) . "<br />
|
||||
Updates <i class='fa fa-arrow-down icon-theme' aria-hidden='true'></i> " . $peer['bgpPeerInUpdates'] . "
|
||||
<i class='fa fa-arrow-up icon-theme' aria-hidden='true'></i> " . $peer['bgpPeerOutUpdates'] . '</td>
|
||||
</tr>
|
||||
<tr height=5></tr>';
|
||||
</tr>';
|
||||
|
||||
unset($invalid);
|
||||
|
||||
@@ -297,7 +285,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? $extra_sql
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '216';
|
||||
$graph_array['to'] = \LibreNMS\Config::get('time.now');
|
||||
echo '<tr bgcolor="' . $bg_colour . '"><td colspan="7">';
|
||||
echo '<tr class="bgp"><td colspan="7">';
|
||||
|
||||
include 'includes/html/print-graphrow.inc.php';
|
||||
|
||||
|
@@ -37,16 +37,17 @@ if ($vars['view'] == 'graphs') {
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
echo '<div id="content">
|
||||
<table border="0" cellspacing="0" cellpadding="5" width="100%">';
|
||||
|
||||
echo '<tr><th><a title="Physical hardware entity">Entity</a></th>
|
||||
echo '<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-hover" style="border-collapse:collapse;">
|
||||
<thead><tr>
|
||||
<th><a title="Physical hardware entity">Entity</a></th>
|
||||
<th><a title="Address Family">AFI</a></th>
|
||||
<th><a title="CEF Switching Path">Path</a></th>
|
||||
<th><a title="Number of packets dropped.">Drop</a></th>
|
||||
<th><a title="Number of packets that could not be switched in the normal path and were punted to the next-fastest switching vector.">Punt</a></th>
|
||||
<th><a title="Number of packets that could not be switched in the normal path and were punted to the host.<br />For switch paths other than a centralized turbo switch path, punt and punt2host function the same way. With punt2host from a centralized turbo switch path (PAS and RSP), punt will punt the packet to LES, but punt2host will bypass LES and punt directly to process switching.">Punt2Host</a></th>
|
||||
</tr>';
|
||||
</tr></thead>';
|
||||
|
||||
$i = 0;
|
||||
|
||||
@@ -68,7 +69,7 @@ foreach (dbFetchRows('SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
|
||||
$entity_descr = $entity['entPhysicalName'] . ' (' . $entity['entPhysicalModelName'] . ')';
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=$bg_colour><td>" . $entity_descr . '</td>
|
||||
echo '<tbody><tr><td>' . $entity_descr . '</td>
|
||||
<td>' . $cef['afi'] . '</td>
|
||||
<td>';
|
||||
|
||||
@@ -109,7 +110,7 @@ foreach (dbFetchRows('SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
|
||||
|
||||
echo '</td>';
|
||||
|
||||
echo '</tr>
|
||||
echo '</tr></tbody>
|
||||
';
|
||||
|
||||
if ($vars['view'] == 'graphs') {
|
||||
@@ -129,4 +130,4 @@ foreach (dbFetchRows('SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo '</table></div>';
|
||||
echo '</table></div></div>';
|
||||
|
@@ -66,7 +66,21 @@ foreach ($graph_types as $type => $descr) {
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
echo "<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>";
|
||||
echo '
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-hover" style="border-collapse:collapse;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>VRF</th>
|
||||
<th>Description</th>
|
||||
<th>RD</th>
|
||||
<th>Interfaces</th>
|
||||
</tr>
|
||||
</thead>';
|
||||
|
||||
$i = '0';
|
||||
foreach (dbFetchRows('SELECT * FROM `vrfs` WHERE `device_id` = ? ORDER BY `vrf_name`', [$device['device_id']]) as $vrf) {
|
||||
include 'includes/html/print-vrf.inc.php';
|
||||
|
Reference in New Issue
Block a user