diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 0e01bd051a..0d7e5fc0b6 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -406,9 +406,9 @@ $filterTable->data[1][0] = html_print_submit_button( ); // Print filter table. -echo '
', ''.__('Filter').'', __('Filter'), 'filter', @@ -418,7 +418,6 @@ ui_toggle( 'white-box-content no_border', 'filter-datatable-main box-flat white_table_graph fixed_filter_bar' ); -echo ''; // Data table. $selected = true; diff --git a/pandora_console/godmode/alerts/alert_view.php b/pandora_console/godmode/alerts/alert_view.php index 67b31ed3f3..e8b906b220 100644 --- a/pandora_console/godmode/alerts/alert_view.php +++ b/pandora_console/godmode/alerts/alert_view.php @@ -61,13 +61,19 @@ if ($default_action != 0) { } // Header. -ui_print_page_header( +ui_print_standard_header( __('Alert details'), 'images/op_alerts.png', false, '', false, - '' + [], + [ + [ + 'link' => '', + 'label' => __('Alerts'), + ], + ] ); // TABLE DETAILS. diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 1c6740efff..8bc5cc500b 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4356,7 +4356,7 @@ function events_page_details($event, $server_id=0) $graph_params_str = http_build_query($graph_params); - $link = "winopeng_var('".$url.'?'.$graph_params_str."','".$win_handle."', 800, 480)"; + $link = 'winopeng_var("'.$url.'?'.$graph_params_str.'","'.$win_handle.'", 800, 480)'; $data[1] = html_print_button(__('View graph'), 'view_graph_button', false, $link, ['mode' => 'link'], true); $table_details->data[] = $data; } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index dbb988782a..6b6815b755 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -1153,6 +1153,27 @@ function modules_get_raw_data($id_agent_module, $date_init, $date_end) } +function module_get_min_max_tagente_datos($id_agent_module, $date_init, $date_end) +{ + $table = modules_get_table_data($id_agent_module, null); + + $datelimit = ($date_init - $date_end); + $search_in_history_db = db_search_in_history_db($datelimit); + + $data = db_get_all_rows_sql( + ' + SELECT max(datos) as max, min(datos) as min + FROM '.$table.' + WHERE id_agente_modulo = '.$id_agent_module.' + AND utimestamp >= '.$date_init.' + AND utimestamp <= '.$date_end, + $search_in_history_db + ); + + return $data; +} + + function modules_get_agent_groups($id_agent_module) { $return = false; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index c0005c8cd9..1c632d6f9e 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3885,6 +3885,7 @@ function ui_print_datatable(array $parameters) $("div.dataTables_paginate").hide(); $("div.dataTables_info").hide(); $("div.dataTables_length").hide(); + $("div.dt-buttons").hide(); if (dt_'.$table_id.'.page.info().pages > 1) { $(".dataTables_paginate.paging_simple_numbers").show() @@ -3895,6 +3896,7 @@ function ui_print_datatable(array $parameters) $("div.dataTables_paginate").show(); $("div.dataTables_info").show(); $("div.dataTables_length").show(); + $("div.dt-buttons").show(); if (dt_'.$table_id.'.page.info().pages == 1) { $(".dataTables_paginate.paging_simple_numbers").hide() diff --git a/pandora_console/include/lib/Dashboard/Widgets/AvgSumMaxMinModule.php b/pandora_console/include/lib/Dashboard/Widgets/AvgSumMaxMinModule.php index c1ea70eaba..cf7edb70c6 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/AvgSumMaxMinModule.php +++ b/pandora_console/include/lib/Dashboard/Widgets/AvgSumMaxMinModule.php @@ -316,6 +316,10 @@ class AvgSumMaxMinModule extends Widget $values['unit'] = $decoder['unit']; } + if (isset($decoder['layout']) === true) { + $values['layout'] = $decoder['layout']; + } + return $values; } @@ -501,6 +505,18 @@ class AvgSumMaxMinModule extends Widget ], ]; + // Layout. + $inputs[] = [ + 'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true), + 'arguments' => [ + 'wrapper' => 'div', + 'name' => 'layout', + 'type' => 'switch', + 'value' => $values['layout'], + 'return' => true, + ], + ]; + return $inputs; } @@ -525,6 +541,7 @@ class AvgSumMaxMinModule extends Widget $values['sizeLabel'] = \get_parameter_switch('sizeLabel'); $values['text_color'] = \get_parameter('text_color', 0); $values['unit'] = \get_parameter_switch('unit'); + $values['layout'] = \get_parameter_switch('layout'); return $values; } @@ -601,13 +618,13 @@ class AvgSumMaxMinModule extends Widget break; case 2: - $rows = modules_get_min_max_data($id_module, $to); + $rows = module_get_min_max_tagente_datos($id_module, $to, $now); $data = $rows[0]['max']; break; case 3: - $rows = modules_get_min_max_data($id_module, $to); + $rows = module_get_min_max_tagente_datos($id_module, $to, $now); $data = $rows[0]['min']; break; @@ -621,11 +638,22 @@ class AvgSumMaxMinModule extends Widget $sizeLabel = (isset($this->values['sizeLabel']) === true) ? $this->values['sizeLabel'] : 40; $sizeValue = (isset($this->values['sizeValue']) === true) ? $this->values['sizeValue'] : 40; - $output .= '