summaryrefslogtreecommitdiffstats
path: root/frontends/php/charts.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-01 15:20:30 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-01 15:20:30 +0000
commitd6c398a22edb09dffc3f7589635897c78b1fae62 (patch)
treee8156cb24679a71056b0312c5dbe953fb1911b14 /frontends/php/charts.php
parentc5b41261327759f046d89ed339e309b9535213e5 (diff)
downloadzabbix-d6c398a22edb09dffc3f7589635897c78b1fae62.tar.gz
zabbix-d6c398a22edb09dffc3f7589635897c78b1fae62.tar.xz
zabbix-d6c398a22edb09dffc3f7589635897c78b1fae62.zip
- [DEV-54] added zoom for screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4965 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/charts.php')
-rw-r--r--frontends/php/charts.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/frontends/php/charts.php b/frontends/php/charts.php
index 9365cf11..07a64314 100644
--- a/frontends/php/charts.php
+++ b/frontends/php/charts.php
@@ -275,6 +275,8 @@ include_once 'include/page_header.php';
}
//-------------
+ $dom_graph_id = 'graph';
+
if(($graphtype == GRAPH_TYPE_PIE) || ($graphtype == GRAPH_TYPE_EXPLODED)){
$row = "\n".'<script language="javascript" type="text/javascript">
<!--
@@ -283,7 +285,7 @@ include_once 'include/page_header.php';
else ZBX_G_WIDTH=document.body.clientWidth;
ZBX_G_WIDTH-='.($shiftXleft+$shiftXright+10).';
- document.write(\'<img id="graph" src="chart6.php?graphid='.$_REQUEST['graphid'].url_param('stime').
+ document.write(\'<img id="'.$dom_graph_id.'" src="chart6.php?graphid='.$_REQUEST['graphid'].url_param('stime').
'&period='.$effectiveperiod.'&width=\'+ZBX_G_WIDTH+\'" /><br /><br />\');
-->
</script>'."\n";
@@ -291,14 +293,15 @@ include_once 'include/page_header.php';
else{
$row = "\n".'<script language="javascript" type="text/javascript">
<!--
- var ZBX_GZ_shiftT = 17;
- var ZBX_GZ_shiftL = '.$shiftXleft.';
+ A_SBOX["'.$dom_graph_id.'"] = new Object;
+ A_SBOX["'.$dom_graph_id.'"].shiftT = 17;
+ A_SBOX["'.$dom_graph_id.'"].shiftL = '.$shiftXleft.';
var ZBX_G_WIDTH;
if(window.innerWidth) ZBX_G_WIDTH=window.innerWidth;
else ZBX_G_WIDTH=document.body.clientWidth;
ZBX_G_WIDTH-='.($shiftXleft+$shiftXright+10).';
- document.write(\'<img id="graph" src="chart2.php?graphid='.$_REQUEST['graphid'].url_param('stime').
+ document.write(\'<img id="'.$dom_graph_id.'" src="chart2.php?graphid='.$_REQUEST['graphid'].url_param('stime').
'&period='.$effectiveperiod.'&width=\'+ZBX_G_WIDTH+\'" /><br /><br />\');
-->
</script>'."\n";
@@ -320,7 +323,7 @@ include_once 'include/page_header.php';
$script = 'scrollinit(0,0,0,'.$effectiveperiod.','.$stime.',0,'.$bstime.');
showgraphmenu("graph");
- graph_zoom_init('.$bstime.','.$effectiveperiod.',ZBX_G_WIDTH,'.$graph_height.');
+ graph_zoom_init("'.$dom_graph_id.'",'.$bstime.','.$effectiveperiod.',ZBX_G_WIDTH,'.$graph_height.');
';
zbx_add_post_js($script);