summaryrefslogtreecommitdiffstats
path: root/frontends/php/actionconf.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-18 12:32:02 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-18 12:32:02 +0000
commit4f1f420a91e557c2ab4a7ff9605fba260931bbdc (patch)
tree48ff179492d1d1ae1d93061ec618392d281fef3a /frontends/php/actionconf.php
parent01e94d67317be183b74fa97bd3d15ee99ab27d69 (diff)
downloadzabbix-4f1f420a91e557c2ab4a7ff9605fba260931bbdc.tar.gz
zabbix-4f1f420a91e557c2ab4a7ff9605fba260931bbdc.tar.xz
zabbix-4f1f420a91e557c2ab4a7ff9605fba260931bbdc.zip
- [DEV-171] improvements to escalation form (Artem)
- [DEV-137] small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5778 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actionconf.php')
-rw-r--r--frontends/php/actionconf.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php
index c8f4fada..753790fe 100644
--- a/frontends/php/actionconf.php
+++ b/frontends/php/actionconf.php
@@ -42,10 +42,11 @@ include_once 'include/page_header.php';
'actionid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null),
'name'=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'),
- 'eventsource'=> array(T_ZBX_INT, O_MAND, null, IN(array(EVENT_SOURCE_TRIGGERS,EVENT_SOURCE_DISCOVERY)), null),
- 'evaltype'=> array(T_ZBX_INT, O_OPT, null, IN(array(ACTION_EVAL_TYPE_AND_OR,ACTION_EVAL_TYPE_AND,ACTION_EVAL_TYPE_OR)), 'isset({save})'),
- 'esc_period'=> array(T_ZBX_INT, O_OPT, null, NOT_EMPTY, 'isset({save})'),
- 'status'=> array(T_ZBX_INT, O_OPT, null, IN(array(ACTION_STATUS_ENABLED,ACTION_STATUS_DISABLED)), 'isset({save})'),
+ 'eventsource'=> array(T_ZBX_INT, O_MAND, null, IN(array(EVENT_SOURCE_TRIGGERS,EVENT_SOURCE_DISCOVERY)), null),
+ 'evaltype'=> array(T_ZBX_INT, O_OPT, null, IN(array(ACTION_EVAL_TYPE_AND_OR,ACTION_EVAL_TYPE_AND,ACTION_EVAL_TYPE_OR)), 'isset({save})'),
+ 'esc_period'=> array(T_ZBX_INT, O_OPT, null, BETWEEN(60,999999), 'isset({save})&&isset({escalation})'),
+ 'escalation'=> array(T_ZBX_INT, O_OPT, null, IN("0,1"), null),
+ 'status'=> array(T_ZBX_INT, O_OPT, null, IN(array(ACTION_STATUS_ENABLED,ACTION_STATUS_DISABLED)), 'isset({save})'),
'def_shortdata'=> array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'),
'def_longdata'=> array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'),
@@ -138,13 +139,15 @@ include_once 'include/page_header.php';
unset($_REQUEST['new_opcondition']);
}
else if(isset($_REQUEST['save'])){
- if(!count(get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_RES_IDS_ARRAY,get_current_nodeid())))
+ if(!count(get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_RES_IDS_ARRAY)))
access_deny();
$_REQUEST['recovery_msg'] = get_request('recovery_msg',0);
$_REQUEST['r_shortdata'] = get_request('r_shortdata','');
$_REQUEST['r_longdata'] = get_request('r_longdata','');
+ if(!isset($_REQUEST['escalation'])) $_REQUEST['esc_period'] = 0;
+
$conditions = get_request('conditions', array());
$operations = get_request('operations', array());