mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix a bunch of graph definitions to work with pipe. replace escaping with quoting.
git-svn-id: http://www.observium.org/svn/observer/trunk@2494 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
### Sections are printed in the order they exist in $config['graph_tabs']
|
||||
### Sections are printed in the order they exist in $config['graph_sections']
|
||||
### Graphs are printed in the order they exist in $config['graph_types']
|
||||
|
||||
$link_array = array('page' => 'device',
|
||||
@@ -11,7 +11,7 @@ $bg="#ffffff";
|
||||
|
||||
echo('<div style="clear: both;">');
|
||||
|
||||
print_optionbar_start('', '');
|
||||
print_optionbar_start();
|
||||
|
||||
echo("<span style='font-weight: bold;'>Graphs</span> » ");
|
||||
|
||||
@@ -19,24 +19,25 @@ $sep = "";
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM device_graphs WHERE device_id = ?", array($device['device_id'])) as $graph)
|
||||
{
|
||||
$tab = $config['graph_types']['device'][$graph['graph']]['tab'];
|
||||
$graph_enable[$tab][$graph['graph']] = $graph['graph'];
|
||||
$section = $config['graph_types']['device'][$graph['graph']]['section'];
|
||||
$graph_enable[$section][$graph['graph']] = $graph['graph'];
|
||||
}
|
||||
|
||||
foreach ($config['graph_tabs'] as $tab)
|
||||
foreach ($config['graph_sections'] as $section)
|
||||
{
|
||||
if (isset($graph_enable) && is_array($graph_enable[$tab]))
|
||||
if (isset($graph_enable) && is_array($graph_enable[$section]))
|
||||
{
|
||||
$type = strtolower($tab);
|
||||
if (!$_GET['optc']) { $_GET['optc'] = $type; }
|
||||
$type = strtolower($section);
|
||||
if (!$vars['group']) { $vars['group'] = $type; }
|
||||
echo($sep);
|
||||
if ($_GET['optc'] == $type)
|
||||
if ($vars['group'] == $type)
|
||||
{
|
||||
echo('<span class="pagemenu-selected">');
|
||||
}
|
||||
|
||||
echo("<a href='device/".$device['device_id']."/graphs/" . $type . ($_GET['optd'] ? "/" . $_GET['optd'] : ''). "/'> " . ucfirst($type) ."</a>");
|
||||
if ($_GET['optc'] == $type)
|
||||
echo(generate_link(ucfirst($type),$link_array,array('group'=>$type)));
|
||||
|
||||
if ($vars['group'] == $type)
|
||||
{
|
||||
echo("</span>");
|
||||
}
|
||||
@@ -47,7 +48,7 @@ foreach ($config['graph_tabs'] as $tab)
|
||||
unset ($sep);
|
||||
print_optionbar_end();
|
||||
|
||||
$graph_enable = $graph_enable[$_GET['optc']];
|
||||
$graph_enable = $graph_enable[$vars['group']];
|
||||
|
||||
foreach ($config['graph_types']['device'] as $graph => $entry)
|
||||
{
|
||||
|
Reference in New Issue
Block a user