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:
11
html/includes/graphs/device/auth.inc.php
Normal file
11
html/includes/graphs/device/auth.inc.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?
|
||||
|
||||
if(is_numeric($id)) {
|
||||
$device = device_by_id_cache($id);
|
||||
}
|
||||
|
||||
$title = generatedevicelink($device);
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -18,16 +18,16 @@ if($_GET['debug']) {
|
||||
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
|
||||
}
|
||||
|
||||
if($_GET['device']) {
|
||||
$_GET['id'] = $_GET['device'];
|
||||
$device_id = $_GET['device'];
|
||||
} elseif($_GET['if']) {
|
||||
$_GET['id'] = $_GET['if'];
|
||||
} elseif($_GET['port']) {
|
||||
$_GET['id'] = $_GET['port'];
|
||||
} elseif($_GET['peer']) {
|
||||
$_GET['id'] = $_GET['peer'];
|
||||
}
|
||||
# if($_GET['device']) {
|
||||
# $_GET['id'] = $_GET['device'];
|
||||
# $device_id = $_GET['device'];
|
||||
# } elseif($_GET['if']) {
|
||||
# $_GET['id'] = $_GET['if'];
|
||||
# } elseif($_GET['port']) {
|
||||
# $_GET['id'] = $_GET['port'];
|
||||
# } elseif($_GET['peer']) {
|
||||
# $_GET['id'] = $_GET['peer'];
|
||||
# }
|
||||
|
||||
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', mres($_GET['type']), $graphtype);
|
||||
|
||||
|
12
html/includes/graphs/port/auth.inc.php
Normal file
12
html/includes/graphs/port/auth.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?
|
||||
|
||||
if(is_numeric($id)) {
|
||||
$port = get_port_by_id($id);
|
||||
$device = device_by_id_cache($port['device_id']);
|
||||
}
|
||||
|
||||
$title = generatedevicelink($device);
|
||||
$title .= " :: Port ".generateiflink($port);
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user