mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
updates to various things. remove null from device_bits graph. add 'events' subtab to interface tab.
git-svn-id: http://www.observium.org/svn/observer/trunk@2720 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -39,6 +39,8 @@ $ifnum=@$port['ifIndex']; // BSD / SNMP interface name / number
|
||||
$ifname=@$port['ifDescr']; //Interface name that will be showed on top right of graph
|
||||
$hostname=shorthost($device['hostname']);
|
||||
|
||||
if($_GET['title']) { $ifname = $_GET['title']; }
|
||||
|
||||
/********* Other conf *******/
|
||||
$scale_type="follow"; //Autoscale default setup : "up" = only increase scale; "follow" = increase and decrease scale according to current graphed datas
|
||||
$nb_plot=240; //NB plot in graph
|
||||
@@ -58,8 +60,8 @@ $attribs['out']='fill="blue" font-family="Tahoma, Verdana, Arial, Helvetica, san
|
||||
$attribs['graph_in']='fill="none" stroke="green" stroke-opacity="0.8"';
|
||||
$attribs['graph_out']='fill="none" stroke="blue" stroke-opacity="0.8"';
|
||||
$attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
|
||||
$attribs['graphname']='fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="8"';
|
||||
$attribs['hostname']='fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
|
||||
$attribs['graphname']='fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="9"';
|
||||
$attribs['hostname']='fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"';
|
||||
$attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"';
|
||||
$attribs['grid']='stroke="gray" stroke-opacity="0.5"';
|
||||
$attribs['switch_unit']='fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4" text-decoration="underline"';
|
||||
@@ -90,8 +92,8 @@ print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
|
||||
<text id="graph_out_lbl" x="5" y="16" <?=$attribs['out']?>>Out</text>
|
||||
<text id="graph_in_txt" x="20" y="8" <?=$attribs['in']?>> </text>
|
||||
<text id="graph_out_txt" x="20" y="16" <?=$attribs['out']?>> </text>
|
||||
<text id="ifname" x="<?=$width?>" y="8" <?=$attribs['graphname']?> text-anchor="end"><?=$ifname?></text>
|
||||
<text id="hostname" x="<?=$width?>" y="14" <?=$attribs['hostname']?> text-anchor="end"><?=$hostname?></text>
|
||||
<text id="ifname" x="<?=$width-2?>" y="8" <?=$attribs['graphname']?> text-anchor="end"><?=$ifname?></text>
|
||||
<text id="hostname" x="<?=$width-2?>" y="14" <?=$attribs['hostname']?> text-anchor="end"><?=$hostname?></text>
|
||||
<text id="switch_unit" x="<?=$width*0.55?>" y="5" <?=$attribs['switch_unit']?>>Switch to bytes/s</text>
|
||||
<text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>>AutoScale (<?=$scale_type?>)</text>
|
||||
<text id="datetime" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text>
|
||||
|
@@ -59,6 +59,7 @@ $link_array = array('page' => 'device',
|
||||
$menu_options['graphs'] = 'Graphs';
|
||||
$menu_options['realtime'] = 'Real time'; ### FIXME CONDITIONAL
|
||||
$menu_options['arp'] = 'ARP Table';
|
||||
$menu_options['events'] = 'Eventlog';
|
||||
|
||||
if (dbFetchCell("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$port['interface_id']."'") )
|
||||
{ $menu_options['adsl'] = 'ADSL'; }
|
||||
|
16
html/pages/device/port/events.inc.php
Normal file
16
html/pages/device/port/events.inc.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$entries = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = ? AND `type` = 'interface' AND `reference` = '".$port['interface_id']."' ORDER BY `datetime` DESC LIMIT 0,250", array($device['device_id']));
|
||||
echo('<table cellspacing="0" cellpadding="2" width="100%">');
|
||||
|
||||
foreach ($entries as $entry)
|
||||
{
|
||||
include("includes/print-event.inc.php");
|
||||
}
|
||||
|
||||
echo('</table>');
|
||||
|
||||
$pagetitle[] = "Events";
|
||||
|
||||
|
||||
?>
|
@@ -245,6 +245,7 @@ $config['device_traffic_descr'][] = '/vlan/';
|
||||
$config['device_traffic_descr'][] = '/tunnel/';
|
||||
$config['device_traffic_descr'][] = '/:\d+/';
|
||||
$config['device_traffic_descr'][] = '/bond/';
|
||||
$config['device_traffic_descr'][] = '/null/';
|
||||
|
||||
### IRC Bot configuration
|
||||
|
||||
|
Reference in New Issue
Block a user