summaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-01 15:22:18 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-01 15:22:18 +0000
commit952a05bef085325923c141e15b0fb88aaf5262ee (patch)
tree5719968dc76637180f36b2bc4d1c67ef490d9f67 /frontends
parente040ad4ad0dbec022158c000590ee7eb5b412a66 (diff)
downloadzabbix-952a05bef085325923c141e15b0fb88aaf5262ee.tar.gz
zabbix-952a05bef085325923c141e15b0fb88aaf5262ee.tar.xz
zabbix-952a05bef085325923c141e15b0fb88aaf5262ee.zip
- [DEV-195] added support of source ip address
git-svn-id: svn://svn.zabbix.com/trunk@5864 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-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
-rw-r--r--frontends/php/map.php2
-rw-r--r--frontends/php/sysmap.php10
5 files changed, 32 insertions, 11 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
{
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 4f0888ec..f88e7565 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -200,7 +200,7 @@ include_once "include/page_header.php";
$label_line=$host["ip"];
if( $host["status"] == HOST_STATUS_NOT_MONITORED )
- $label_color=$darkred;
+ $label_color = $gray;
}
if($label_line=="" && $info_line=="") continue;
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index e963cfed..f4d3cbf5 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -45,6 +45,7 @@ include_once "include/page_header.php";
"iconid_off"=> array(T_ZBX_INT, O_OPT, NULL, DB_ID, 'isset({save})'),
"iconid_on"=> array(T_ZBX_INT, O_OPT, NULL, DB_ID, 'isset({save})'),
"iconid_unknown"=> array(T_ZBX_INT, O_OPT, NULL, DB_ID, 'isset({save})'),
+ "iconid_disabled"=> array(T_ZBX_INT, O_OPT, NULL, DB_ID, 'isset({save})'),
"url"=> array(T_ZBX_STR, O_OPT, NULL, NULL, 'isset({save})'),
"label_location"=>array(T_ZBX_INT, O_OPT, NULL, IN("-1,0,1,2,3"),'isset({save})'),
@@ -81,7 +82,7 @@ include_once "include/page_header.php";
$_REQUEST["sysmapid"],$_REQUEST["elementid"],$_REQUEST["elementtype"],
$_REQUEST["label"],$_REQUEST["x"],$_REQUEST["y"],
$_REQUEST["iconid_off"],$_REQUEST["iconid_unknown"],$_REQUEST["iconid_on"],
- $_REQUEST["url"],$_REQUEST["label_location"]);
+ $_REQUEST["iconid_disabled"],$_REQUEST["url"],$_REQUEST["label_location"]);
$selementid = $_REQUEST["selementid"];
show_messages($result,"Element updated","Cannot update element");
@@ -91,7 +92,7 @@ include_once "include/page_header.php";
$result=add_element_to_sysmap($_REQUEST["sysmapid"],$_REQUEST["elementid"],
$_REQUEST["elementtype"],$_REQUEST["label"],$_REQUEST["x"],$_REQUEST["y"],
$_REQUEST["iconid_off"],$_REQUEST["iconid_unknown"],$_REQUEST["iconid_on"],
- $_REQUEST["url"],$_REQUEST["label_location"]);
+ $_REQUEST["iconid_disabled"],$_REQUEST["url"],$_REQUEST["label_location"]);
$selementid = $result;
show_messages($result,"Element added","Cannot add element");
@@ -173,7 +174,7 @@ include_once "include/page_header.php";
"return redirect('".$page["file"]."?form=add_element".url_param("sysmapid")."');"));
$table = new CTableInfo();
- $table->SetHeader(array(S_LABEL,S_TYPE,S_X,S_Y,S_ICON_OFF,S_ICON_ON,S_ICON_UNKNOWN));
+ $table->SetHeader(array(S_LABEL,S_TYPE,S_X,S_Y,S_ICON_OFF,S_ICON_ON,S_ICON_UNKNOWN,S_ICON_DISABLED));
$db_elements = DBselect("select * from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"].
" order by label");
@@ -196,7 +197,8 @@ include_once "include/page_header.php";
$db_element["y"],
new CImg("image.php?height=24&imageid=".$db_element["iconid_off"],"no image",NULL),
new CImg("image.php?height=24&imageid=".$db_element["iconid_on"],"no image",NULL),
- new CImg("image.php?height=24&imageid=".$db_element["iconid_unknown"],"no image",NULL)
+ new CImg("image.php?height=24&imageid=".$db_element["iconid_unknown"],"no image",NULL),
+ new CImg("image.php?height=24&imageid=".$db_element["iconid_disabled"],"no image",NULL)
));
}
$table->show();