mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
fix services stuff
git-svn-id: http://www.observium.org/svn/observer/trunk@3090 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -5,21 +5,16 @@ echo("<span style='font-weight: bold;'>Services</span> » ");
|
||||
$menu_options = array('basic' => 'Basic',
|
||||
'details' => 'Details');
|
||||
|
||||
if (!$_GET['optc']) { $_GET['optc'] = "basic"; }
|
||||
if (!$vars['view']) { $vars['view'] = "basic"; }
|
||||
|
||||
$sep = "";
|
||||
foreach ($menu_options as $option => $text)
|
||||
{
|
||||
if(empty($vars['view'])) { $vars['view'] = $option; }
|
||||
echo($sep);
|
||||
if ($_GET['optc'] == $option)
|
||||
{
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
}
|
||||
echo('<a href="device/' . $device['device_id'] . '/services/' . $option . ($_GET['optd'] ? '/' . $_GET['optd'] : ''). '/">' . $text . '</a>');
|
||||
if ($_GET['optc'] == $option)
|
||||
{
|
||||
echo("</span>");
|
||||
}
|
||||
if ($vars['view'] == $option) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo(generate_link($text, $vars, array('view'=>$option)));
|
||||
if ($vars['view'] == $option) { echo("</span>"); }
|
||||
$sep = " | ";
|
||||
}
|
||||
|
||||
@@ -35,7 +30,7 @@ if (dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE device_id = ?",
|
||||
{
|
||||
include("includes/print-service.inc.php");
|
||||
|
||||
if ($_GET['optc'] == "details")
|
||||
if ($vars['view'] == "details")
|
||||
{
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "210";
|
||||
@@ -46,12 +41,9 @@ if (dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE device_id = ?",
|
||||
$periods = array('day', 'week', 'month', 'year');
|
||||
|
||||
echo('<tr style="background-color: '.$bg.'; padding: 7px;"><td colspan=4>');
|
||||
foreach ($periods as $period)
|
||||
{
|
||||
$graph_array['from'] = $$period;
|
||||
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
|
||||
echo(overlib_link("#", generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
|
||||
echo("</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user