From afced3cd6c4fb9f0bda57505e3f8b4a235fa7046 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 12 Nov 2011 14:21:01 +0000 Subject: [PATCH] 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 --- html/graph-realtime.php | 10 ++++++---- html/pages/device/port.inc.php | 1 + html/pages/device/port/events.inc.php | 16 ++++++++++++++++ includes/defaults.inc.php | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 html/pages/device/port/events.inc.php diff --git a/html/graph-realtime.php b/html/graph-realtime.php index 714dafdb44..5d5fc5d381 100755 --- a/html/graph-realtime.php +++ b/html/graph-realtime.php @@ -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('' . "\n");?> >Out > > - text-anchor="end"> - text-anchor="end"> + text-anchor="end"> + text-anchor="end"> >Switch to bytes/s >AutoScale () > diff --git a/html/pages/device/port.inc.php b/html/pages/device/port.inc.php index 389a61d4a3..c7409325e4 100644 --- a/html/pages/device/port.inc.php +++ b/html/pages/device/port.inc.php @@ -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'; } diff --git a/html/pages/device/port/events.inc.php b/html/pages/device/port/events.inc.php new file mode 100644 index 0000000000..0fe9c01ae3 --- /dev/null +++ b/html/pages/device/port/events.inc.php @@ -0,0 +1,16 @@ +'); + +foreach ($entries as $entry) +{ + include("includes/print-event.inc.php"); +} + +echo(''); + +$pagetitle[] = "Events"; + + +?> diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index b1b461d377..6000024bc3 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -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