diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-14 12:26:49 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-14 12:26:49 +0000 |
commit | d144df19e9190a100f3d12a2e70c0637f0bda38d (patch) | |
tree | f7b9e5d1aeba8ee1a89a84c78e681ab24d526692 /frontends/php/discoveryconf.php | |
parent | 1562339df0317816bbbee60d1478234e58d4f6f8 (diff) | |
download | zabbix-d144df19e9190a100f3d12a2e70c0637f0bda38d.tar.gz zabbix-d144df19e9190a100f3d12a2e70c0637f0bda38d.tar.xz zabbix-d144df19e9190a100f3d12a2e70c0637f0bda38d.zip |
updated frontend for new discovefy
git-svn-id: svn://svn.zabbix.com/trunk@4011 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/discoveryconf.php')
-rw-r--r-- | frontends/php/discoveryconf.php | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/frontends/php/discoveryconf.php b/frontends/php/discoveryconf.php index 47d1e02a..62fe233e 100644 --- a/frontends/php/discoveryconf.php +++ b/frontends/php/discoveryconf.php @@ -34,14 +34,9 @@ include_once "include/page_header.php"; $fields=array( "druleid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, '{form}=="update"'), "name"=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), - "ipfirst"=> array(T_ZBX_IP, O_OPT, null, NOT_EMPTY, 'isset({save})'), - "iplast"=> array(T_ZBX_IP, O_OPT, null, NOT_EMPTY, '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})'), - "upevent"=> array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), - "downevent"=> array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), - "svcupevent"=> array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), - "svcdownevent"=>array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), "g_druleid"=> array(T_ZBX_INT, O_OPT, null, DB_ID, null), @@ -97,9 +92,8 @@ 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['ipfirst'], $_REQUEST['iplast'], - $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['upevent'], $_REQUEST['downevent'], - $_REQUEST['svcupevent'], $_REQUEST['svcdownevent'], $_REQUEST['dchecks']); + $result = update_discovery_rule($_REQUEST["druleid"], $_REQUEST['name'], $_REQUEST['iprange'], + $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['dchecks']); $druleid = $_REQUEST["druleid"]; } @@ -108,9 +102,8 @@ 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['ipfirst'], $_REQUEST['iplast'], - $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['upevent'], $_REQUEST['downevent'], - $_REQUEST['svcupevent'], $_REQUEST['svcdownevent'], $_REQUEST['dchecks']); + $druleid = add_discovery_rule($_REQUEST['name'], $_REQUEST['iprange'], + $_REQUEST['delay'], $_REQUEST['status'], $_REQUEST['dchecks']); $result = $druleid; } @@ -203,10 +196,8 @@ include_once "include/page_header.php"; array( new CCheckBox('all_drules',null,"CheckAll('".$form->GetName()."','all_drules');"), S_NAME ), - S_IP_FIRST, - S_IP_LAST, + S_IP_RANGE, S_DELAY, - S_INTERVALS.' (up/down)', S_CHECKS, S_STATUS)); @@ -222,11 +213,6 @@ include_once "include/page_header.php"; $cheks[] = discovery_check_type2str($check_data['type']); } - $intervals = '[host]('.($rule_data['upevent'] / (60*60)). - '/'.($rule_data['downevent'] / (60*60)). - ') [service]('.($rule_data['svcupevent'] / (60*60)). - '/'.($rule_data['svcdownevent'] / (60*60)).')'; - $status = new CCol(new CLink(discovery_status2str($rule_data["status"]), '?g_druleid%5B%5D='.$rule_data['druleid']. ($rule_data["status"] == DRULE_STATUS_ACTIVE ? '&group_disable=1' : '&group_enable=1'), @@ -243,10 +229,8 @@ include_once "include/page_header.php"; new CLink($rule_data['name'], "?form=update&druleid=".$rule_data['druleid'],'action'), ), - $rule_data['ipfirst'], - $rule_data['iplast'], + $rule_data['iprange'], $rule_data['delay'], - $intervals, implode(',', $cheks), $status )); |