diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index ea3b0c8a56..c02be7dcc0 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -257,8 +257,16 @@ function grafico_modulo_sparse_data_chart ( ); } else{ - //all points(data) - if($params['zoom'] == 5){ + //all points(data) and boolean + if( $params['zoom'] == 5 || + $data_module_graph['id_module_type'] == 2 || + $data_module_graph['id_module_type'] == 6 || + $data_module_graph['id_module_type'] == 21 || + $data_module_graph['id_module_type'] == 18 || + $data_module_graph['id_module_type'] == 9 || + $data_module_graph['id_module_type'] == 31 || + $data_module_graph['id_module_type'] == 100 ){ + $data = db_get_all_rows_filter ( 'tagente_datos', array ('id_agente_modulo' => (int)$agent_module_id, @@ -271,38 +279,17 @@ function grafico_modulo_sparse_data_chart ( ); } else{ - if($data_module_graph['id_module_type'] == 2 || - $data_module_graph['id_module_type'] == 6 || - $data_module_graph['id_module_type'] == 21 || - $data_module_graph['id_module_type'] == 18 || - $data_module_graph['id_module_type'] == 9 || - $data_module_graph['id_module_type'] == 31 || - $data_module_graph['id_module_type'] == 100){ - $data = db_get_all_rows_filter ( - 'tagente_datos', - array ('id_agente_modulo' => (int)$agent_module_id, - "utimestamp > '". $date_array['start_date']. "'", - "utimestamp < '". $date_array['final_date'] . "'", - 'group' => "ROUND(utimestamp / $data_slice)", - 'order' => 'utimestamp ASC'), - array ('ROUND(sum(datos)/count(datos)) as datos', 'min(utimestamp) as utimestamp'), - 'AND', - $data_module_graph['history_db'] - ); - } - else{ - $data = db_get_all_rows_filter ( - 'tagente_datos', - array ('id_agente_modulo' => (int)$agent_module_id, - "utimestamp > '". $date_array['start_date']. "'", - "utimestamp < '". $date_array['final_date'] . "'", - 'group' => "ROUND(utimestamp / $data_slice)", - 'order' => 'utimestamp ASC'), - array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'), - 'AND', - $data_module_graph['history_db'] - ); - } + $data = db_get_all_rows_filter ( + 'tagente_datos', + array ('id_agente_modulo' => (int)$agent_module_id, + "utimestamp > '". $date_array['start_date']. "'", + "utimestamp < '". $date_array['final_date'] . "'", + 'group' => "ROUND(utimestamp / $data_slice)", + 'order' => 'utimestamp ASC'), + array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'), + 'AND', + $data_module_graph['history_db'] + ); } } diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index eb19a0eb47..faa86242d6 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -296,18 +296,20 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent); $table->data[] = $data; $table->rowclass[] = ''; - $data = array(); - $data[0] = __('Zoom'); - $options = array (); - $options[$zoom] = 'x' . $zoom; - $options[1] = 'x1'; - $options[2] = 'x2'; - $options[3] = 'x3'; - $options[4] = 'x4'; - $options[5] = __('full'); - $data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false); - $table->data[] = $data; - $table->rowclass[] = ''; + if(!modules_is_boolean($id)){ + $data = array(); + $data[0] = __('Zoom'); + $options = array (); + $options[$zoom] = 'x' . $zoom; + $options[1] = 'x1'; + $options[2] = 'x2'; + $options[3] = 'x3'; + $options[4] = 'x4'; + $options[5] = __('full'); + $data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false); + $table->data[] = $data; + $table->rowclass[] = ''; + } $data = array(); $data[0] = __('Time range');