mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cleanups to how graphing works. start using device= for device graphs.
git-svn-id: http://www.observium.org/svn/observer/trunk@3167 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
<?php
|
||||
|
||||
if (is_numeric($id))
|
||||
{
|
||||
$mplug = dbFetchRow("SELECT * FROM `munin_plugins` WHERE `mplug_id` = ?", array($id));
|
||||
if(is_numeric($vars['plugin']))
|
||||
{
|
||||
$mplug = dbFetchRow("SELECT * FROM `munin_plugins` AS M, `devices` AS D WHERE `mplug_id` = ? AND D.device_id = M.device_id ", array($vars['plugin']));
|
||||
} else {
|
||||
$mplug = dbFetchRow("SELECT * FROM `munin_plugins` AS M, `devices` AS D WHERE M.`device_id` = ? AND `mplug_type` = ? AND D.device_id = M.device_id", array($device['device_id'], $vars['plugin']));
|
||||
}
|
||||
|
||||
if (is_numeric($mplug['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($mplug['device_id'])))
|
||||
{
|
||||
$device = device_by_id_cache($mplug['device_id']);
|
||||
$device = &$mplug;
|
||||
$title = generate_device_link($device);
|
||||
# if (!empty($mplug['mplug_instance']))
|
||||
# {
|
||||
# $plugfile = $config['rrd_dir']."/".$device['hostname']."/munin/".$mplug['mplug_type']."_".$mplug['mplug_instance'];
|
||||
# $title .= " :: Plugin :: " . $mplug['mplug_type'] . " :: " . $mplug['mplug_title'];
|
||||
# } else {
|
||||
$plugfile = $config['rrd_dir']."/".$device['hostname']."/munin/".$mplug['mplug_type'];
|
||||
$title .= " :: Plugin :: " . $mplug['mplug_type'] . " - " . $mplug['mplug_title'];
|
||||
# }
|
||||
$plugfile = $config['rrd_dir']."/".$device['hostname']."/munin/".$mplug['mplug_type'];
|
||||
$title .= " :: Plugin :: " . $mplug['mplug_type'] . " - " . $mplug['mplug_title'];
|
||||
|
||||
$auth = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user