summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-10-30 08:29:45 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-10-30 08:29:45 +0000
commita3cd41498a0a9daa007272aaa0cd53bdb0f51f48 (patch)
tree2c2380e9b790579ebb13aae03e2ccddbb3de6f19 /frontends/php
parent8899d79568c6e3e425d12327fbc87920d4cafe7d (diff)
downloadzabbix-a3cd41498a0a9daa007272aaa0cd53bdb0f51f48.tar.gz
zabbix-a3cd41498a0a9daa007272aaa0cd53bdb0f51f48.tar.xz
zabbix-a3cd41498a0a9daa007272aaa0cd53bdb0f51f48.zip
- always draw graphs for items having type "trapper" (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@3405 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/include/classes/graph.inc.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/frontends/php/include/classes/graph.inc.php b/frontends/php/include/classes/graph.inc.php
index a7ab9537..e36f96c8 100644
--- a/frontends/php/include/classes/graph.inc.php
+++ b/frontends/php/include/classes/graph.inc.php
@@ -217,7 +217,7 @@
$this->items[$this->num]["drawtype"] = is_null($drawtype) ? GRAPH_DRAW_TYPE_LINE : $drawtype;
$this->items[$this->num]["axisside"] = $axis;
$this->items[$this->num]["calc_fnc"] = $calc_fnc;
- $this->items[$this->num]["type"] = is_null($type) ? GRAPH_ITEM_SIMPLE : $type;
+ $this->items[$this->num]["calc_type"] = is_null($type) ? GRAPH_ITEM_SIMPLE : $type;
$this->items[$this->num]["periods_cnt"] = is_null($periods_cnt) ? 0 : $periods_cnt;
if($axis==GRAPH_YAXIS_SIDE_LEFT)
@@ -284,7 +284,7 @@
function getLastValue($num)
{
- $data = &$this->data[$this->items[$num]["itemid"]][$this->items[$num]["type"]];
+ $data = &$this->data[$this->items[$num]["itemid"]][$this->items[$num]["calc_type"]];
if(isset($data)) for($i=$this->sizeX-1;$i>=0;$i--)
{
if(isset($data->count[$i]) && ($data->count[$i] > 0))
@@ -545,7 +545,7 @@
for($i=0;$i<$this->num;$i++)
{
- if($this->items[$i]["type"] == GRAPH_ITEM_AGGREGATED)
+ if($this->items[$i]["calc_type"] == GRAPH_ITEM_AGGREGATED)
{
$fnc_name = "agr(".$this->items[$i]["periods_cnt"].")";
$color = $this->colors["HistoryMinMax"];
@@ -563,7 +563,7 @@
}
}
- $data = &$this->data[$this->items[$i]["itemid"]][$this->items[$i]["type"]];
+ $data = &$this->data[$this->items[$i]["itemid"]][$this->items[$i]["calc_type"]];
if(isset($data)&&isset($data->min))
{
$str=sprintf("%s: %s [%s] [min:%s max:%s last:%s]",
@@ -909,7 +909,7 @@
for($i=0; $i < $this->num; $i++)
{
- $type = $this->items[$i]["type"];
+ $type = $this->items[$i]["calc_type"];
if($type == GRAPH_ITEM_AGGREGATED) {
/* skip current period */
@@ -949,7 +949,7 @@
);
}
- $curr_data = &$this->data[$this->items[$i]["itemid"]][$type];
+ $curr_data = &$this->data[$this->items[$i]["itemid"]][$calc_type];
$curr_data->count = NULL;
$curr_data->min = NULL;
$curr_data->max = NULL;
@@ -1049,7 +1049,7 @@
{
if($this->items[$j]["axisside"] != $this->items[$i]["axisside"]) continue;
- $prev_data = &$this->data[$this->items[$j]["itemid"]][$this->items[$j]["type"]];
+ $prev_data = &$this->data[$this->items[$j]["itemid"]][$this->items[$j]["calc_type"]];
if(!isset($prev_data)) continue;
@@ -1168,11 +1168,11 @@
$minY = $this->m_minY[$this->items[$item]["axisside"]];
$maxY = $this->m_maxY[$this->items[$item]["axisside"]];
- $data = &$this->data[$this->items[$item]["itemid"]][$this->items[$item]["type"]];
+ $data = &$this->data[$this->items[$item]["itemid"]][$this->items[$item]["calc_type"]];
if(!isset($data)) continue;
- if($this->items[$item]["type"] == GRAPH_ITEM_AGGREGATED)
+ if($this->items[$item]["calc_type"] == GRAPH_ITEM_AGGREGATED)
{
$drawtype = GRAPH_DRAW_TYPE_LINE;
@@ -1209,9 +1209,12 @@
else
$draw = $diff < 4*$delay;
- if($draw == false && $this->items[$item]["type"] == GRAPH_ITEM_AGGREGATED)
+ if($draw == false && $this->items[$item]["calc_type"] == GRAPH_ITEM_AGGREGATED)
$draw = $i - $j < 5;
+ if($this->items[$item]["type"] == ITEM_TYPE_TRAPPER)
+ $draw = true;
+
if($draw)
{