mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add click to zoom to soem graphs, and new per-graphtype auth.inc.php to authenticate graphs and click-to-zoom pages.
git-svn-id: http://www.observium.org/svn/observer/trunk@1473 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -2,27 +2,15 @@
|
||||
|
||||
global $config;
|
||||
|
||||
if(!$graph_type) { $graph_type = $_GET['type']; }
|
||||
|
||||
if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
|
||||
#if(!$graph_type) { $graph_type = $_GET['type']; }
|
||||
#if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['port'] = $interface['interface_id'];
|
||||
$graph_array['id'] = $interface['interface_id'];
|
||||
$graph_array['type'] = $graph_type;
|
||||
|
||||
$periods = array('day', 'week', 'month', 'year');
|
||||
|
||||
if($graph_type == "etherlike" && !is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/etherlike-" . $interface['ifIndex'] . ".rrd")) {
|
||||
} else {
|
||||
|
||||
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($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
|
||||
}
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user