本文整理汇总了PHP中CEvent::acknowledge方法的典型用法代码示例。如果您正苦于以下问题:PHP CEvent::acknowledge方法的具体用法?PHP CEvent::acknowledge怎么用?PHP CEvent::acknowledge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEvent
的用法示例。
在下文中一共展示了CEvent::acknowledge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zbx_toObject
$_REQUEST['events'] = $_REQUEST['eventid'];
}
if (isset($_REQUEST['save']) || isset($_REQUEST['saveandreturn'])) {
if ($bulk) {
$_REQUEST['message'] .= ($_REQUEST['message'] == '' ? '' : "\n\r") . S_SYS_BULK_ACKNOWLEDGE;
}
if (isset($_REQUEST['events'])) {
$_REQUEST['events'] = zbx_toObject($_REQUEST['events'], 'eventid');
} else {
if (isset($_REQUEST['triggers'])) {
$options = array('output' => API_OUTPUT_SHORTEN, 'acknowledged' => 0, 'triggerids' => $_REQUEST['triggers']);
$_REQUEST['events'] = CEvent::get($options);
}
}
$eventsData = array('eventids' => zbx_objectValues($_REQUEST['events'], 'eventid'), 'message' => $_REQUEST['message']);
$result = CEvent::acknowledge($eventsData);
show_messages($result, S_EVENT_ACKNOWLEDGED, S_CANNOT_ACKNOWLEDGE_EVENT);
if ($result) {
$event_acknowledged = true;
add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_TRIGGER, S_ACKNOWLEDGE_ADDED . ' [' . $bulk ? ' BULK ACKNOWLEDGE ' : expand_trigger_description_by_data($event_trigger) . ']' . ' [' . $_REQUEST['message'] . ']');
}
if (isset($_REQUEST['saveandreturn'])) {
$url = new CUrl(urldecode($_REQUEST['backurl']));
jsRedirect($url->getUrl());
exit;
}
}
$msg = $bulk ? ' BULK ACKNOWLEDGE ' : expand_trigger_description_by_data($event_trigger);
show_table_header(array(S_ALARM_ACKNOWLEDGES_BIG . ': ', $msg));
print SBR;
if ($bulk) {