summaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-08-07 13:13:17 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-08-07 13:13:17 +0000
commitffc8bae784cb1b13550976b7fff1d419bbd1798a (patch)
treefcd7b5cd7ea43649f6b69d7ded741a7e485e1003 /frontends
parent62fb63386a74c097ca7b92c982f0067399827f8c (diff)
downloadzabbix-ffc8bae784cb1b13550976b7fff1d419bbd1798a.tar.gz
zabbix-ffc8bae784cb1b13550976b7fff1d419bbd1798a.tar.xz
zabbix-ffc8bae784cb1b13550976b7fff1d419bbd1798a.zip
- fixed count of problems displayin for submaps (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3101 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-rw-r--r--frontends/php/include/maps.inc.php33
-rw-r--r--frontends/php/map.php2
2 files changed, 14 insertions, 21 deletions
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 831dbeab..8e2e64ce 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -229,11 +229,7 @@
$element = DBfetch($elements);
if(!$element) return FALSE;
- $status = "off";
- if(get_info_by_selementid($element["selementid"],$info,$color)!="")
- $status = "on";
-
- if($status == "on")
+ if(get_info_by_selementid($element["selementid"],$info,$color) == 0)
$icon = $element["icon_on"];
else
$icon = $element["icon"];
@@ -248,8 +244,8 @@
global $colors;
$count = 0;
- $info = "OK";
- $color= $colors["Dark Green"];
+ $info = S_OK_BIG;
+ $color = $colors["Dark Green"];
$db_element = get_sysmaps_element_by_selementid($selementid);
if($db_element["elementtype"]==SYSMAP_ELEMENT_TYPE_HOST)
@@ -260,7 +256,6 @@
" and f.triggerid=t.triggerid and t.value=1 and t.status=0".
" and h.status=".HOST_STATUS_MONITORED." and i.status=0");
- $count=0;
$trigger = DBfetch($db_triggers);
if($trigger)
{
@@ -278,11 +273,6 @@
$color = $colors["Gray"];
$info = "template";
}
- else
- {
- $info = S_OK_BIG;
- $color = $colors["Dark Green"];
- }
}
}
elseif($db_element["elementtype"]==SYSMAP_ELEMENT_TYPE_MAP)
@@ -291,13 +281,12 @@
" where sysmapid=".$db_element["elementid"]);
while($db_subelement = DBfetch($db_subelements))
{// recursion
- $count += get_info_by_selementid($db_subelement["selementid"],$info,$color);
- }
-
- if($count==0)
- {
- $info = S_OK_BIG;
- $color = $colors["Dark Green"];
+ if(($curr_count = get_info_by_selementid($db_subelement["selementid"],$curr_info,$curr_color)) > 0)
+ {
+ $count += $curr_count;
+ $info = $curr_info;
+ $color = $curr_color;
+ }
}
}
elseif($db_element["elementtype"]==SYSMAP_ELEMENT_TYPE_IMAGE)
@@ -310,6 +299,10 @@
$color=$colors["Red"];
$count = 1;
}
+ else
+ {
+ $info=S_FALSE_BIG;
+ }
}
}
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 84b2d086..492025ae 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -212,7 +212,7 @@
}
}
- get_info_by_selementid($db_element["selementid"],$info_line, $color, $colors);
+ get_info_by_selementid($db_element["selementid"],$info_line, $color);
if($label_line=="" && $info_line=="") continue;