diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 11012b96eb..dc2616765c 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1416,7 +1416,7 @@ function graphic_combined_module( } } - if (isset($sources) && is_array($sources)) { + if (isset($sources) === true && is_array($sources) === true) { $weights = []; $labels = []; $modules = []; @@ -1498,6 +1498,10 @@ function graphic_combined_module( } } + if ((bool) $params_combined['from_interface'] === true) { + $labels = []; + } + if ($module_list) { $params_combined['modules_id'] = $module_list; } else { diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index cd764dbf32..e5342f0a2c 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -5980,11 +5980,7 @@ function reporting_get_event_histogram($events, $text_header_event=false) include_once '../../include/graphs/functions_gd.php'; } - $max_value = count($events); - - if (is_metaconsole()) { - $max_value = SECONDS_1HOUR; - } + $period = SECONDS_1DAY; if (!$text_header_event) { $text_header_event = __('Events info (1hr.)'); @@ -6057,7 +6053,7 @@ function reporting_get_event_histogram($events, $text_header_event=false) } else { $graph_data[] = [ 'data' => $color, - 'utimestamp' => 1, + 'utimestamp' => SECONDS_1DAY, ]; } } @@ -6076,9 +6072,9 @@ function reporting_get_event_histogram($events, $text_header_event=false) $slicebar = flot_slicesbar_graph( $graph_data, - $max_value, - '450px;border:0', - 25, + $period, + '400px;border:0', + 40, $full_legend, $colors, $config['fontpath'], @@ -6091,7 +6087,7 @@ function reporting_get_event_histogram($events, $text_header_event=false) [], true, 1, - false, + 450, true ); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 6ae90f29ef..d31a7010f9 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4001,11 +4001,12 @@ function ui_toggle( ); // Options. + $style = 'overflow:hidden;'; if ($hidden_default) { - $style = 'display:none'; + $style .= 'height:0;'; $original = $img_b; } else { - $style = ''; + $style .= 'height:auto;'; $original = $img_a; } @@ -4111,24 +4112,24 @@ function ui_toggle( $output .= ' if (is_metaconsole == 0) {'; $output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n"; - $output .= " $('#tgl_div_".$uniqid."').toggle();\n"; + $output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n"; $output .= " }\n"; $output .= " else {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n"; - $output .= " $('#tgl_div_".$uniqid."').toggle();\n"; + $output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n"; $output .= " }\n"; $output .= " }\n"; $output .= " });\n"; $output .= " $('#tgl_ctrl_".$uniqid."').click(function() {\n"; $output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n"; - $output .= " $('#tgl_div_".$uniqid."').toggle();\n"; + $output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n"; $output .= " $('#image_".$uniqid."').attr({src: '".$image_a."'});\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', true);\n"; $output .= " }\n"; $output .= " else {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n"; - $output .= " $('#tgl_div_".$uniqid."').toggle();\n"; + $output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n"; $output .= " $('#image_".$uniqid."').attr({src: '".$image_b."'});\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', false);\n"; $output .= " }\n"; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 16e1b31a82..629e1a48f4 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2461,14 +2461,14 @@ function pandoraFlotArea( ); } else { $.each(update_legend, function(index, value) { - if (typeof value[x] !== "undefined") { + if (typeof value[x - 1] !== "undefined") { data_legend[index] = " Min: " + - number_format(value[x].min, 0, unit, short_data, divisor) + + number_format(value[x - 1].min, 0, unit, short_data, divisor) + " Max: " + - number_format(value[x].max, 0, unit, short_data, divisor) + + number_format(value[x - 1].max, 0, unit, short_data, divisor) + " Avg: " + - number_format(value[x].avg, 0, unit, short_data, divisor); + number_format(value[x - 1].avg, 0, unit, short_data, divisor); } else { data_legend[index] = " Min: " + 0 + " Max: " + 0 + " Avg: " + 0; } diff --git a/pandora_console/include/styles/agent_view.css b/pandora_console/include/styles/agent_view.css index 9b0ce63bdd..c4ce4f7d47 100644 --- a/pandora_console/include/styles/agent_view.css +++ b/pandora_console/include/styles/agent_view.css @@ -6,10 +6,6 @@ div#bullets_modules span { font-weight: 700; } -table#agent_interface_info .noresizevc.graph { - margin-bottom: 10px; -} - div.agent_details_agent_alias { flex: 1; } diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 91714803f9..970da79aaa 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -681,9 +681,8 @@ if (!empty($network_interfaces)) { $table_interface->style['interface_graph'] = 'width: 20px;padding-top:0px;padding-bottom:0px;'; $table_interface->style['interface_event_graph'] = 'width: 35%;padding-top:0px;padding-bottom:0px;'; $table_interface->align['interface_event_graph'] = 'right'; - // $table_interface->style['interface_event_graph'] = 'width: 5%;padding-top:0px;padding-bottom:0px;'; - $table_interface->align['interface_event_graph_text'] = 'left'; - $table_interface->style['interface_name'] = 'width: 10%;padding-top:0px;padding-bottom:0px;'; + $table_interface->style['interface_event_graph'] = 'width: 3%;padding-top:0px;padding-bottom:0px;'; + $table_interface->style['interface_name'] = 'width: 30%;padding-top:0px;padding-bottom:0px;'; $table_interface->align['interface_name'] = 'left'; $table_interface->align['interface_ip'] = 'left'; $table_interface->align['last_contact'] = 'left'; @@ -819,12 +818,6 @@ if (!empty($network_interfaces)) { $data['interface_mac'] = $interface['mac']; $data['last_contact'] = __('Last contact: ').$last_contact; $data['interface_event_graph'] = $e_graph; - if ($event_text_cont == 0) { - $data['interface_event_graph_text'] = ui_print_help_tip('Module events graph', true); - $event_text_cont++; - } else { - $data['interface_event_graph_text'] = ''; - } $table_interface->data[] = $data; } @@ -939,7 +932,7 @@ if ($table_access_rate) { echo $agent_incidents; -if (isset($table_interface)) { +if (isset($table_interface) === true) { ui_toggle( html_print_table($table_interface, true), ''.__('Interface information (SNMP)').'', diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 7e003eb013..6dd25aee23 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -95,10 +95,12 @@ if ($refresh > 0) { <?php echo __('%s Interface Graph', get_product_name()).' ('.agents_get_alias($agent_id).' - '.$interface_name; ?>) + +