diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-30 16:13:15 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-30 16:13:15 +0000 |
commit | 17a5d0466494cc294345eebddba054a27da7e49d (patch) | |
tree | bdba49bf80d812ac79203a1df36d6615dcb10381 /frontends/php/map.php | |
parent | 52ba9f54e0d36442deb5b4b0ce5c713de7b8ea30 (diff) | |
download | zabbix-17a5d0466494cc294345eebddba054a27da7e49d.tar.gz zabbix-17a5d0466494cc294345eebddba054a27da7e49d.tar.xz zabbix-17a5d0466494cc294345eebddba054a27da7e49d.zip |
- [DEV-52] added "Unlimited number of link styles for maps" (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5123 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/map.php')
-rw-r--r-- | frontends/php/map.php | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/frontends/php/map.php b/frontends/php/map.php index 83aaeb27..c4541119 100644 --- a/frontends/php/map.php +++ b/frontends/php/map.php @@ -139,16 +139,23 @@ include_once "include/page_header.php"; $drawtype = $link["drawtype_off"]; $color = $colors[$link["color_off"]]; - if(!is_null($link["triggerid"])) - { - $trigger=get_trigger_by_triggerid($link["triggerid"]); -// if($trigger["value"] == TRIGGER_VALUE_TRUE) - if($trigger["status"] == TRIGGER_STATUS_ENABLED && $trigger["value"] == TRIGGER_VALUE_TRUE) - { - $drawtype = $link["drawtype_on"]; - $color = $colors[$link["color_on"]]; + $triggers = get_link_triggers($link['linkid']); + + + if(!empty($triggers)){ + $max_severity=0; + foreach($triggers as $id => $link_trigger){ + $triggers[$id]=array_merge($link_trigger,get_trigger_by_triggerid($link_trigger["triggerid"])); + if($triggers[$id]["status"] == TRIGGER_STATUS_ENABLED && $triggers[$id]["value"] == TRIGGER_VALUE_TRUE){ + if(($triggers[$id]['severity'] >= $max_severity)){ + $drawtype = $triggers[$id]["drawtype"]; + $color = $colors[$triggers[$id]['color']]; + $max_severity=$triggers[$id]['severity']; + } + } } } + MyDrawLine($im,$x1,$y1,$x2,$y2,$color,$drawtype); } |