summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/forms.inc.php5
-rw-r--r--frontends/php/include/locales/en_gb.inc.php1
-rw-r--r--frontends/php/include/maps.inc.php25
3 files changed, 25 insertions, 6 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 7695326e..1ab553a8 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -4921,6 +4921,7 @@
$iconid_off = $element["iconid_off"];
$iconid_on = $element["iconid_on"];
$iconid_unknown = $element["iconid_unknown"];
+ $iconid_disabled= $element["iconid_disabled"];
$label_location = $element["label_location"];
if(is_null($label_location)) $label_location = -1;
}
@@ -4935,6 +4936,7 @@
$iconid_off = get_request("iconid_off", 0);
$iconid_on = get_request("iconid_on", 0);
$iconid_unknown = get_request("iconid_unknown", 0);
+ $iconid_disabled= get_request("iconid_disabled",0);
$label_location = get_request("label_location", "-1");
}
@@ -5073,6 +5075,7 @@
$cmbIconOff = new CComboBox("iconid_off",$iconid_off);
$cmbIconOn = new CComboBox("iconid_on",$iconid_on);
$cmbIconUnknown = new CComboBox("iconid_unknown",$iconid_unknown);
+ $cmbIconDisabled= new CComboBox("iconid_disabled",$iconid_disabled);
$result = DBselect('SELECT * FROM images WHERE imagetype=1 AND '.DBin_node('imageid').' order by name');
while($row=DBfetch($result)){
@@ -5081,11 +5084,13 @@
$cmbIconOff->AddItem($row["imageid"],$row["name"]);
$cmbIconOn->AddItem($row["imageid"],$row["name"]);
$cmbIconUnknown->AddItem($row["imageid"],$row["name"]);
+ $cmbIconDisabled->AddItem($row["imageid"],$row["name"]);
}
$frmEl->AddRow(S_ICON_OFF,$cmbIconOff);
$frmEl->AddRow(S_ICON_ON,$cmbIconOn);
$frmEl->AddRow(S_ICON_UNKNOWN,$cmbIconUnknown);
+ $frmEl->AddRow(S_ICON_DISABLED,$cmbIconDisabled);
$frmEl->AddRow(S_COORDINATE_X, new CNumericBox("x", $x, 5));
$frmEl->AddRow(S_COORDINATE_Y, new CNumericBox("y", $y, 5));
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index e6708693..2261db20 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -921,6 +921,7 @@
'S_ICON_ON'=> 'Icon (on)',
'S_ICON_OFF'=> 'Icon (off)',
'S_ICON_UNKNOWN'=> 'Icon (unknown)',
+ 'S_ICON_DISABLED'=> 'Icon (disabled)',
'S_ELEMENT_1'=> 'Element 1',
'S_ELEMENT_2'=> 'Element 2',
'S_LINK_STATUS_INDICATOR'=> 'Link status indicator',
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 5754b0d2..ea87f386 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -313,7 +313,7 @@
# Add Element to system map
function add_element_to_sysmap($sysmapid,$elementid,$elementtype,
- $label,$x,$y,$iconid_off,$iconid_unknown,$iconid_on,$url,$label_location)
+ $label,$x,$y,$iconid_off,$iconid_unknown,$iconid_on,$iconid_disabled,$url,$label_location)
{
if($label_location<0) $label_location='null';
if(check_circle_elements_link($sysmapid,$elementid,$elementtype))
@@ -325,10 +325,10 @@
$selementid = get_dbid("sysmaps_elements","selementid");
$result=DBexecute('INSERT INTO sysmaps_elements '.
- " (selementid,sysmapid,elementid,elementtype,label,x,y,iconid_off,url,iconid_on,label_location,iconid_unknown)".
+ " (selementid,sysmapid,elementid,elementtype,label,x,y,iconid_off,url,iconid_on,label_location,iconid_unknown,iconid_disabled)".
" VALUES ($selementid,$sysmapid,$elementid,$elementtype,".zbx_dbstr($label).
",$x,$y,$iconid_off,".zbx_dbstr($url).
- ",$iconid_on,$label_location,$iconid_unknown)");
+ ",$iconid_on,$label_location,$iconid_unknown,$iconid_disabled)");
if(!$result)
return $result;
@@ -339,7 +339,7 @@
# Update Element FROM system map
function update_sysmap_element($selementid,$sysmapid,$elementid,$elementtype,
- $label,$x,$y,$iconid_off,$iconid_unknown,$iconid_on,$url,$label_location)
+ $label,$x,$y,$iconid_off,$iconid_unknown,$iconid_on,$iconid_disabled,$url,$label_location)
{
if($label_location<0) $label_location='null';
if(check_circle_elements_link($sysmapid,$elementid,$elementtype))
@@ -352,7 +352,8 @@
"SET elementid=$elementid,elementtype=$elementtype,".
"label=".zbx_dbstr($label).",x=$x,y=$y,iconid_off=$iconid_off,".
"url=".zbx_dbstr($url).",iconid_on=$iconid_on,".
- "label_location=$label_location,iconid_unknown=$iconid_unknown".
+ "label_location=$label_location,iconid_unknown=$iconid_unknown,".
+ "iconid_disabled=$iconid_disabled".
" WHERE selementid=$selementid");
}
@@ -536,6 +537,14 @@
$tr_info[TRIGGER_VALUE_UNKNOWN]['count'] = 1;
$tr_info[TRIGGER_VALUE_UNKNOWN]['priority'] = 0;
$tr_info[TRIGGER_VALUE_UNKNOWN]['info'] = S_TEMPLATE_SMALL;
+ $tr_info[TRIGGER_VALUE_UNKNOWN]['host_status'] = $host["status"];
+ }
+ elseif($host["status"] == HOST_STATUS_NOT_MONITORED)
+ {
+ $tr_info[TRIGGER_VALUE_UNKNOWN]['count'] = 0;
+ $tr_info[TRIGGER_VALUE_UNKNOWN]['priority'] = 0;
+ $tr_info[TRIGGER_VALUE_UNKNOWN]['info'] = S_DISABLED_BIG;
+ $tr_info[TRIGGER_VALUE_UNKNOWN]['host_status'] = $host["status"];
}
else
{
@@ -547,6 +556,7 @@
}
elseif($el_type==SYSMAP_ELEMENT_TYPE_MAP)
{
+ SDI("5");
$db_map = DBfetch(DBselect('select name FROM sysmaps WHERE sysmapid='.$db_element["elementid"]));
$el_name = $db_map['name'];
@@ -598,7 +608,10 @@
$out['info'] = $inf['info'];
$out['color'] = $colors['Gray'];
- $out['iconid'] = $db_element['iconid_unknown'];
+ if (isset($inf['host_status']) && $inf['host_status'] == HOST_STATUS_NOT_MONITORED)
+ $out['iconid'] = $db_element['iconid_disabled'];
+ else
+ $out['iconid'] = $db_element['iconid_unknown'];
}
else
{