summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/maps.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/maps.inc.php')
-rw-r--r--frontends/php/include/maps.inc.php33
1 files changed, 13 insertions, 20 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;
+ }
}
}