diff options
author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-02-28 15:26:46 +0000 |
---|---|---|
committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-02-28 15:26:46 +0000 |
commit | 5ab023e55f2ba605336a5931916fa6acb08ae90f (patch) | |
tree | d845ddbab426835d74aad499e3bb5a6d7d3288f3 /frontends/php/discoveryconf.php | |
parent | d40b9c8636d4838ae6284f60c82c5b67f4bc6954 (diff) | |
download | zabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.tar.gz zabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.tar.xz zabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.zip |
- [DEV-108] GUI - Discovery
git-svn-id: svn://svn.zabbix.com/trunk@5413 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/discoveryconf.php')
-rw-r--r-- | frontends/php/discoveryconf.php | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/frontends/php/discoveryconf.php b/frontends/php/discoveryconf.php index 56f6d22d..313605d2 100644 --- a/frontends/php/discoveryconf.php +++ b/frontends/php/discoveryconf.php @@ -35,6 +35,7 @@ include_once "include/page_header.php"; $fields=array( "druleid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, 'isset({form})&&{form}=="update"'), "name"=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), + 'proxyid'=> array(T_ZBX_INT, O_OPT, null, DB_ID, 'isset({save})'), "iprange"=> array(T_ZBX_IP_RANGE, O_OPT, null, NOT_EMPTY, 'isset({save})'), "delay"=> array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), "status"=> array(T_ZBX_INT, O_OPT, null, IN("0,1"), 'isset({save})'), @@ -99,7 +100,7 @@ include_once "include/page_header.php"; $msg_ok = S_DISCOVERY_RULE_UPDATED; $msg_fail = S_CANNOT_UPDATE_DISCOVERY_RULE; - $result = update_discovery_rule($_REQUEST["druleid"], $_REQUEST['name'], $_REQUEST['iprange'], + $result = update_discovery_rule($_REQUEST["druleid"], $_REQUEST["proxyid"], $_REQUEST['name'], $_REQUEST['iprange'], $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['dchecks']); $druleid = $_REQUEST["druleid"]; @@ -109,7 +110,7 @@ include_once "include/page_header.php"; $msg_ok = S_DISCOVERY_RULE_ADDED; $msg_fail = S_CANNOT_ADD_DISCOVERY_RULE; - $druleid = add_discovery_rule($_REQUEST['name'], $_REQUEST['iprange'], + $druleid = add_discovery_rule($_REQUEST["proxyid"], $_REQUEST['name'], $_REQUEST['iprange'], $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['dchecks']); $result = $druleid; @@ -230,17 +231,37 @@ include_once "include/page_header.php"; ($rule_data["status"] == DRULE_STATUS_ACTIVE ? '&group_disable=1' : '&group_enable=1'), discovery_status2style($rule_data["status"]))); - $tblDiscovery->AddRow(array( - array( + $description = array(); + + if ($rule_data["proxyid"]) { + $proxy = get_proxy_by_proxyid($rule_data["proxyid"]); + array_push($description, $proxy["name"], ":"); + } + + array_push($description, + new CLink($rule_data['name'], "?form=update&druleid=".$rule_data['druleid'],'action')); + + $drule=new CCol(array( new CCheckBox( "g_druleid[]", /* name */ null, /* checked */ null, /* action */ $rule_data["druleid"]), /* value */ SPACE, + $description)); + + $tblDiscovery->AddRow(array( + $drule, +/* array( + new CCheckBox( + "g_druleid[]", + null, + null, + $rule_data["druleid"]), + SPACE, new CLink($rule_data['name'], "?form=update&druleid=".$rule_data['druleid'],'action'), - ), + ),*/ $rule_data['iprange'], $rule_data['delay'], implode(',', $cheks), |