From d31ab2fdc7a4e1629c62480005e7df1e9c412944 Mon Sep 17 00:00:00 2001 From: osmiy Date: Tue, 6 Mar 2007 12:36:19 +0000 Subject: - added 'UNKNOWN' status for elements of map (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@3871 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/sysmap.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'frontends/php/sysmap.php') diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 209d2779..703fdd8d 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -44,6 +44,7 @@ include_once "include/page_header.php"; "y"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535),'isset({save})'), "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})'), "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})'), @@ -82,8 +83,8 @@ include_once "include/page_header.php"; $result=update_sysmap_element($_REQUEST["selementid"], $_REQUEST["sysmapid"],$_REQUEST["elementid"],$_REQUEST["elementtype"], $_REQUEST["label"],$_REQUEST["x"],$_REQUEST["y"], - $_REQUEST["iconid_off"],$_REQUEST["url"],$_REQUEST["iconid_on"], - $_REQUEST["label_location"]); + $_REQUEST["iconid_off"],$_REQUEST["iconid_unknown"],$_REQUEST["iconid_on"], + $_REQUEST["url"],$_REQUEST["label_location"]); $selementid = $_REQUEST["selementid"]; show_messages($result,"Element updated","Cannot update element"); @@ -92,8 +93,8 @@ include_once "include/page_header.php"; { // add element $result=add_element_to_sysmap($_REQUEST["sysmapid"],$_REQUEST["elementid"], $_REQUEST["elementtype"],$_REQUEST["label"],$_REQUEST["x"],$_REQUEST["y"], - $_REQUEST["iconid_off"],$_REQUEST["url"],$_REQUEST["iconid_on"], - $_REQUEST["label_location"]); + $_REQUEST["iconid_off"],$_REQUEST["iconid_unknown"],$_REQUEST["iconid_on"], + $_REQUEST["url"],$_REQUEST["label_location"]); $selementid = $result; show_messages($result,"Element added","Cannot add element"); @@ -186,7 +187,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_ON,S_ICON_OFF)); + $table->SetHeader(array(S_LABEL,S_TYPE,S_X,S_Y,S_ICON_OFF,S_ICON_ON,S_ICON_UNKNOWN)); $db_elements = DBselect("select * from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"]. " order by label"); @@ -208,8 +209,9 @@ include_once "include/page_header.php"; nbsp($type), $db_element["x"], $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_off"],"no image",NULL) + new CImg("image.php?height=24&imageid=".$db_element["iconid_unknown"],"no image",NULL) )); } $table->show(); -- cgit