<?php /** * Observium * * This file is part of Observium. * * @package observium * @subpackage graphs * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited * */ if (is_numeric($vars['id']) && ($alert = get_alert_entry_by_id($vars['id']))) { $entity = get_entity_by_id_cache($alert['entity_type'], $alert['entity_id']); $device = device_by_id_cache($alert['device_id']); if (device_permitted($device['device_id']) || $auth) { $title = generate_device_link($device); $title_array = array(); $title_array[] = array('text' => $device['hostname'], 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id']))); $auth = TRUE; $rrd_filename = get_rrd_path($device, "alert-" . $alert['alert_table_id']); } } else { // error? }
if (isset($vars['ignore_until_ok']) && ($vars['ignore_until_ok'] == '1' || $entry['ignore_until_ok'] == '1')) { $update_state['ignore_until_ok'] = '1'; } else { $update_state['ignore_until_ok'] = '0'; } // 2019-12-05 23:30:00 if (isset($vars['ignore_until']) && $vars['ignore_until_enable']) { $update_state['ignore_until'] = $vars['ignore_until']; } else { $update_state['ignore_until'] = array('NULL'); } if (is_array($update_state)) { $up_s = dbUpdate($update_state, 'alert_table', '`alert_table_id` = ?', array($vars['alert_entry'])); } // Refresh array because we've changed the database. $entry = get_alert_entry_by_id($vars['alert_entry']); } // End actions humanize_alert_entry($entry); $alert_rules = cache_alert_rules(); $alert = $alert_rules[$entry['alert_test_id']]; $state = json_decode($entry['state'], TRUE); $conditions = json_decode($alert['conditions'], TRUE); $entity = get_entity_by_id_cache($entry['entity_type'], $entry['entity_id']); // r($entry); // r($alert); ?> <div class="row"> <div class="col-md-3"> <div class="box box-solid">