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:
Adam Amstrong
2010-07-25 14:21:05 +00:00
parent 7a586e0e4f
commit 82e30b206b
21 changed files with 268 additions and 317 deletions

View File

@@ -0,0 +1,11 @@
<?
if(is_numeric($id)) {
$device = device_by_id_cache($id);
}
$title = generatedevicelink($device);
?>

View File

@@ -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);

View 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);
?>