diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php
index bec06cfada..fef8d1abeb 100644
--- a/pandora_console/include/chart_generator.php
+++ b/pandora_console/include/chart_generator.php
@@ -12,15 +12,11 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-// XXX
-/*
-if (! isset($_SESSION['id_usuario'])) {
- session_start();
- session_write_close();
-}
-*/
-
// Global & session manageme
+session_id($_GET["session_id"]);
+session_start();
+session_write_close();
+
require_once ('config.php');
require_once ($config['homedir'] . '/include/auth/mysql.php');
require_once ($config['homedir'] . '/include/functions.php');
@@ -32,8 +28,9 @@ require_once ($config['homedir'] . '/include/functions_modules.php');
require_once ($config['homedir'] . '/include/functions_agents.php');
require_once ($config['homedir'] . '/include/functions_tags.php');
-// XXX
-//check_login();
+check_login();
+
+global $config;
/*
$params_json = base64_decode((string) get_parameter('params'));
@@ -55,14 +52,14 @@ if ($config["metaconsole"] && !empty($server_id)) {
exit;
}
}
-
+*/
$user_language = get_user_language($config['id_user']);
if (file_exists ('languages/'.$user_language.'.mo')) {
$l10n = new gettext_reader (new CachedFileReader ('languages/'.$user_language.'.mo'));
$l10n->load_tables();
}
-*/
+
?>
@@ -95,12 +92,10 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
';
}
}
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index 48bab6cfdb..d25fc71b09 100644
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -240,7 +240,7 @@ function grafico_modulo_sparse_data_chart (
$data_module_graph['id_module_type'] == 10 ||
$data_module_graph['id_module_type'] == 33 ){
-//XXXXXXXXXXX
+//XXXXXXXXXXX SLICES
/*
"SELECT count(*) as data, min(utimestamp) as utimestamp
FROM tagente_datos_string
@@ -865,7 +865,6 @@ function grafico_modulo_sparse ($params) {
$params['font'] = $config['fontpath'];
$params['font-size'] = $config['font_size'];
- //XXXXXXXXXXXX se devuelve phantom.js
if($params['only_image']){
return generator_chart_to_pdf('sparse', $params);
}
@@ -1151,7 +1150,7 @@ function graphic_combined_module (
$params,
$params_combined
) {
- //XXX seteo todos los parametros
+
if(!isset($params_combined['from_interface'])){
$params_combined['from_interface'] = false;
}
@@ -1216,7 +1215,6 @@ function graphic_combined_module (
}
- //XXX seteo los parametros
if(!isset($params['period'])){
return false;
}
@@ -1320,7 +1318,7 @@ function graphic_combined_module (
}
$params['graph_combined'] = true;
- //XXXX
+
if($params['only_image']){
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
}
@@ -1436,7 +1434,7 @@ function graphic_combined_module (
);
}
- //XXX no se que hacen
+ //XXX arreglar estas
$long_index = '';
$color = array();
@@ -1765,7 +1763,6 @@ function graphic_combined_module (
}
}
- //XXXX
$graph_values = $temp;
$width = 1024;
@@ -1857,7 +1854,6 @@ function graphic_combined_module (
$i++;
}
- //XXXX
$graph_values = $temp;
$width = 200;
@@ -1926,7 +1922,6 @@ function graphic_combined_module (
}
}
- //XXXX
$graph_values = $temp;
$width = 1024;
@@ -2046,7 +2041,6 @@ function graphic_combined_module (
}
$i++;
- //XXXX
$graph_values = $temp;
return stacked_thermometers(
@@ -2129,7 +2123,6 @@ function graphic_combined_module (
$temp['total_modules'] = $total_modules;
- //XXXX
$graph_values = $temp;
$width = 1024;
@@ -2319,7 +2312,6 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0, $return =
}
}
- //XXXXX
if($config["fixed_graph"] == false){
$water_mark = array('file' =>
$config['homedir'] . "/images/logo_vertical_water.png",
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index df60e548ab..c17b4650af 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -2805,21 +2805,6 @@ function agents_get_network_interfaces_array(
$row_interface['status'] = $interface['status_image'];
$row_interface['chart'] = null;
- //XXXX ancho y largo
- // Get chart
- /*
- reporting_set_conf_charts($width, $height, $only_image,
- $type, $content, $ttl);
-
- if (!empty($force_width_chart)) {
- $width = $force_width_chart;
- }
-
- if (!empty($force_height_chart)) {
- $height = $force_height_chart;
- }
- */
-
$width = null;
$height = null;
@@ -3631,11 +3616,6 @@ function reporting_projection_graph($report, $content,
set_time_limit(500);
- // Get chart
- //reporting_set_conf_charts($width, $height, $only_image, $type,
- // $content, $ttl);
-
- //XXXX width y height
switch ($type) {
case 'dinamic':
case 'static':
@@ -6505,7 +6485,7 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
'period' => $content['period'],
'title' => $label,
'avg_only' => $only_avg,
- 'pure' => false, //XXX
+ 'pure' => false,
'date' => $report["datetime"],
'only_image' => $only_image,
'homeurl' => ui_get_full_url(false, false, false, false),
diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php
index 3d48567e6a..7ddd651830 100644
--- a/pandora_console/include/graphs/fgraph.php
+++ b/pandora_console/include/graphs/fgraph.php
@@ -172,8 +172,7 @@ function vbar_graph(
$backgroundColor = 'white',
$from_ux = false,
$from_wux = false,
- $tick_color = 'white'
-) {
+ $tick_color = 'white') {
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
@@ -224,13 +223,12 @@ function area_graph(
$agent_module_id, $array_data,
$legend, $series_type, $date_array,
$data_module_graph, $params, $water_mark,
- $array_events_alerts
-) {
+ $array_events_alerts) {
global $config;
include_once('functions_flot.php');
- //setup_watermark($water_mark, $water_mark_file, $water_mark_url);
+ setup_watermark($water_mark, $water_mark_file, $water_mark_url);
return flot_area_graph(
$agent_module_id,
@@ -276,15 +274,15 @@ function stacked_thermometers($flash_chart, $chart_data, $width, $height,
$color, $legend, $long_index, $no_data_image, $xaxisname = "",
$yaxisname = "", $water_mark = "", $font = '', $font_size = '',
$unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white') {
-
+
include_once('functions_d3.php');
-
+
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
-
+
if (empty($chart_data)) {
return '';
}
-
+
return d3_thermometers(
$chart_data,
$width,
@@ -323,23 +321,6 @@ function stacked_gauge($chart_data, $width, $height,
);
}
-function kiviat_graph($graph_type, $flash_chart, $chart_data, $width,
- $height, $no_data_image, $ttl = 1, $homedir="") {
-
- if (empty($chart_data)) {
- return '
';
- }
-
- $graph = array();
- $graph['data'] = $chart_data;
- $graph['width'] = $width;
- $graph['height'] = $height;
-
- $id_graph = serialize_in_temp($graph, null, $ttl);
-
- return "
";
-}
-
function hbar_graph($flash_chart, $chart_data, $width, $height,
$color, $legend, $long_index, $no_data_image, $xaxisname = "",
$yaxisname = "", $water_mark = "", $font = '', $font_size = '',
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index cd95fe957b..e5fe88e073 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -859,9 +859,8 @@ function pandoraFlotArea(
graph_id, values, legend, agent_module_id,
series_type, water_mark, date_array,
data_module_graph, params,
- force_integer,
- background_color, legend_color, short_data,
- events_array
+ force_integer, background_color,
+ legend_color, short_data, events_array
) {
//diferents vars
@@ -2397,8 +2396,6 @@ function get_event_details (event_ids) {
return table;
}
-
-//XXXXXXXXXX
//Ajusta la grafica pequenña con el desplazamiento del eje y
function adjust_left_width_canvas(adapter_id, adapted_id) {
var adapter_left_margin = $('#'+adapter_id+' .yAxis .tickLabel').width();
@@ -2408,8 +2405,6 @@ function adjust_left_width_canvas(adapter_id, adapted_id) {
$('#'+adapted_id).css('margin-left', adapter_left_margin);
}
-
-//XXXXXXXXXXX
//Ajusta el ancho de la grafica pequeña con respecto a la grande
function update_left_width_canvas(graph_id) {
$('#overview_'+graph_id).width($('#'+graph_id).width());
diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php
index d4dff7d964..558078f05c 100644
--- a/pandora_console/include/graphs/functions_flot.php
+++ b/pandora_console/include/graphs/functions_flot.php
@@ -129,7 +129,6 @@ function flot_area_graph (
break;
}
- ///XXXXXXX los px caca
// Parent layer
$return = "