';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
ui_require_css_file('pandora_black', 'include/styles/', true);
}
diff --git a/pandora_console/operation/agentes/realtime_win.php b/pandora_console/operation/agentes/realtime_win.php
index db24c5b4b8..93850da156 100644
--- a/pandora_console/operation/agentes/realtime_win.php
+++ b/pandora_console/operation/agentes/realtime_win.php
@@ -64,7 +64,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
$l10n->load_tables();
}
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
ui_require_css_file('pandora_black', 'include/styles/', true);
}
@@ -97,7 +97,7 @@ echo '
diff --git a/pandora_console/operation/agentes/snapshot_view.php b/pandora_console/operation/agentes/snapshot_view.php
index fe858e1443..7f0972e813 100644
--- a/pandora_console/operation/agentes/snapshot_view.php
+++ b/pandora_console/operation/agentes/snapshot_view.php
@@ -79,7 +79,7 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) {
if ($refresh > 0) {
$query = ui_get_url_refresh(false);
echo '
';
- if ($config['style'] === 'pandora_black') {
+ if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo '
';
}
}
diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php
index c7cd106421..782df21b95 100644
--- a/pandora_console/operation/agentes/stat_win.php
+++ b/pandora_console/operation/agentes/stat_win.php
@@ -67,7 +67,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
global $config;
echo '
';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo '
';
}
@@ -194,60 +194,7 @@ ui_print_message_dialog(
$time_compare_separated = get_parameter('time_compare_separated', 0);
$time_compare_overlapped = get_parameter('time_compare_overlapped', 0);
$unknown_graph = get_parameter_checkbox('unknown_graph', 1);
-
- $fullscale_sent = get_parameter('fullscale_sent', 0);
- if (!$fullscale_sent) {
- if (isset($config['full_scale_option']) === false
- || $config['full_scale_option'] == 0
- ) {
- $fullscale = 0;
- } else if ($config['full_scale_option'] == 1) {
- $fullscale = 1;
- } else if ($config['full_scale_option'] == 2) {
- if ($graph_type == 'boolean') {
- $fullscale = 1;
- } else {
- $fullscale = 0;
- }
- }
- } else {
- $fullscale = get_parameter('fullscale', 0);
- }
-
- $type_mode_graph = get_parameter_checkbox(
- 'type_mode_graph',
- ($fullscale === 1) ? 0 : $config['type_mode_graph']
- );
-
- $time_compare = false;
-
- if ($time_compare_separated) {
- $time_compare = 'separated';
- } else if ($time_compare_overlapped) {
- $time_compare = 'overlapped';
- }
-
- if ($zoom > 1) {
- $height = ($height * ($zoom / 2.1));
- $width = ($width * ($zoom / 1.4));
- }
-
- // Build date.
- $date = strtotime($start_date.' '.$start_time);
- $now = time();
-
- if ($date > $now) {
- $date = $now;
- }
-
- $urlImage = ui_get_full_url(false, false, false, false);
-
- $unit = db_get_value(
- 'unit',
- 'tagente_modulo',
- 'id_agente_modulo',
- $id
- );
+ $histogram = (bool) get_parameter('histogram', 0);
// FORM TABLE.
$table = html_get_predefined_table('transparent', 2);
@@ -258,162 +205,257 @@ ui_print_message_dialog(
$table->style[2] = 'text-align:left;font-weight: bold;';
$table->style[3] = 'text-align:left;';
$table->class = 'table_modal_alternate';
-
$table->data = [];
- $table->data[0][0] = __('Refresh time');
- $table->data[0][1] = html_print_extended_select_for_time(
- 'refresh',
- $refresh,
- '',
- '',
- 0,
- 7,
- true
- );
- $table->data[0][2] = __('Show events');
- $disabled = false;
- if (isset($config['event_replication']) === true) {
- if ($config['event_replication']
- && !$config['show_events_in_local']
- ) {
- $disabled = true;
+ $time_compare = false;
+
+ if ($time_compare_separated) {
+ $time_compare = 'separated';
+ } else if ($time_compare_overlapped) {
+ $time_compare = 'overlapped';
+ }
+
+ if ($histogram === false) {
+ $fullscale_sent = get_parameter('fullscale_sent', 0);
+ if (!$fullscale_sent) {
+ if (isset($config['full_scale_option']) === false
+ || $config['full_scale_option'] == 0
+ ) {
+ $fullscale = 0;
+ } else if ($config['full_scale_option'] == 1) {
+ $fullscale = 1;
+ } else if ($config['full_scale_option'] == 2) {
+ if ($graph_type == 'boolean') {
+ $fullscale = 1;
+ } else {
+ $fullscale = 0;
+ }
+ }
+ } else {
+ $fullscale = get_parameter('fullscale', 0);
}
- }
- $table->data[0][3] = html_print_checkbox_switch(
- 'draw_events',
- 1,
- (bool) $draw_events,
- true,
- $disabled
- );
- if ($disabled) {
- $table->data[1] .= ui_print_help_tip(
- __("'Show events' is disabled because this %s node is set to event replication.", get_product_name()),
- true
+ $type_mode_graph = get_parameter_checkbox(
+ 'type_mode_graph',
+ ($fullscale === 1) ? 0 : $config['type_mode_graph']
);
- }
- $table->data[1][0] = __('Begin date');
- $table->data[1][1] = html_print_input_text(
- 'start_date',
- $start_date,
- '',
- 10,
- 20,
- true
- );
+ if ($zoom > 1) {
+ $height = ($height * ($zoom / 2.1));
+ $width = ($width * ($zoom / 1.4));
+ }
- $table->data[1][2] = __('Show alerts');
- $table->data[1][3] = html_print_checkbox_switch(
- 'draw_alerts',
- 1,
- (bool) $draw_alerts,
- true
- );
+ // Build date.
+ $date = strtotime($start_date.' '.$start_time);
+ $now = time();
- $table->data[2][0] = __('Begin time');
- $table->data[2][1] = html_print_input_text(
- 'start_time',
- $start_time,
- '',
- 10,
- 10,
- true
- );
+ if ($date > $now) {
+ $date = $now;
+ }
- $table->data[2][2] = __('Show unknown graph');
- $table->data[2][3] = html_print_checkbox_switch(
- 'unknown_graph',
- 1,
- (bool) $unknown_graph,
- true
- );
+ $urlImage = ui_get_full_url(false, false, false, false);
- $table->data[3][0] = __('Time range');
- $table->data[3][1] = html_print_extended_select_for_time(
- 'period',
- $period,
- '',
- '',
- 0,
- 7,
- true
- );
+ $unit = db_get_value(
+ 'unit',
+ 'tagente_modulo',
+ 'id_agente_modulo',
+ $id
+ );
- $table->data[3][2] = '';
- $table->data[3][3] = '';
-
- if (!modules_is_boolean($id)) {
- $table->data[4][0] = __('Zoom');
- $options = [];
- $options[$zoom] = 'x'.$zoom;
- $options[1] = 'x1';
- $options[2] = 'x2';
- $options[3] = 'x3';
- $options[4] = 'x4';
- $options[5] = 'x5';
- $table->data[4][1] = html_print_select(
- $options,
- 'zoom',
- $zoom,
+ $table->data[0][0] = __('Refresh time');
+ $table->data[0][1] = html_print_extended_select_for_time(
+ 'refresh',
+ $refresh,
'',
'',
0,
+ 7,
+ true
+ );
+
+ $table->data[0][2] = __('Show events');
+ $disabled = false;
+ if (isset($config['event_replication']) === true) {
+ if ($config['event_replication']
+ && !$config['show_events_in_local']
+ ) {
+ $disabled = true;
+ }
+ }
+
+ $table->data[0][3] = html_print_checkbox_switch(
+ 'draw_events',
+ 1,
+ (bool) $draw_events,
+ true,
+ $disabled
+ );
+ if ($disabled) {
+ $table->data[1] .= ui_print_help_tip(
+ __("'Show events' is disabled because this %s node is set to event replication.", get_product_name()),
+ true
+ );
+ }
+
+ $table->data[1][0] = __('Begin date');
+ $table->data[1][1] = html_print_input_text(
+ 'start_date',
+ $start_date,
+ '',
+ 10,
+ 20,
+ true
+ );
+
+ $table->data[1][2] = __('Show alerts');
+ $table->data[1][3] = html_print_checkbox_switch(
+ 'draw_alerts',
+ 1,
+ (bool) $draw_alerts,
+ true
+ );
+
+ $table->data[2][0] = __('Begin time');
+ $table->data[2][1] = html_print_input_text(
+ 'start_time',
+ $start_time,
+ '',
+ 10,
+ 10,
+ true
+ );
+
+ $table->data[2][2] = __('Show unknown graph');
+ $table->data[2][3] = html_print_checkbox_switch(
+ 'unknown_graph',
+ 1,
+ (bool) $unknown_graph,
+ true
+ );
+
+ $table->data[3][0] = __('Time range');
+ $table->data[3][1] = html_print_extended_select_for_time(
+ 'period',
+ $period,
+ '',
+ '',
+ 0,
+ 7,
+ true
+ );
+
+ $table->data[3][2] = '';
+ $table->data[3][3] = '';
+
+ if (!modules_is_boolean($id)) {
+ $table->data[4][0] = __('Zoom');
+ $options = [];
+ $options[$zoom] = 'x'.$zoom;
+ $options[1] = 'x1';
+ $options[2] = 'x2';
+ $options[3] = 'x3';
+ $options[4] = 'x4';
+ $options[5] = 'x5';
+ $table->data[4][1] = html_print_select(
+ $options,
+ 'zoom',
+ $zoom,
+ '',
+ '',
+ 0,
+ true,
+ false,
+ false
+ );
+
+ $table->data[4][2] = __('Show percentil');
+ $table->data[4][3] = html_print_checkbox_switch(
+ 'show_percentil',
+ 1,
+ (bool) $show_percentil,
+ true
+ );
+ }
+
+ $table->data[5][0] = __('Time compare (Overlapped)');
+ $table->data[5][1] = html_print_checkbox_switch(
+ 'time_compare_overlapped',
+ 1,
+ (bool) $time_compare_overlapped,
+ true
+ );
+
+ $table->data[5][2] = __('Time compare (Separated)');
+ $table->data[5][3] = html_print_checkbox_switch(
+ 'time_compare_separated',
+ 1,
+ (bool) $time_compare_separated,
+ true
+ );
+
+
+ $table->data[6][0] = __('Show AVG/MAX/MIN data series in graph');
+ $table->data[6][1] = html_print_checkbox_switch(
+ 'type_mode_graph',
+ 1,
+ (bool) $type_mode_graph,
true,
- false,
false
);
- $table->data[4][2] = __('Show percentil');
- $table->data[4][3] = html_print_checkbox_switch(
- 'show_percentil',
+ $table->data[6][2] = __('Show full scale graph (TIP)');
+ $table->data[6][2] .= ui_print_help_tip(
+ __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'),
+ true
+ );
+ $table->data[6][3] = html_print_checkbox_switch(
+ 'fullscale',
1,
- (bool) $show_percentil,
+ (bool) $fullscale,
+ true,
+ false
+ );
+ } else {
+ $table->data[0][0] = __('Begin date');
+ $table->data[0][1] = html_print_input_text(
+ 'start_date',
+ $start_date,
+ '',
+ 10,
+ 20,
+ true
+ );
+
+ $table->data[0][2] = __('Begin time');
+ $table->data[0][3] = html_print_input_text(
+ 'start_time',
+ $start_time,
+ '',
+ 10,
+ 10,
+ true
+ );
+
+ $table->data[1][0] = __('Time range');
+ $table->data[1][1] = html_print_extended_select_for_time(
+ 'period',
+ $period,
+ '',
+ '',
+ 0,
+ 7,
+ true
+ );
+
+ $table->data[1][2] = __('Time compare (Separated)');
+ $table->data[1][3] = html_print_checkbox_switch(
+ 'time_compare_separated',
+ 1,
+ (bool) $time_compare_separated,
true
);
}
- $table->data[5][0] = __('Time compare (Overlapped)');
- $table->data[5][1] = html_print_checkbox_switch(
- 'time_compare_overlapped',
- 1,
- (bool) $time_compare_overlapped,
- true
- );
-
- $table->data[5][2] = __('Time compare (Separated)');
- $table->data[5][3] = html_print_checkbox_switch(
- 'time_compare_separated',
- 1,
- (bool) $time_compare_separated,
- true
- );
-
-
- $table->data[6][0] = __('Show AVG/MAX/MIN data series in graph');
- $table->data[6][1] = html_print_checkbox_switch(
- 'type_mode_graph',
- 1,
- (bool) $type_mode_graph,
- true,
- false
- );
-
- $table->data[6][2] = __('Show full scale graph (TIP)');
- $table->data[6][2] .= ui_print_help_tip(
- __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'),
- true
- );
- $table->data[6][3] = html_print_checkbox_switch(
- 'fullscale',
- 1,
- (bool) $fullscale,
- true,
- false
- );
-
$form_table = html_print_table($table, true);
$form_table .= '
';
$form_table .= html_print_submit_button(
@@ -434,6 +476,8 @@ ui_print_message_dialog(
$menu_form .= html_print_input_hidden('server', $server_id, true);
}
+ $menu_form .= html_print_input_hidden('histogram', $histogram, true);
+
if (isset($_GET['type']) === true) {
$type = get_parameter_get('type');
$menu_form .= html_print_input_hidden('type', $type, true);
@@ -460,7 +504,13 @@ ui_print_message_dialog(
);
$menu_form .= '';
$menu_form .= '
';
- $menu_form .= '';
@@ -497,6 +547,8 @@ ui_print_message_dialog(
'zoom' => $zoom,
'height' => 300,
'type_mode_graph' => $type_mode_graph,
+ 'histogram' => $histogram,
+ 'begin_date' => strtotime($start_date.' '.$start_time),
];
// Graph.
diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php
index 16961214cf..5e5ab2b43f 100644
--- a/pandora_console/operation/agentes/status_monitor.php
+++ b/pandora_console/operation/agentes/status_monitor.php
@@ -1725,6 +1725,17 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
}
if ($row['history_data'] == 1 && $acl_graphs) {
+ $tresholds = true;
+ if (empty((float) $module['min_warning']) === true
+ && empty((float) $module['max_warning']) === true
+ && empty($module['warning_inverse']) === true
+ && empty((float) $module['min_critical']) === true
+ && empty((float) $module['max_critical']) === true
+ && empty($module['critical_inverse']) === true
+ ) {
+ $tresholds = false;
+ }
+
$graph_type = return_graphtype($row['module_type']);
$url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false);
@@ -1738,6 +1749,10 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
'refresh' => SECONDS_10MINUTES,
];
+ if ($tresholds === true || $graph_type === 'boolean') {
+ $graph_params['histogram'] = 1;
+ }
+
if (is_metaconsole() && isset($row['server_id'])) {
// Set the server id.
$graph_params['server'] = $row['server_id'];
@@ -1749,6 +1764,18 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
$data[8] = get_module_realtime_link_graph($row);
+ if ($tresholds === true || $graph_type === 'boolean') {
+ $data[8] .= '
'.html_print_image(
+ 'images/histograma.png',
+ true,
+ [
+ 'border' => '0',
+ 'alt' => '',
+ 'class' => 'invert_filter',
+ ]
+ ).' ';
+ }
+
if (!is_snapshot_data($row['datos'])) {
$data[8] .= '
'.html_print_image('images/chart.png', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter']).' ';
}
diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php
index b4430ef128..c1274fdc47 100755
--- a/pandora_console/operation/agentes/tactical.php
+++ b/pandora_console/operation/agentes/tactical.php
@@ -147,7 +147,7 @@ echo '
';
// The status horizontal bars (Global health, Monitor sanity...
// ---------------------------------------------------------------------
$bg_color = 'background-color: #222';
-if ($config['style'] !== 'pandora_black') {
+if ($config['style'] !== 'pandora_black' && !is_metaconsole()) {
$bg_color = 'background-color: #fff';
}
diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php
index 3881f468ae..8959ae2f47 100644
--- a/pandora_console/operation/events/sound_events.php
+++ b/pandora_console/operation/events/sound_events.php
@@ -72,7 +72,7 @@ echo ''.__('Sound Events').' ';
';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo ' ';
} else {
echo ' ';
diff --git a/pandora_console/operation/incidents/configure_integriaims_incident.php b/pandora_console/operation/incidents/configure_integriaims_incident.php
index a6100eaf78..997391a781 100644
--- a/pandora_console/operation/incidents/configure_integriaims_incident.php
+++ b/pandora_console/operation/incidents/configure_integriaims_incident.php
@@ -225,7 +225,7 @@ $table->data[0][0] .= ''.html_print_input_text(
).'
';
$integria_logo = 'images/integria_logo_gray.png';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$integria_logo = 'images/integria_logo.svg';
}
diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php
index 6fef0568b2..d932a5f477 100755
--- a/pandora_console/operation/reporting/reporting_viewer.php
+++ b/pandora_console/operation/reporting/reporting_viewer.php
@@ -65,6 +65,42 @@ if ($enable_init_date) {
$period = ($datetime - $datetime_init);
}
+// Shchedule report email.
+$schedule_report = get_parameter('schbutton', '');
+
+if (empty($schedule_report) === false) {
+ $id_user_task = 1;
+ $scheduled = 'no';
+ $date = date(DATE_FORMAT);
+ $time = date(TIME_FORMAT);
+ $parameters[0] = get_parameter('id_schedule_report');
+ $parameters[1] = get_parameter('schedule_email_address');
+ $parameters[2] = get_parameter('schedule_subject', '');
+ $parameters[3] = get_parameter('schedule_email', '');
+ $parameters[4] = get_parameter('report_type', '');
+ $parameters['first_execution'] = strtotime($date.' '.$time);
+
+
+ $values = [
+ 'id_usuario' => $config['id_user'],
+ 'id_user_task' => $id_user_task,
+ 'args' => serialize($parameters),
+ 'scheduled' => $scheduled,
+ 'flag_delete' => 1,
+ ];
+
+ $result = db_process_sql_insert('tuser_task_scheduled', $values);
+
+ $report_type = $parameters[4];
+
+ ui_print_result_message(
+ $result,
+ __('Your report has been planned, and the system will email you a '.$report_type.' file with the report as soon as its finished'),
+ __('An error has ocurred')
+ );
+ echo ' ';
+}
+
// ------------------- INIT HEADER --------------------------------------
$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure";
@@ -249,16 +285,18 @@ if (reporting_get_description($id_report)) {
$table->data[0][1] = ''.reporting_get_name($id_report).'
';
}
-$table->data[0][1] .= ''.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true);
-$html_enterprise = enterprise_hook(
- 'reporting_print_button_PDF',
- [$id_report]
-);
-if ($html_enterprise !== ENTERPRISE_NOT_HOOK) {
- $table->data[0][1] .= $html_enterprise;
+$table->data[0][1] .= '
'.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true).'';
+
+$html_menu_export = enterprise_hook('reporting_print_button_export');
+if ($html_menu_export === ENTERPRISE_NOT_HOOK) {
+ $html_menu_export = '';
}
+
$table->data[0][1] .= '
';
+$table->data[0][1] .= $html_menu_export;
+
+
$table->data[1][1] = '
'.__('From').':
';
$table->data[1][1] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' ';
diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php
index 9fe7d7f9ce..de6461ccec 100755
--- a/pandora_console/operation/search_agents.php
+++ b/pandora_console/operation/search_agents.php
@@ -36,7 +36,8 @@ if (!$agents || !$searchAgents) {
$table->width = '98%';
$table->class = 'databox';
- $table->head = [];
+ $table->head = [];
+
if ($only_count) {
$table->head[0] = __('Agent');
$table->head[1] = __('Description');
@@ -57,6 +58,18 @@ if (!$agents || !$searchAgents) {
$table->head[8] = __('Last contact').' '.'
'.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp]).' '.'
'.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown]).' ';
$table->head[9] = '';
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: left';
+ $table->headstyle[2] = 'text-align: left';
+ $table->headstyle[3] = 'text-align: left';
+ $table->headstyle[4] = 'text-align: left';
+ $table->headstyle[5] = 'text-align: left';
+ $table->headstyle[6] = 'text-align: left';
+ $table->headstyle[7] = 'text-align: left';
+ $table->headstyle[8] = 'text-align: left';
+ $table->headstyle[9] = 'text-align: center';
+
$table->align = [];
$table->align[0] = 'left';
$table->align[1] = 'left';
diff --git a/pandora_console/operation/search_alerts.php b/pandora_console/operation/search_alerts.php
index 76beda6166..90e55a963e 100755
--- a/pandora_console/operation/search_alerts.php
+++ b/pandora_console/operation/search_alerts.php
@@ -42,6 +42,13 @@ if ($alerts === false || $totalAlerts == 0 || !$searchAlerts) {
$table->align[3] = 'left';
$table->align[4] = 'left';
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: center';
+ $table->headstyle[1] = 'text-align: left';
+ $table->headstyle[2] = 'text-align: left';
+ $table->headstyle[3] = 'text-align: left';
+ $table->headstyle[4] = 'text-align: left';
+
$table->valign = [];
$table->valign[0] = 'top';
$table->valign[1] = 'top';
diff --git a/pandora_console/operation/search_graphs.php b/pandora_console/operation/search_graphs.php
index 8f76f0dea8..0150d2f56c 100755
--- a/pandora_console/operation/search_graphs.php
+++ b/pandora_console/operation/search_graphs.php
@@ -29,6 +29,10 @@ if ($graphs === false || !$searchGraphs) {
$table->head[0] = __('Graph name');
$table->head[1] = __('Description');
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: left';
+
$table->data = [];
foreach ($graphs as $graph) {
array_push(
diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php
index 813ef1b004..58f75e0ca5 100644
--- a/pandora_console/operation/search_main.php
+++ b/pandora_console/operation/search_main.php
@@ -32,21 +32,21 @@ $table->id = 'summary';
$table->width = '98%';
$table->style = [];
-$table->style[0] = 'font-weight: bold; text-align: center;';
-$table->style[1] = 'font-weight: bold; text-align: center;';
-$table->style[2] = 'font-weight: bold; text-align: center;';
-$table->style[3] = 'font-weight: bold; text-align: center;';
-$table->style[4] = 'font-weight: bold; text-align: center;';
-$table->style[5] = 'font-weight: bold; text-align: center;';
-$table->style[6] = 'font-weight: bold; text-align: center;';
-$table->style[7] = 'font-weight: bold; text-align: center;';
-$table->style[8] = 'font-weight: bold; text-align: center;';
-$table->style[9] = 'font-weight: bold; text-align: center;';
-$table->style[10] = 'font-weight: bold; text-align: center;';
-$table->style[11] = 'font-weight: bold; text-align: center;';
-$table->style[13] = 'font-weight: bold; text-align: center;';
-$table->style[14] = 'font-weight: bold; text-align: center;';
-$table->style[15] = 'font-weight: bold; text-align: center;';
+$table->style[0] = 'font-weight: bold; text-align: left;';
+$table->style[1] = 'font-weight: bold; text-align: left;';
+$table->style[2] = 'font-weight: bold; text-align: left;';
+$table->style[3] = 'font-weight: bold; text-align: left;';
+$table->style[4] = 'font-weight: bold; text-align: left;';
+$table->style[5] = 'font-weight: bold; text-align: left;';
+$table->style[6] = 'font-weight: bold; text-align: left;';
+$table->style[7] = 'font-weight: bold; text-align: left;';
+$table->style[8] = 'font-weight: bold; text-align: left;';
+$table->style[9] = 'font-weight: bold; text-align: left;';
+$table->style[10] = 'font-weight: bold; text-align: left;';
+$table->style[11] = 'font-weight: bold; text-align: left;';
+$table->style[13] = 'font-weight: bold; text-align: left;';
+$table->style[14] = 'font-weight: bold; text-align: left;';
+$table->style[15] = 'font-weight: bold; text-align: left;';
diff --git a/pandora_console/operation/search_maps.php b/pandora_console/operation/search_maps.php
index 0ab656d9b5..6b6aeeb423 100755
--- a/pandora_console/operation/search_maps.php
+++ b/pandora_console/operation/search_maps.php
@@ -32,6 +32,13 @@ if ($maps === false || !$searchMaps) {
$table->align[1] = 'center';
$table->align[2] = 'center';
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: center';
+ $table->headstyle[1] = 'text-align: center';
+
+
+
$table->data = [];
foreach ($maps as $map) {
array_push(
diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php
index 81ec17cf39..d055d29946 100644
--- a/pandora_console/operation/search_modules.php
+++ b/pandora_console/operation/search_modules.php
@@ -51,6 +51,17 @@ if (!$modules || !$searchModules) {
$table->align[7] = 'left';
$table->align[8] = 'left';
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: left';
+ $table->headstyle[2] = 'text-align: left';
+ $table->headstyle[3] = 'text-align: left';
+ $table->headstyle[4] = 'text-align: left';
+ $table->headstyle[5] = 'text-align: left';
+ $table->headstyle[6] = 'text-align: left';
+ $table->headstyle[7] = 'text-align: left';
+ $table->headstyle[8] = 'text-align: left';
+
$table->data = [];
$id_type_web_content_string = db_get_value(
diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php
index d86b0c5446..e16507a624 100755
--- a/pandora_console/operation/search_reports.php
+++ b/pandora_console/operation/search_reports.php
@@ -44,6 +44,8 @@ if ($reports === false || !$searchReports) {
$table->head[3] = __('XML');
$table->size[0] = '50%';
$table->size[1] = '20%';
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: left';
$table->size[2] = '2%';
$table->headstyle[2] = 'min-width: 35px;text-align: left;';
$table->size[3] = '2%';
diff --git a/pandora_console/operation/search_users.php b/pandora_console/operation/search_users.php
index 3f397129db..ead204915d 100755
--- a/pandora_console/operation/search_users.php
+++ b/pandora_console/operation/search_users.php
@@ -30,6 +30,14 @@ if (!$users || !$searchUsers) {
$table->align = [];
$table->align[4] = 'center';
+ $table->headstyle = [];
+ $table->headstyle[0] = 'text-align: left';
+ $table->headstyle[1] = 'text-align: left';
+ $table->headstyle[2] = 'text-align: left';
+ $table->headstyle[3] = 'text-align: left';
+ $table->headstyle[4] = 'text-align: center';
+ $table->headstyle[5] = 'text-align: left';
+
$table->head = [];
$table->head[0] = __('User ID').' '.'
'.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).' '.'
'.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).' ';
$table->head[1] = __('Name').' '.'
'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).' '.'
'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).' ';
@@ -38,6 +46,8 @@ if (!$users || !$searchUsers) {
$table->head[4] = __('Profile').' '.'
'.html_print_image('images/sort_up.png', true, ['style' => $selectProfileUp]).' '.'
'.html_print_image('images/sort_down.png', true, ['style' => $selectProfileDown]).' ';
$table->head[5] = __('Description');
+
+
$table->data = [];
foreach ($users as $user) {
diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php
index 2a2d0427ed..8a33477d57 100644
--- a/pandora_console/operation/users/user_edit.php
+++ b/pandora_console/operation/users/user_edit.php
@@ -33,7 +33,6 @@ $headerTitle = __('User detail editor');
require $config['homedir'].'/operation/users/user_edit_header.php';
if (is_metaconsole() === false) {
- date_default_timezone_set('UTC');
include 'include/javascript/timezonepicker/includes/parser.inc';
// Read in options for map builder.
@@ -349,7 +348,7 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
$usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
$id_usr = $config['id_user'];
-
+$skin = '';
if (!$meta) {
$home_screen = '
'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'
';
$values = [
@@ -395,10 +394,7 @@ if (!$meta) {
$home_screen .= '
';
$home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false);
-
-
// User only can change skins if has more than one group.
- $skin = '';
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
$skin = '
'.__('Skin').':
';
@@ -407,7 +403,16 @@ if (!$meta) {
}
} else {
$home_screen = '';
- $skin = '';
+ // User only can change skins if has more than one group.
+ if (function_exists('skins_print_select')) {
+ if (count($usr_groups) > 1) {
+ $skin = '
'.__('Skin').ui_print_help_tip(
+ __('This change will only apply to nodes'),
+ true
+ ).'
';
+ $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
';
+ }
+ }
}
$timezone = '
'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'
';
diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php
index 759888aabb..36ec6bf722 100644
--- a/pandora_console/operation/visual_console/public_view.php
+++ b/pandora_console/operation/visual_console/public_view.php
@@ -97,7 +97,7 @@ $visualConsoleData = $visualConsole->toArray();
$visualConsoleName = $visualConsoleData['name'];
$bg_color = '';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}
diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php
index 8b51d0a8f6..7e18e8ad30 100644
--- a/pandora_console/operation/visual_console/view.php
+++ b/pandora_console/operation/visual_console/view.php
@@ -269,7 +269,7 @@ if ($pure === false) {
$class_basic_chart = 'basic_chart_min link-create-item';
$class_delete = 'delete_item delete_min';
$class_copy = 'copy_item';
- if ($config['style'] === 'pandora_black') {
+ if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$class_camera = 'camera_min_white link-create-item';
$class_percentile = 'percentile_item_min_white link-create-item';
$class_module_graph = 'graph_min_white link-create-item';
@@ -417,7 +417,7 @@ if ($pure === false) {
}
$bg_color = '';
-if ($config['style'] === 'pandora_black') {
+if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 95eda5272f..5922a897ec 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.759
-%define release 220125
+%define release 220126
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 42ab6efb15..7185d14a5e 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.759
-%define release 220125
+%define release 220126
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 751f7bbb92..0fa45c5dfd 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.759
-%define release 220125
+%define release 220126
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_console/views/dashboard/cell.php b/pandora_console/views/dashboard/cell.php
index 1ec35ae777..b58fae78a6 100644
--- a/pandora_console/views/dashboard/cell.php
+++ b/pandora_console/views/dashboard/cell.php
@@ -78,11 +78,12 @@ if (empty($options['background']) === true) {
$options['background'] = '#ffffff';
}
- if ($config['style'] === 'pandora_black') {
+ if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['background'] = '#222222';
}
} else if ($options['background'] === '#ffffff'
&& $config['style'] === 'pandora_black'
+ && !is_metaconsole()
) {
$options['background'] = '#222222';
} else if ($options['background'] === '#222222'
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 19c5962a71..6b9aefa672 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-server
-Version: 7.0NG.759-220125
+Version: 7.0NG.759-220126
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 0006a8bc4e..c41e1211a6 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.759-220125"
+pandora_version="7.0NG.759-220126"
package_cpan=0
package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 49dd0fbe9c..3324ff34f1 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.759";
-my $pandora_build = "220125";
+my $pandora_build = "220126";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm
index 9d1736266f..92b48a8711 100644
--- a/pandora_server/lib/PandoraFMS/Core.pm
+++ b/pandora_server/lib/PandoraFMS/Core.pm
@@ -982,14 +982,17 @@ sub pandora_execute_alert ($$$$$$$$$;$$) {
$threshold = $action->{'action_threshold'} if (defined ($action->{'action_threshold'}) && $action->{'action_threshold'} > 0);
$threshold = $action->{'module_action_threshold'} if (defined ($action->{'module_action_threshold'}) && $action->{'module_action_threshold'} > 0);
if (time () >= ($action->{'last_execution'} + $threshold)) {
-
+ my $monitoring_event_custom_data = '';
+
+ push(@{$custom_data->{'actions'}}, safe_output($action->{'action_name'}));
+
# Does the action generate an event?
if (safe_output($action->{'name'}) eq "Monitoring Event") {
$event_generated = 1;
+ $monitoring_event_custom_data = $custom_data;
}
-
- pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros);
- push(@{$custom_data->{'actions'}}, safe_output($action->{'action_name'}));
+
+ pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $monitoring_event_custom_data);
} else {
if (defined ($module)) {
logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10);
@@ -1082,9 +1085,9 @@ Execute the given action.
=cut
##########################################################################
-sub pandora_execute_action ($$$$$$$$$;$) {
+sub pandora_execute_action ($$$$$$$$$;$$) {
my ($pa_config, $data, $agent, $alert,
- $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros) = @_;
+ $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $custom_data) = @_;
logger($pa_config, "Executing action '" . safe_output($action->{'name'}) . "' for alert '". safe_output($alert->{'name'}) . "' agent '" . (defined ($agent) ? safe_output($agent->{'nombre'}) : 'N/A') . "'.", 10);
@@ -1642,25 +1645,30 @@ sub pandora_execute_action ($$$$$$$$$;$) {
if ((! defined($alert->{'disable_event'})) || (defined($alert->{'disable_event'}) && $alert->{'disable_event'} == 0)) {
pandora_event(
- $pa_config,
- $event_text,
- (defined ($agent) ? $agent->{'id_grupo'} : 0),
- (defined ($fullagent) ? $fullagent->{'id_agente'} : 0),
- $priority,
- (defined($alert)
- ? defined($alert->{'id_template_module'})
- ? $alert->{'id_template_module'}
- : $alert->{'id'}
- : 0),
- (defined($alert) ? $alert->{'id_agent_module'} : 0),
- $event_type,
- 0,
- $dbh,
- $source,
- '',
- $comment,
- $id_extra,
- $tags);
+ $pa_config,
+ $event_text,
+ (defined ($agent) ? $agent->{'id_grupo'} : 0),
+ (defined ($fullagent) ? $fullagent->{'id_agente'} : 0),
+ $priority,
+ (defined($alert)
+ ? defined($alert->{'id_template_module'})
+ ? $alert->{'id_template_module'}
+ : $alert->{'id'}
+ : 0),
+ (defined($alert) ? $alert->{'id_agent_module'} : 0),
+ $event_type,
+ 0,
+ $dbh,
+ $source,
+ '',
+ $comment,
+ $id_extra,
+ $tags,
+ '',
+ '',
+ '',
+ p_encode_json($pa_config, $custom_data)
+ );
# Validate event (field1: agent name; field2: module name)
}
} elsif ($clean_name eq "Validate Event") {
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index ee36608a39..b6a9c25d51 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.759";
-my $pandora_build = "220125";
+my $pandora_build = "220126";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index ad19682385..a4580e7c41 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.759
-%define release 220125
+%define release 220126
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index a93bf4f664..a1ff75e255 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.759
-%define release 220125
+%define release 220126
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 63ed6aef08..f789e8d3e1 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.759"
-PI_BUILD="220125"
+PI_BUILD="220126"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index b6704ddb5d..213411386b 100755
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
-my $version = "7.0NG.759 Build 220125";
+my $version = "7.0NG.759 Build 220126";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 511ef09bf4..bbd96ae72a 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
-my $version = "7.0NG.759 Build 220125";
+my $version = "7.0NG.759 Build 220126";
# save program name for logging
my $progname = basename($0);