Merge branch '1827-Graficas_TIP_eje_x_no_mantiene_ratio' into 'develop'
1827 graficas tip eje x no mantiene ratio See merge request artica/pandorafms!1541
This commit is contained in:
commit
2bc4ed4ff2
|
@ -75,6 +75,14 @@ if (isInACL($ipOrigin)) {
|
||||||
if ($user_in_db !== false) {
|
if ($user_in_db !== false) {
|
||||||
$config['id_user'] = $user_in_db;
|
$config['id_user'] = $user_in_db;
|
||||||
$correctLogin = true;
|
$correctLogin = true;
|
||||||
|
|
||||||
|
//XXXX
|
||||||
|
session_start();
|
||||||
|
$_SESSION["id_usuario"] = $user;
|
||||||
|
session_write_close();
|
||||||
|
|
||||||
|
file_put_contents(session_save_path() . DIRECTORY_SEPARATOR . "pansess_" . session_id(), $user);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$no_login_msg = "Incorrect user credentials";
|
$no_login_msg = "Incorrect user credentials";
|
||||||
|
@ -177,6 +185,11 @@ if ($correctLogin) {
|
||||||
returnError('no_exist_operation', $returnType);
|
returnError('no_exist_operation', $returnType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//XXXXX
|
||||||
|
if (file_exists(session_save_path() . DIRECTORY_SEPARATOR . "pansess_" . session_id())) {
|
||||||
|
unlink(session_save_path() . DIRECTORY_SEPARATOR . "pansess_" . session_id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// TODO: Implement a new switch in config to enable / disable
|
// TODO: Implement a new switch in config to enable / disable
|
||||||
|
|
|
@ -14,9 +14,16 @@
|
||||||
|
|
||||||
// Global & session manageme
|
// Global & session manageme
|
||||||
session_id($_GET["session_id"]);
|
session_id($_GET["session_id"]);
|
||||||
|
if (file_exists(session_save_path() . "/pansess_" . session_id())) {
|
||||||
|
$user = file_get_contents(session_save_path() . "/pansess_" . session_id());
|
||||||
|
}
|
||||||
session_start();
|
session_start();
|
||||||
|
if (isset($user)) {
|
||||||
|
$_SESSION["id_usuario"] = $user;
|
||||||
|
}
|
||||||
session_write_close();
|
session_write_close();
|
||||||
|
|
||||||
|
|
||||||
require_once ('config.php');
|
require_once ('config.php');
|
||||||
require_once ($config['homedir'] . '/include/auth/mysql.php');
|
require_once ($config['homedir'] . '/include/auth/mysql.php');
|
||||||
require_once ($config['homedir'] . '/include/functions.php');
|
require_once ($config['homedir'] . '/include/functions.php');
|
||||||
|
@ -117,4 +124,4 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2967,7 +2967,6 @@ function color_graph_array(){
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
|
|
||||||
//XXX Colores fijos para eventos, alertas, desconocidos, percentil, overlapped, summatory, average, projection
|
|
||||||
$color_series['event'] = array(
|
$color_series['event'] = array(
|
||||||
'border' => '#ff0000',
|
'border' => '#ff0000',
|
||||||
'color' => '#FF5733',
|
'color' => '#FF5733',
|
||||||
|
@ -3239,7 +3238,7 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal
|
||||||
$session_id = session_id();
|
$session_id = session_id();
|
||||||
|
|
||||||
$result = exec(
|
$result = exec(
|
||||||
$config['phantomjs_bin'] ."/phantomjs " . $file_js . " " .
|
io_safe_output($config['phantomjs_bin']) . DIRECTORY_SEPARATOR ."phantomjs " . $file_js . " " .
|
||||||
$url . " '" .
|
$url . " '" .
|
||||||
$type_graph_pdf . "' '" .
|
$type_graph_pdf . "' '" .
|
||||||
$params_encode_json . "' '" .
|
$params_encode_json . "' '" .
|
||||||
|
|
|
@ -234,10 +234,9 @@ function grafico_modulo_sparse_data_chart (
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
//XXXXX
|
//To avoid showing all the data at the same time which can be reloaded, a system of boxes is made starting from a constant = 250
|
||||||
//Para evitar mostrar todos los datos a la vez lo cual puede recargar se hace un sistema de cajas que parte de una constante = 250
|
//and the selected period of time in addition to being able to reduce the level of boxes, that is, increasing the level of detail of the graph
|
||||||
//y el periodo de tiempo seleccionado ademas de poder ir reducciendo el nivel de cajas es decir aumentando el nivel de detalle de la grafica
|
//until the full option that would show all the points (data) that that period contains.
|
||||||
//hasta la opcion full que mostraria todos los puntos(datos) que contiene ese periodo.
|
|
||||||
$data_slice = $date_array['period'] / (250 * $params['zoom']);
|
$data_slice = $date_array['period'] / (250 * $params['zoom']);
|
||||||
|
|
||||||
if( $data_module_graph['id_module_type'] == 23 ||
|
if( $data_module_graph['id_module_type'] == 23 ||
|
||||||
|
@ -431,7 +430,7 @@ function grafico_modulo_sparse_data(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//XXX Esto es para un tipo especifico de report que consiste en pasarle un intervalo y hacer suma media y avg.
|
//This is for a specific type of report that consists in passing an interval and doing the average sum and avg.
|
||||||
if($params['force_interval'] != ''){
|
if($params['force_interval'] != ''){
|
||||||
$period_time_interval = $date_array['period'] * 1000;
|
$period_time_interval = $date_array['period'] * 1000;
|
||||||
$start_period = $date_array['start_date'] * 1000;
|
$start_period = $date_array['start_date'] * 1000;
|
||||||
|
@ -1331,7 +1330,6 @@ function graphic_combined_module (
|
||||||
$params['zoom'] = 1;
|
$params['zoom'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//XXXXXXXX
|
|
||||||
//XXXX Configurable
|
//XXXX Configurable
|
||||||
$params['grid_color'] = '#C1C1C1';
|
$params['grid_color'] = '#C1C1C1';
|
||||||
$params['legend_color'] = '#636363';
|
$params['legend_color'] = '#636363';
|
||||||
|
@ -1460,7 +1458,7 @@ function graphic_combined_module (
|
||||||
}
|
}
|
||||||
|
|
||||||
//XXX arreglar estas
|
//XXX arreglar estas
|
||||||
$long_index = '';
|
$long_index = '';
|
||||||
|
|
||||||
switch ($params_combined['stacked']) {
|
switch ($params_combined['stacked']) {
|
||||||
default:
|
default:
|
||||||
|
@ -4283,9 +4281,6 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
|
||||||
global $graphic_type;
|
global $graphic_type;
|
||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
//XXXXXX
|
|
||||||
$width = 90;
|
|
||||||
$height = 100;
|
|
||||||
|
|
||||||
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
|
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
|
||||||
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
|
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
|
||||||
|
|
|
@ -1676,15 +1676,17 @@ function pandoraFlotArea( graph_id, values, legend,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//XXXXXXXREvisar esto
|
/*
|
||||||
if (vconsole) {
|
//XXXREvisar esto
|
||||||
var myCanvas = plot.getCanvas();
|
if (vconsole) {
|
||||||
plot.setupGrid(); // redraw plot to new size
|
var myCanvas = plot.getCanvas();
|
||||||
plot.draw();
|
plot.setupGrid(); // redraw plot to new size
|
||||||
var image = myCanvas.toDataURL("image/png");
|
plot.draw();
|
||||||
return;
|
var image = myCanvas.toDataURL("image/png");
|
||||||
}
|
return;
|
||||||
*/
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Adjust the overview plot to the width and position of the main plot
|
// Adjust the overview plot to the width and position of the main plot
|
||||||
adjust_left_width_canvas(graph_id, 'overview_'+graph_id);
|
adjust_left_width_canvas(graph_id, 'overview_'+graph_id);
|
||||||
update_left_width_canvas(graph_id);
|
update_left_width_canvas(graph_id);
|
||||||
|
|
|
@ -250,11 +250,6 @@ function flot_area_graph (
|
||||||
// Trick to get translated string from javascript
|
// Trick to get translated string from javascript
|
||||||
$return .= html_print_input_hidden('unknown_text', __('Unknown'), true);
|
$return .= html_print_input_hidden('unknown_text', __('Unknown'), true);
|
||||||
|
|
||||||
//XXXX Meter en params
|
|
||||||
/*
|
|
||||||
mirar tmb lo de force integer
|
|
||||||
*/
|
|
||||||
|
|
||||||
$values = json_encode($array_data);
|
$values = json_encode($array_data);
|
||||||
$legend = json_encode($legend);
|
$legend = json_encode($legend);
|
||||||
$series_type = json_encode($series_type);
|
$series_type = json_encode($series_type);
|
||||||
|
|
Loading…
Reference in New Issue