Merge branch 'ent-7582-anadir-selector-horas-eventos' into 'develop'
Ent 7582 anadir selector horas eventos Closes pandora_enterprise#7582 See merge request artica/pandorafms!4266
This commit is contained in:
commit
ce40b36923
|
@ -0,0 +1,6 @@
|
||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE `tevent_filter` ADD COLUMN `time_from` TIME NULL;
|
||||||
|
ALTER TABLE `tevent_filter` ADD COLUMN `time_to` TIME NULL;
|
||||||
|
|
||||||
|
COMMIT;
|
|
@ -252,7 +252,9 @@ if ($save_event_filter) {
|
||||||
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
||||||
$values['id_group_filter'] = get_parameter('id_group_filter');
|
$values['id_group_filter'] = get_parameter('id_group_filter');
|
||||||
$values['date_from'] = get_parameter('date_from');
|
$values['date_from'] = get_parameter('date_from');
|
||||||
|
$values['time_from'] = get_parameter('time_from');
|
||||||
$values['date_to'] = get_parameter('date_to');
|
$values['date_to'] = get_parameter('date_to');
|
||||||
|
$values['time_to'] = get_parameter('time_to');
|
||||||
$values['source'] = get_parameter('source');
|
$values['source'] = get_parameter('source');
|
||||||
$values['id_extra'] = get_parameter('id_extra');
|
$values['id_extra'] = get_parameter('id_extra');
|
||||||
$values['user_comment'] = get_parameter('user_comment');
|
$values['user_comment'] = get_parameter('user_comment');
|
||||||
|
@ -304,13 +306,15 @@ if ($update_event_filter) {
|
||||||
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
||||||
$values['id_group_filter'] = get_parameter('id_group_filter');
|
$values['id_group_filter'] = get_parameter('id_group_filter');
|
||||||
$values['date_from'] = get_parameter('date_from');
|
$values['date_from'] = get_parameter('date_from');
|
||||||
|
$values['time_from'] = get_parameter('time_from');
|
||||||
$values['date_to'] = get_parameter('date_to');
|
$values['date_to'] = get_parameter('date_to');
|
||||||
|
$values['time_to'] = get_parameter('time_to');
|
||||||
$values['source'] = get_parameter('source');
|
$values['source'] = get_parameter('source');
|
||||||
$values['id_extra'] = get_parameter('id_extra');
|
$values['id_extra'] = get_parameter('id_extra');
|
||||||
$values['user_comment'] = get_parameter('user_comment');
|
$values['user_comment'] = get_parameter('user_comment');
|
||||||
$values['id_source_event'] = get_parameter('id_source_event');
|
$values['id_source_event'] = get_parameter('id_source_event');
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$values['server_id'] = get_parameter('server_id');
|
$values['server_id'] = get_parameter('server_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +359,9 @@ if ($get_filter_values) {
|
||||||
'id_extra' => '',
|
'id_extra' => '',
|
||||||
'id_user_ack' => '',
|
'id_user_ack' => '',
|
||||||
'date_from' => '',
|
'date_from' => '',
|
||||||
|
'time_from' => '',
|
||||||
'date_to' => '',
|
'date_to' => '',
|
||||||
|
'time_to' => '',
|
||||||
'severity' => '',
|
'severity' => '',
|
||||||
'event_type' => '',
|
'event_type' => '',
|
||||||
'group_rep' => 0,
|
'group_rep' => 0,
|
||||||
|
@ -380,7 +386,7 @@ if ($get_filter_values) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$server_name = db_get_value('server_name', 'tmetaconsole_setup', 'id', $event_filter['server_id']);
|
$server_name = db_get_value('server_name', 'tmetaconsole_setup', 'id', $event_filter['server_id']);
|
||||||
if ($server_name !== false) {
|
if ($server_name !== false) {
|
||||||
$event_filter['server_name'] = $server_name;
|
$event_filter['server_name'] = $server_name;
|
||||||
|
@ -543,8 +549,12 @@ function load_form_filter() {
|
||||||
$("#select2-server_id-container").text(val);
|
$("#select2-server_id-container").text(val);
|
||||||
if(i == 'date_from')
|
if(i == 'date_from')
|
||||||
$("#text-date_from").val(val);
|
$("#text-date_from").val(val);
|
||||||
|
if(i == 'time_from')
|
||||||
|
$("#text-time_from").val(val);
|
||||||
if(i == 'date_to')
|
if(i == 'date_to')
|
||||||
$("#text-date_to").val(val);
|
$("#text-date_to").val(val);
|
||||||
|
if(i == 'time_to')
|
||||||
|
$("#text-time_to").val(val);
|
||||||
if(i == 'module_search')
|
if(i == 'module_search')
|
||||||
$('input[name=module_search]').val(val);
|
$('input[name=module_search]').val(val);
|
||||||
if(i == 'group_name')
|
if(i == 'group_name')
|
||||||
|
@ -767,7 +777,9 @@ function save_new_filter() {
|
||||||
"filter_only_alert" : $("#filter_only_alert").val(),
|
"filter_only_alert" : $("#filter_only_alert").val(),
|
||||||
"id_group_filter": $("#id_group_filter").val(),
|
"id_group_filter": $("#id_group_filter").val(),
|
||||||
"date_from": $("#text-date_from").val(),
|
"date_from": $("#text-date_from").val(),
|
||||||
|
"time_from": $("#text-time_from").val(),
|
||||||
"date_to": $("#text-date_to").val(),
|
"date_to": $("#text-date_to").val(),
|
||||||
|
"time_to": $("#text-time_to").val(),
|
||||||
"source": $("#text-source").val(),
|
"source": $("#text-source").val(),
|
||||||
"id_extra": $("#text-id_extra").val(),
|
"id_extra": $("#text-id_extra").val(),
|
||||||
"user_comment": $("#text-user_comment").val(),
|
"user_comment": $("#text-user_comment").val(),
|
||||||
|
@ -838,7 +850,9 @@ function save_update_filter() {
|
||||||
"filter_only_alert" : $("#filter_only_alert").val(),
|
"filter_only_alert" : $("#filter_only_alert").val(),
|
||||||
"id_group_filter": $("#id_group_filter").val(),
|
"id_group_filter": $("#id_group_filter").val(),
|
||||||
"date_from": $("#text-date_from").val(),
|
"date_from": $("#text-date_from").val(),
|
||||||
|
"time_from": $("#text-time_from").val(),
|
||||||
"date_to": $("#text-date_to").val(),
|
"date_to": $("#text-date_to").val(),
|
||||||
|
"time_to": $("#text-time_to").val(),
|
||||||
"source": $("#text-source").val(),
|
"source": $("#text-source").val(),
|
||||||
"id_extra": $("#text-id_extra").val(),
|
"id_extra": $("#text-id_extra").val(),
|
||||||
"user_comment": $("#text-user_comment").val(),
|
"user_comment": $("#text-user_comment").val(),
|
||||||
|
@ -1783,9 +1797,11 @@ if ($get_list_events_agents) {
|
||||||
$tag_without = get_parameter('tag_without');
|
$tag_without = get_parameter('tag_without');
|
||||||
$filter_only_alert = get_parameter('filter_only_alert');
|
$filter_only_alert = get_parameter('filter_only_alert');
|
||||||
$date_from = get_parameter('date_from');
|
$date_from = get_parameter('date_from');
|
||||||
|
$time_from = get_parameter('time_from', '00:00:00');
|
||||||
$date_to = get_parameter('date_to');
|
$date_to = get_parameter('date_to');
|
||||||
|
$time_to = get_parameter('time_to', '23:59:59');
|
||||||
$id_user = $config['id_user'];
|
$id_user = $config['id_user'];
|
||||||
|
hd('hollllaa', true);
|
||||||
$returned_sql = events_sql_events_grouped_agents(
|
$returned_sql = events_sql_events_grouped_agents(
|
||||||
$id_agent,
|
$id_agent,
|
||||||
$server_id,
|
$server_id,
|
||||||
|
@ -1800,7 +1816,9 @@ if ($get_list_events_agents) {
|
||||||
$tag_without,
|
$tag_without,
|
||||||
$filter_only_alert,
|
$filter_only_alert,
|
||||||
$date_from,
|
$date_from,
|
||||||
|
$time_from,
|
||||||
$date_to,
|
$date_to,
|
||||||
|
$time_to,
|
||||||
$id_user
|
$id_user
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -762,7 +762,7 @@ function events_get_all(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($filter['time_from'])) {
|
if (isset($filter['time_from'])) {
|
||||||
$time_from = $filter['time_from'];
|
$time_from = (empty($filter['time_from']) === true) ? '00:00:00' : $filter['time_from'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($date_from)) {
|
if (isset($date_from)) {
|
||||||
|
@ -785,7 +785,7 @@ function events_get_all(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($filter['time_to'])) {
|
if (isset($filter['time_to'])) {
|
||||||
$time_to = $filter['time_to'];
|
$time_to = (empty($filter['time_to']) === true) ? '23:59:59' : $filter['time_to'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($date_to)) {
|
if (isset($date_to)) {
|
||||||
|
@ -6193,7 +6193,9 @@ function events_get_events_grouped_by_agent(
|
||||||
* @param array $tag_without Tag_without.
|
* @param array $tag_without Tag_without.
|
||||||
* @param boolean $filter_only_alert Filter_only_alert.
|
* @param boolean $filter_only_alert Filter_only_alert.
|
||||||
* @param string $date_from Date_from.
|
* @param string $date_from Date_from.
|
||||||
|
* @param string $time_from Time_from.
|
||||||
* @param string $date_to Date_to.
|
* @param string $date_to Date_to.
|
||||||
|
* @param string $time_to Time_to.
|
||||||
* @param boolean $id_user Id_user.
|
* @param boolean $id_user Id_user.
|
||||||
* @param boolean $server_id_search Server_id_search.
|
* @param boolean $server_id_search Server_id_search.
|
||||||
*
|
*
|
||||||
|
@ -6213,7 +6215,9 @@ function events_sql_events_grouped_agents(
|
||||||
$tag_without=[],
|
$tag_without=[],
|
||||||
$filter_only_alert=false,
|
$filter_only_alert=false,
|
||||||
$date_from='',
|
$date_from='',
|
||||||
|
$time_from='',
|
||||||
$date_to='',
|
$date_to='',
|
||||||
|
$time_to='',
|
||||||
$id_user=false,
|
$id_user=false,
|
||||||
$server_id_search=false
|
$server_id_search=false
|
||||||
) {
|
) {
|
||||||
|
@ -6320,27 +6324,35 @@ function events_sql_events_grouped_agents(
|
||||||
$sql_post .= " AND id_usuario = '".$id_user_ack."'";
|
$sql_post .= " AND id_usuario = '".$id_user_ack."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($date_from)) {
|
if (isset($date_from) === false) {
|
||||||
$date_from = '';
|
$date_from = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($date_to)) {
|
if (isset($time_from) === false) {
|
||||||
|
$time_from = '00:00:00';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($date_to) === false) {
|
||||||
$date_to = '';
|
$date_to = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($time_to) === false || empty($time_to) === true) {
|
||||||
|
$time_to = '23:59:59';
|
||||||
|
}
|
||||||
|
|
||||||
if (($date_from == '') && ($date_to == '')) {
|
if (($date_from == '') && ($date_to == '')) {
|
||||||
if ($event_view_hr > 0) {
|
if ($event_view_hr > 0) {
|
||||||
$unixtime = (get_system_time() - ($event_view_hr * SECONDS_1HOUR));
|
$unixtime = (get_system_time() - ($event_view_hr * SECONDS_1HOUR));
|
||||||
$sql_post .= ' AND (utimestamp > '.$unixtime.')';
|
$sql_post .= ' AND (utimestamp > '.$unixtime.')';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($date_from != '') {
|
if (empty($date_from) === false) {
|
||||||
$udate_from = strtotime($date_from.' 00:00:00');
|
$udate_from = strtotime($date_from.' '.$time_from);
|
||||||
$sql_post .= ' AND (utimestamp >= '.$udate_from.')';
|
$sql_post .= ' AND (utimestamp >= '.$udate_from.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($date_to != '') {
|
if (empty($date_to) === false) {
|
||||||
$udate_to = strtotime($date_to.' 23:59:59');
|
$udate_to = strtotime($date_to.' '.$time_to);
|
||||||
$sql_post .= ' AND (utimestamp <= '.$udate_to.')';
|
$sql_post .= ' AND (utimestamp <= '.$udate_to.')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ $access = ($event_a == true) ? 'ER' : (($event_w == true) ? 'EW' : (($event_m ==
|
||||||
|
|
||||||
|
|
||||||
$readonly = false;
|
$readonly = false;
|
||||||
if (!is_metaconsole()
|
if (is_metaconsole() === false
|
||||||
&& isset($config['event_replication'])
|
&& isset($config['event_replication'])
|
||||||
&& $config['event_replication'] == 1
|
&& $config['event_replication'] == 1
|
||||||
&& $config['show_events_in_local'] == 1
|
&& $config['show_events_in_local'] == 1
|
||||||
|
@ -82,7 +82,7 @@ if (!is_metaconsole()
|
||||||
// Load specific stylesheet.
|
// Load specific stylesheet.
|
||||||
ui_require_css_file('events');
|
ui_require_css_file('events');
|
||||||
ui_require_css_file('tables');
|
ui_require_css_file('tables');
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
ui_require_css_file('tables_meta', ENTERPRISE_DIR.'/include/styles/');
|
ui_require_css_file('tables_meta', ENTERPRISE_DIR.'/include/styles/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ $section = get_parameter('section', false);
|
||||||
|
|
||||||
$id_source_event = get_parameter(
|
$id_source_event = get_parameter(
|
||||||
'filter[id_source_event]',
|
'filter[id_source_event]',
|
||||||
$filter['id_source_event']
|
($filter['id_source_event'] ?? '')
|
||||||
);
|
);
|
||||||
|
|
||||||
$server_id = get_parameter(
|
$server_id = get_parameter(
|
||||||
|
@ -224,7 +224,7 @@ $server_id = get_parameter(
|
||||||
$filter['id_server_meta']
|
$filter['id_server_meta']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
// Connect to node database.
|
// Connect to node database.
|
||||||
$id_node = $server_id;
|
$id_node = $server_id;
|
||||||
if ($id_node != 0) {
|
if ($id_node != 0) {
|
||||||
|
@ -235,16 +235,16 @@ if (is_metaconsole()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (empty($text_agent) && !empty($id_agent)) {
|
if (empty($text_agent) && empty($id_agent) === false) {
|
||||||
$text_agent = agents_get_alias($id_agent);
|
$text_agent = agents_get_alias($id_agent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($text_module) && !empty($id_agent_module)) {
|
if (empty($text_module) && empty($id_agent_module) === false) {
|
||||||
$text_module = modules_get_agentmodule_name($id_agent_module);
|
$text_module = modules_get_agentmodule_name($id_agent_module);
|
||||||
$text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module));
|
$text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
// Return to metaconsole database.
|
// Return to metaconsole database.
|
||||||
if ($id_node != 0) {
|
if ($id_node != 0) {
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
|
@ -252,7 +252,7 @@ if (is_metaconsole()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ajax responses.
|
// Ajax responses.
|
||||||
if (is_ajax()) {
|
if (is_ajax() === true) {
|
||||||
$get_events = get_parameter('get_events', 0);
|
$get_events = get_parameter('get_events', 0);
|
||||||
// Datatables offset, limit.
|
// Datatables offset, limit.
|
||||||
$start = get_parameter('start', 0);
|
$start = get_parameter('start', 0);
|
||||||
|
@ -263,7 +263,7 @@ if (is_ajax()) {
|
||||||
ob_start();
|
ob_start();
|
||||||
$order = get_datatable_order(true);
|
$order = get_datatable_order(true);
|
||||||
|
|
||||||
if (is_array($order) && $order['field'] == 'mini_severity') {
|
if (is_array($order) === true && $order['field'] === 'mini_severity') {
|
||||||
$order['field'] = 'te.criticity';
|
$order['field'] = 'te.criticity';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +295,8 @@ if (is_ajax()) {
|
||||||
'tg.nombre as group_name',
|
'tg.nombre as group_name',
|
||||||
'ta.direccion',
|
'ta.direccion',
|
||||||
];
|
];
|
||||||
if (!is_metaconsole()) {
|
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
$fields[] = 'am.nombre as module_name';
|
$fields[] = 'am.nombre as module_name';
|
||||||
$fields[] = 'am.id_agente_modulo as id_agentmodule';
|
$fields[] = 'am.id_agente_modulo as id_agentmodule';
|
||||||
$fields[] = 'am.custom_id as module_custom_id';
|
$fields[] = 'am.custom_id as module_custom_id';
|
||||||
|
@ -509,11 +510,13 @@ if ($loaded_filter !== false && $from_event_graph != 1) {
|
||||||
$filter_only_alert = $filter['filter_only_alert'];
|
$filter_only_alert = $filter['filter_only_alert'];
|
||||||
$id_group_filter = $filter['id_group_filter'];
|
$id_group_filter = $filter['id_group_filter'];
|
||||||
$date_from = $filter['date_from'];
|
$date_from = $filter['date_from'];
|
||||||
|
$time_from = $filter['time_from'];
|
||||||
$date_to = $filter['date_to'];
|
$date_to = $filter['date_to'];
|
||||||
|
$time_to = $filter['time_to'];
|
||||||
$source = $filter['source'];
|
$source = $filter['source'];
|
||||||
$id_extra = $filter['id_extra'];
|
$id_extra = $filter['id_extra'];
|
||||||
$user_comment = $filter['user_comment'];
|
$user_comment = $filter['user_comment'];
|
||||||
$id_source_event = $filter['id_source_event'];
|
$id_source_event = ($filter['id_source_event'] ?? '');
|
||||||
$server_id = $filter['server_id'];
|
$server_id = $filter['server_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -565,7 +568,7 @@ $tabletags_with->cellspacing = 4;
|
||||||
$tabletags_with->cellpadding = 4;
|
$tabletags_with->cellpadding = 4;
|
||||||
$tabletags_with->class = 'noshadow';
|
$tabletags_with->class = 'noshadow';
|
||||||
$tabletags_with->styleTable = 'border: 0px;';
|
$tabletags_with->styleTable = 'border: 0px;';
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$tabletags_with->class = 'nobady';
|
$tabletags_with->class = 'nobady';
|
||||||
$tabletags_with->cellspacing = 0;
|
$tabletags_with->cellspacing = 0;
|
||||||
$tabletags_with->cellpadding = 0;
|
$tabletags_with->cellpadding = 0;
|
||||||
|
@ -642,7 +645,7 @@ $tabletags_without->width = '100%';
|
||||||
$tabletags_without->cellspacing = 4;
|
$tabletags_without->cellspacing = 4;
|
||||||
$tabletags_without->cellpadding = 4;
|
$tabletags_without->cellpadding = 4;
|
||||||
$tabletags_without->class = 'noshadow';
|
$tabletags_without->class = 'noshadow';
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$tabletags_without->class = 'nobady';
|
$tabletags_without->class = 'nobady';
|
||||||
$tabletags_without->cellspacing = 0;
|
$tabletags_without->cellspacing = 0;
|
||||||
$tabletags_without->cellpadding = 0;
|
$tabletags_without->cellpadding = 0;
|
||||||
|
@ -781,7 +784,7 @@ if ($pure) {
|
||||||
// Floating menu - End.
|
// Floating menu - End.
|
||||||
ui_require_jquery_file('countdown');
|
ui_require_jquery_file('countdown');
|
||||||
} else {
|
} else {
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
// Load metaconsole frame.
|
// Load metaconsole frame.
|
||||||
enterprise_hook('open_meta_frame');
|
enterprise_hook('open_meta_frame');
|
||||||
}
|
}
|
||||||
|
@ -892,7 +895,7 @@ if ($pure) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the history event is not enabled, dont show the history tab.
|
// If the history event is not enabled, dont show the history tab.
|
||||||
if (!isset($config['metaconsole_events_history']) || $config['metaconsole_events_history'] != 1) {
|
if (isset($config['metaconsole_events_history']) === false || $config['metaconsole_events_history'] != 1) {
|
||||||
unset($onheader['history']);
|
unset($onheader['history']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -913,7 +916,7 @@ if ($pure) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! defined('METACONSOLE')) {
|
if (is_metaconsole() === false) {
|
||||||
unset($onheader['history']);
|
unset($onheader['history']);
|
||||||
ui_print_page_header(
|
ui_print_page_header(
|
||||||
__('Events'),
|
__('Events'),
|
||||||
|
@ -974,13 +977,16 @@ if (enterprise_installed() === true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error div for ajax messages.
|
// Error div for ajax messages.
|
||||||
echo "<div id='show_message_error'>";
|
html_print_div(
|
||||||
echo '</div>';
|
[
|
||||||
|
'id' => 'show_message_error',
|
||||||
|
'content' => '',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Controls.
|
// Controls.
|
||||||
if (is_metaconsole() !== true) {
|
if (is_metaconsole() !== true) {
|
||||||
if (isset($config['event_replication'])
|
if (isset($config['event_replication']) === true
|
||||||
&& $config['event_replication'] == 1
|
&& $config['event_replication'] == 1
|
||||||
) {
|
) {
|
||||||
if ($config['show_events_in_local'] == 0) {
|
if ($config['show_events_in_local'] == 0) {
|
||||||
|
@ -1095,7 +1101,7 @@ $in = '<div class="filter_input"><label>'.__('Free search').'</label>';
|
||||||
$in .= $data.'</div>';
|
$in .= $data.'</div>';
|
||||||
$inputs[] = $in;
|
$inputs[] = $in;
|
||||||
|
|
||||||
if (empty($severity) && $severity !== '0') {
|
if (empty($severity) === true && $severity !== '0') {
|
||||||
$severity = -1;
|
$severity = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1207,7 +1213,7 @@ $in .= $data.'</div>';
|
||||||
$adv_inputs[] = $in;
|
$adv_inputs[] = $in;
|
||||||
|
|
||||||
// Mixed. Metaconsole => server, Console => module.
|
// Mixed. Metaconsole => server, Console => module.
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$title = __('Server');
|
$title = __('Server');
|
||||||
$data = html_print_select_from_sql(
|
$data = html_print_select_from_sql(
|
||||||
'SELECT id, server_name FROM tmetaconsole_setup',
|
'SELECT id, server_name FROM tmetaconsole_setup',
|
||||||
|
@ -1270,16 +1276,20 @@ $data = html_print_select(
|
||||||
-1,
|
-1,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$in = '<div class="filter_input"><label>'.__('Alert events').'</label>';
|
|
||||||
$in .= $data.'</div>';
|
|
||||||
$adv_inputs[] = $in;
|
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
$adv_inputs[] = html_print_div(
|
||||||
if (empty($id_source_event) === true) {
|
[
|
||||||
$id_source_event = '';
|
'class' => 'filter_input',
|
||||||
}
|
'content' => sprintf(
|
||||||
|
'<label>%s</label>%s',
|
||||||
|
__('Alert events'),
|
||||||
|
$data
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$input_id_source_event = (empty($id_source_event) === true) ? '' : $id_source_event;
|
if (is_metaconsole() === true) {
|
||||||
$data = html_print_input_text(
|
$data = html_print_input_text(
|
||||||
'id_source_event',
|
'id_source_event',
|
||||||
$id_source_event,
|
$id_source_event,
|
||||||
|
@ -1288,19 +1298,24 @@ if (is_metaconsole()) {
|
||||||
255,
|
255,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$in = '<div class="filter_input"><label>'.__('Id source event').'</label>';
|
|
||||||
$in .= $data.'</div>';
|
|
||||||
$adv_inputs[] = $in;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($date_from === '0000-00-00') {
|
$adv_inputs[] = html_print_div(
|
||||||
$date_from = '';
|
[
|
||||||
|
'class' => 'filter_input',
|
||||||
|
'content' => sprintf(
|
||||||
|
'<label>%s</label>%s',
|
||||||
|
__('Id source event'),
|
||||||
|
$data
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date from.
|
// Date from.
|
||||||
$data = html_print_input_text(
|
$inputDateFrom = html_print_input_text(
|
||||||
'date_from',
|
'date_from',
|
||||||
$date_from,
|
($date_from === '0000-00-00') ? '' : $date_from,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
10,
|
10,
|
||||||
|
@ -1318,22 +1333,69 @@ $data = html_print_input_text(
|
||||||
// Autocomplete.
|
// Autocomplete.
|
||||||
'off'
|
'off'
|
||||||
);
|
);
|
||||||
$in = '<div class="filter_input">';
|
|
||||||
$in .= '<div class="filter_input_little"><label>'.__('Date from').'</label>';
|
|
||||||
$in .= $data.'</div>';
|
|
||||||
|
|
||||||
$data = '';
|
// Time from.
|
||||||
$in .= $data.'</div>';
|
$inputTimeFrom = html_print_input_text(
|
||||||
$adv_inputs[] = $in;
|
'time_from',
|
||||||
|
$time_from,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
10,
|
||||||
|
true,
|
||||||
|
// Disabled.
|
||||||
|
false,
|
||||||
|
// Required.
|
||||||
|
false,
|
||||||
|
// Function.
|
||||||
|
'',
|
||||||
|
// Class.
|
||||||
|
'',
|
||||||
|
// OnChange.
|
||||||
|
'',
|
||||||
|
// Autocomplete.
|
||||||
|
'off'
|
||||||
|
);
|
||||||
|
|
||||||
if ($date_to === '0000-00-00') {
|
// Date and Time From.
|
||||||
$date_to = '';
|
$adv_inputs[] = html_print_div(
|
||||||
}
|
[
|
||||||
|
'class' => 'filter_input',
|
||||||
|
'content' => sprintf(
|
||||||
|
'<label>%s</label>%s<span>:</span>%s',
|
||||||
|
__('From (date:time)'),
|
||||||
|
$inputDateFrom,
|
||||||
|
$inputTimeFrom
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
// Time to.
|
||||||
|
$inputTimeTo = html_print_input_text(
|
||||||
|
'time_to',
|
||||||
|
$time_to,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
10,
|
||||||
|
true,
|
||||||
|
// Disabled.
|
||||||
|
false,
|
||||||
|
// Required.
|
||||||
|
false,
|
||||||
|
// Function.
|
||||||
|
'',
|
||||||
|
// Class.
|
||||||
|
'',
|
||||||
|
// OnChange.
|
||||||
|
'',
|
||||||
|
// Autocomplete.
|
||||||
|
'off'
|
||||||
|
);
|
||||||
|
|
||||||
// Date to.
|
// Date to.
|
||||||
$data = html_print_input_text(
|
$inputDateTo = html_print_input_text(
|
||||||
'date_to',
|
'date_to',
|
||||||
$date_to,
|
($date_to === '0000-00-00') ? '' : $date_to,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
10,
|
10,
|
||||||
|
@ -1351,16 +1413,23 @@ $data = html_print_input_text(
|
||||||
// Autocomplete.
|
// Autocomplete.
|
||||||
'off'
|
'off'
|
||||||
);
|
);
|
||||||
$in = '<div class="filter_input">';
|
|
||||||
$in .= '<div class="filter_input_little"><label>'.__('Date to').'</label>';
|
|
||||||
$in .= $data.'</div>';
|
|
||||||
|
|
||||||
$data = '';
|
// Date and Time To.
|
||||||
$in .= $data.'</div>';
|
$adv_inputs[] = html_print_div(
|
||||||
$adv_inputs[] = $in;
|
[
|
||||||
|
'class' => 'filter_input',
|
||||||
|
'content' => sprintf(
|
||||||
|
'<label>%s</label>%s<span>:</span>%s',
|
||||||
|
__('To (date:time)'),
|
||||||
|
$inputDateTo,
|
||||||
|
$inputTimeTo
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Tags.
|
// Tags.
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$data = '<fieldset><legend class="pdd_0px">'.__('Events with following tags').'</legend>'.html_print_table($tabletags_with, true).'</fieldset>';
|
$data = '<fieldset><legend class="pdd_0px">'.__('Events with following tags').'</legend>'.html_print_table($tabletags_with, true).'</fieldset>';
|
||||||
$data .= '<fieldset><legend class="pdd_0px">'.__('Events without following tags').'</legend>'.html_print_table($tabletags_without, true).'</fieldset>';
|
$data .= '<fieldset><legend class="pdd_0px">'.__('Events without following tags').'</legend>'.html_print_table($tabletags_without, true).'</fieldset>';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue