mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Merge branch '2423-Se_toman_como_data_las_graficas_boleanas-2' into 'develop'
2423 se toman como data las graficas boleanas 2 See merge request artica/pandorafms!1576
This commit is contained in:
commit
dd3c498af1
@ -257,8 +257,16 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//all points(data)
|
//all points(data) and boolean
|
||||||
if($params['zoom'] == 5){
|
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 (
|
$data = db_get_all_rows_filter (
|
||||||
'tagente_datos',
|
'tagente_datos',
|
||||||
array ('id_agente_modulo' => (int)$agent_module_id,
|
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||||
@ -271,38 +279,17 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if($data_module_graph['id_module_type'] == 2 ||
|
$data = db_get_all_rows_filter (
|
||||||
$data_module_graph['id_module_type'] == 6 ||
|
'tagente_datos',
|
||||||
$data_module_graph['id_module_type'] == 21 ||
|
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||||
$data_module_graph['id_module_type'] == 18 ||
|
"utimestamp > '". $date_array['start_date']. "'",
|
||||||
$data_module_graph['id_module_type'] == 9 ||
|
"utimestamp < '". $date_array['final_date'] . "'",
|
||||||
$data_module_graph['id_module_type'] == 31 ||
|
'group' => "ROUND(utimestamp / $data_slice)",
|
||||||
$data_module_graph['id_module_type'] == 100){
|
'order' => 'utimestamp ASC'),
|
||||||
$data = db_get_all_rows_filter (
|
array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'),
|
||||||
'tagente_datos',
|
'AND',
|
||||||
array ('id_agente_modulo' => (int)$agent_module_id,
|
$data_module_graph['history_db']
|
||||||
"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']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,18 +296,20 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$data = array();
|
if(!modules_is_boolean($id)){
|
||||||
$data[0] = __('Zoom');
|
$data = array();
|
||||||
$options = array ();
|
$data[0] = __('Zoom');
|
||||||
$options[$zoom] = 'x' . $zoom;
|
$options = array ();
|
||||||
$options[1] = 'x1';
|
$options[$zoom] = 'x' . $zoom;
|
||||||
$options[2] = 'x2';
|
$options[1] = 'x1';
|
||||||
$options[3] = 'x3';
|
$options[2] = 'x2';
|
||||||
$options[4] = 'x4';
|
$options[3] = 'x3';
|
||||||
$options[5] = __('full');
|
$options[4] = 'x4';
|
||||||
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
|
$options[5] = __('full');
|
||||||
$table->data[] = $data;
|
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
|
||||||
$table->rowclass[] = '';
|
$table->data[] = $data;
|
||||||
|
$table->rowclass[] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Time range');
|
$data[0] = __('Time range');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user