mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
improvements to cefswitching - testing tooltips and new method of getting entity descr
git-svn-id: http://www.observium.org/svn/observer/trunk@2067 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -847,3 +847,31 @@ color: #cc0000;
|
||||
vertical-align:middle;
|
||||
margin-top: -4px
|
||||
}
|
||||
|
||||
### qTip stuff
|
||||
|
||||
.qtip .qtip-content{
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.qtip .qtip-content .qtip-title,
|
||||
.qtip-cream .qtip-content .qtip-title{
|
||||
background-color: #F0DE7D;
|
||||
}
|
||||
|
||||
.qtip-light .qtip-content .qtip-title{
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.qtip-dark .qtip-content .qtip-title{
|
||||
background-color: #404040;
|
||||
}
|
||||
|
||||
.qtip-red .qtip-content .qtip-title{
|
||||
background-color: #F28279;
|
||||
}
|
||||
|
||||
.qtip-green .qtip-content .qtip-title{
|
||||
background-color: #B9DB8C;
|
||||
}
|
||||
|
||||
@@ -67,8 +67,9 @@ if ($config['page_refresh']) { echo("<meta http-equiv='refresh' content='".$conf
|
||||
<body>
|
||||
<script type="text/javascript" src="js/mktree.js"></script>
|
||||
<script type="text/javascript" src="js/sorttable.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-1.5.2.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-checkbox.js"></script>
|
||||
<script type="text/javascript" src="js/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!-- Begin
|
||||
function popUp(URL)
|
||||
|
||||
16
html/js/jquery-1.5.2.min.js
vendored
Normal file
16
html/js/jquery-1.5.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -24,12 +24,18 @@ unset($sep);
|
||||
print_optionbar_end();
|
||||
|
||||
|
||||
echo("<table width=100%>");
|
||||
echo('<div id="content">
|
||||
<table border="0" cellspacing="0" cellpadding="5" width="100%">');
|
||||
|
||||
$cef_query = mysql_query("SELECT * FROM `cef_switching` WHERE `device_id` = '".$device['device_id']."' ORDER BY `entPhysicalIndex`, `afi`, `cef_index`");
|
||||
|
||||
echo("<tr><th>Entity</th><th>AFI</th><th>Path</th><th>Drop</th><th>Punt</th><th>Punt2Host</th>
|
||||
</tr>");
|
||||
echo('<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>');
|
||||
|
||||
$i=0;
|
||||
|
||||
@@ -43,10 +49,35 @@ while ($cef = mysql_fetch_assoc($cef_query))
|
||||
|
||||
$interval = $cef['updated'] - $cef['updated_prev'];
|
||||
|
||||
echo("<tr bgcolor=$bg_colour><td>".$entity['entPhysicalName']." - ".$entity['entPhysicalModelName']."</td>
|
||||
<td>".$cef['afi']."</td>
|
||||
<td>".$cef['cef_path']."</td>");
|
||||
if(!$entity['entPhysicalModelName'] && $entity['entPhysicalContainedIn'])
|
||||
{
|
||||
$parent_entity_query = mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity['entPhysicalContainedIn']."'");
|
||||
$parent_entity = mysql_fetch_assoc($parent_entity_query);
|
||||
$entity_descr = $entity['entPhysicalName'] . " (" . $parent_entity['entPhysicalModelName'] .")";
|
||||
} else {
|
||||
$entity_descr = $entity['entPhysicalName'] . " (" . $entity['entPhysicalModelName'] .")";
|
||||
}
|
||||
|
||||
|
||||
echo("<tr bgcolor=$bg_colour><td>".$entity_descr."</td>
|
||||
<td>".$cef['afi']."</td>
|
||||
<td>");
|
||||
|
||||
switch ($cef['cef_path']) {
|
||||
case "RP RIB":
|
||||
echo '<a title="Process switching with Cisco Express Forwarding assistance.">RP RIB</a>';
|
||||
break;
|
||||
case "RP LES":
|
||||
echo '<a title="Low-end switching. Centralized Cisco Express Forwarding switch path.">RP LES</a>';
|
||||
break;
|
||||
case "RP PAS":
|
||||
echo '<a title="Cisco Express Forwarding turbo switch path.">RP PAS</a>';
|
||||
break;
|
||||
default:
|
||||
echo $cef['cef_path'];
|
||||
}
|
||||
|
||||
echo("</td>");
|
||||
echo("<td>".format_si($cef['drop']));
|
||||
if($cef['drop'] > $cef['drop_prev']) { echo(" <span style='color:red;'>(".round(($cef['drop']-$cef['drop_prev'])/$interval,2)."/sec)</span>"); }
|
||||
echo("</td>");
|
||||
@@ -62,6 +93,10 @@ while ($cef = mysql_fetch_assoc($cef_query))
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo("</table>");
|
||||
echo("</table></div>");
|
||||
|
||||
?>
|
||||
|
||||
<script class="content_tooltips" type="text/javascript">
|
||||
$(document).ready(function() { $('#content a[title]').qtip({ content: { text: false }, style: 'light' }); });
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user