mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +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,
|
||||||
@ -270,26 +278,6 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
$data_module_graph['history_db']
|
$data_module_graph['history_db']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
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{
|
else{
|
||||||
$data = db_get_all_rows_filter (
|
$data = db_get_all_rows_filter (
|
||||||
'tagente_datos',
|
'tagente_datos',
|
||||||
@ -304,7 +292,6 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if($data === false){
|
if($data === false){
|
||||||
$data = array();
|
$data = array();
|
||||||
|
@ -296,6 +296,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
|
if(!modules_is_boolean($id)){
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Zoom');
|
$data[0] = __('Zoom');
|
||||||
$options = array ();
|
$options = array ();
|
||||||
@ -308,6 +309,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
|
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Time range');
|
$data[0] = __('Time range');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user