diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-12 09:16:34 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-12 09:16:34 +0000 |
| commit | cc3ab52e16eb4c908f69f23b159293df6bac3f23 (patch) | |
| tree | c5d8acb73eef41594c3b90ec42b43d85f206fcc7 /frontends/php/config.php | |
| parent | 95036b5d466fb31448afc4c429968ee2fe64ba5e (diff) | |
- [DEV-45][DEV-47] merged rev. 4859:4861,4864:4865 of branches/1.4.j/ (Artem) [changed design of status of Trigger screen, added bulk acknowledge]
git-svn-id: svn://svn.zabbix.com/trunk@4866 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/config.php')
| -rw-r--r-- | frontends/php/config.php | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php index f70a5583..b780242d 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -34,7 +34,7 @@ include_once "include/page_header.php"; $fields=array( // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION - "config"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,3,5,6,7"), NULL), + "config"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,3,5,6,7,8"), NULL), // other form "alert_history"=> array(T_ZBX_INT, O_NO, NULL, BETWEEN(0,65535), 'isset({config})&&({config}==0)&&isset({save})'), @@ -61,6 +61,9 @@ include_once "include/page_header.php"; "save"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "delete"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), "cancel"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), +/* acknowledges */ + 'ack_enable'=> array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, IN("0,1"), 'isset({config})&&({config}==8)&&isset({save})'), + 'ack_expire'=> array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(1,65535), 'isset({config})&&({config}==8)&&isset({save})'), /* other */ "form"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), "form_refresh"=> array(T_ZBX_INT, O_OPT, NULL, NULL, NULL) @@ -123,6 +126,34 @@ include_once "include/page_header.php"; unset($image, $_REQUEST["imageid"]); } } + elseif(isset($_REQUEST["save"]) && ($_REQUEST["config"]==8)){ + if(count(get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_MODE_LT,PERM_RES_IDS_ARRAY,get_current_nodeid()))) + access_deny(); + +/* OTHER ACTIONS */ + $result=update_config( + get_request('event_history'), + get_request('alert_history'), + get_request('refresh_unsupported'), + get_request('work_period'), + get_request('alert_usrgrpid'), + get_request('ack_enable'), + get_request('ack_expire') + ); + + show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED); + + if($result) + { + $msg = array(); + if(!is_null($val = get_request('ack_enable'))) + $msg[] = S_EVENT_ACKNOWLEDGES.' ['.($val?(S_DISABLED):(S_ENABLED)).']'; + if(!is_null($val = get_request('ack_expire'))) + $msg[] = S_SHOW_EVENTS_NOT_OLDER.SPACE.'('.S_DAYS.')'.' ['.$val.']'; + + add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_ZABBIX_CONFIG,implode('; ',$msg)); + } + } elseif(isset($_REQUEST["save"])&&in_array($_REQUEST["config"],array(0,5,7))) { @@ -135,7 +166,10 @@ include_once "include/page_header.php"; get_request('alert_history'), get_request('refresh_unsupported'), get_request('work_period'), - get_request('alert_usrgrpid')); + get_request('alert_usrgrpid'), + get_request('ack_enable'), + get_request('ack_expire') + ); show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED); if($result) @@ -258,6 +292,7 @@ include_once "include/page_header.php"; // $cmbConfig->AddItem(4,S_AUTOREGISTRATION); $cmbConfig->AddItem(6,S_VALUE_MAPPING); $cmbConfig->AddItem(7,S_WORKING_TIME); + $cmbConfig->AddItem(8,S_ACKNOWLEDGES); $cmbConfig->AddItem(5,S_OTHER); $form->AddItem($cmbConfig); switch($_REQUEST["config"]) @@ -288,6 +323,10 @@ include_once "include/page_header.php"; { insert_work_period_form(); } + elseif($_REQUEST["config"]==8) + { + insert_event_ack_form(); + } elseif($_REQUEST["config"]==3) { if(isset($_REQUEST["form"])) |
