summaryrefslogtreecommitdiffstats
path: root/frontends/php/charts.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-05 16:59:02 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-05 16:59:02 +0000
commit062537835fa9c5abc662e56420dff80edb13d91d (patch)
tree6e94e638f766a8b2b409335aee6e2ae6736c4b03 /frontends/php/charts.php
parenta3ee144e22596c3aea1fab644ed4c93e4466608a (diff)
downloadzabbix-062537835fa9c5abc662e56420dff80edb13d91d.tar.gz
zabbix-062537835fa9c5abc662e56420dff80edb13d91d.tar.xz
zabbix-062537835fa9c5abc662e56420dff80edb13d91d.zip
- [DEV-1] added new graph navigation-bar (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4839 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/charts.php')
-rw-r--r--frontends/php/charts.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/frontends/php/charts.php b/frontends/php/charts.php
index ed8783e2..da9ae309 100644
--- a/frontends/php/charts.php
+++ b/frontends/php/charts.php
@@ -1,7 +1,7 @@
<?php
/*
** ZABBIX
-** Copyright (C) 2000-2005 SIA Zabbix
+** Copyright (C) 2000-2007 SIA Zabbix
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
$page['title'] = 'S_CUSTOM_GRAPHS';
$page['file'] = 'charts.php';
$page['hist_arg'] = array('hostid','grouid','graphid','period','dec','inc','left','right','stime');
+ $page['scripts'] = array('prototype.js','url.js','gmenu.js','scrollbar.js','sbinit.js');
?>
<?php
if(isset($_REQUEST['fullscreen']))
@@ -258,8 +259,8 @@ include_once 'include/page_header.php';
<!--
if(window.innerWidth) width=window.innerWidth;
else width=document.body.clientWidth;
- document.write(\'<img src="chart6.php?graphid='.$_REQUEST['graphid'].url_param('stime').url_param('from').
- '&period='.$effectiveperiod.'" />\');
+ document.write(\'<img id="graph" src="chart6.php?graphid='.$_REQUEST['graphid'].url_param('stime').url_param('from').
+ '&period='.$effectiveperiod.'" /><br /><br />\');
-->
</script>'."\n";
}
@@ -268,8 +269,8 @@ include_once 'include/page_header.php';
<!--
if(window.innerWidth) width=window.innerWidth;
else width=document.body.clientWidth;
- document.write(\'<img src="chart2.php?graphid='.$_REQUEST['graphid'].url_param('stime').url_param('from').
- '&period='.$effectiveperiod.'&width=\'+(width-108)+\'" />\');
+ document.write(\'<img id="graph" src="chart2.php?graphid='.$_REQUEST['graphid'].url_param('stime').url_param('from').
+ '&period='.$effectiveperiod.'&width=\'+(width-108)+\'" /><br /><br />\');
-->
</script>'."\n";
}
@@ -280,7 +281,18 @@ include_once 'include/page_header.php';
if($_REQUEST['graphid'] > 0)
{
- navigation_bar('charts.php',array('groupid','hostid','graphid'));
+ $stime = get_min_itemclock_by_graphid($_REQUEST['graphid']);
+ $bstime = time()-$effectiveperiod;
+ if(isset($_REQUEST['stime'])){
+ $bstime = $_REQUEST['stime'];
+ $bstime = mktime(substr($bstime,8,2),substr($bstime,10,2),0,substr($bstime,4,2),substr($bstime,6,2),substr($bstime,0,4));
+ }
+
+ $script = 'scrollinit(0,0,0,'.$effectiveperiod.','.$stime.',0,'.$bstime.');
+ showgraphmenu("graph");';
+
+ zbx_add_post_js($script);
+// navigation_bar('charts.php',array('groupid','hostid','graphid'));
}
?>