diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index fdc6732de1..c6b005a2ab 100755
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -773,7 +773,8 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
}
// Build the data of the current period
- $data_returned = grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
+ $data_returned = grafico_modulo_sparse_data ($agent_module_id,
+ $period, $show_events,
$width, $height , $title, $unit_name,
$show_alerts, $avg_only,
$date, $unit, $baseline, $return_data, $show_title,
@@ -801,8 +802,9 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
$flash_chart = false;
}
- $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
- 'url' => ui_get_full_url("/images/logo_vertical_water.png"));
+ $water_mark = array('file' =>
+ $config['homedir'] . "/images/logo_vertical_water.png",
+ 'url' => ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png");
if ($compare === 'separated') {
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index a70d2f8370..c5e8913f92 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -2530,7 +2530,9 @@ function reporting_alert_reporting ($id_group, $period = 0, $date = 0, $return =
$data[__('Alerts not fired')] = $not_fired_percentage;
$output .= pie3d_graph(false, $data, 280, 150,
- __("other"), ui_get_full_url(false) . '/', $config['homedir'] . "/images/logo_vertical_water.png",
+ __("other"),
+ ui_get_full_url(false, false, false, false) . '/',
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$output .= ''.__('Alerts fired').': '.sizeof ($alerts_fired).'
';
@@ -2606,7 +2608,9 @@ function reporting_monitor_health ($id_group, $period = 0, $date = 0, $return =
$data[__('Monitors BAD')] = $not_down_percentage;
$output .= pie3d_graph(false, $data, 280, 150,
- __("other"), ui_get_full_url(false) . '/', $config['homedir'] . "/images/logo_vertical_water.png",
+ __("other"),
+ ui_get_full_url(false, false, false, false) . '/',
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
if (!$return)
@@ -3503,20 +3507,20 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table->colspan[$next_row][0] = 3;
$table->cellstyle[$next_row][0] = 'text-align: center;';
-
+
$data = array ();
$moduletype_name = modules_get_moduletype_name(
modules_get_agentmodule_type(
$content['id_agent_module']));
-
+
$only_avg = true;
// Due to database compatibility problems, the 'only_avg' value
// is stored into the json contained into the 'style' column.
if (isset($content['style'])) {
$style_json = io_safe_output($content['style']);
$style = json_decode($style_json, true);
-
+
if (isset($style['only_avg'])) {
$only_avg = (bool) $style['only_avg'];
}
@@ -3550,7 +3554,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0,
true,
$only_image,
- ui_get_full_url(false) . '/',
+ ui_get_full_url(false, false, false, false),
1,
false,
'',
@@ -3609,7 +3613,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0,
$report["datetime"],
true,
- ui_get_full_url(false) . '/',
+ ui_get_full_url(false, false, false, false) . '/',
1,
// Important parameter, this tell to graphic_combined_module function that is a projection graph
$output_projection,
@@ -3676,7 +3680,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data = array ();
$data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'],
false, $sizgraph_w, $sizgraph_h, '', '', false, true, true,
- $report["datetime"], '', true, 0, true, $only_image, ui_get_full_url(false) . '/');
+ $report["datetime"], '', true, 0, true, $only_image,
+ ui_get_full_url(false, false, false, false));
/*$data[0] = graphic_combined_module(
$modules,
@@ -3748,7 +3753,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$graph["stacked"],
$report["datetime"],
$only_image,
- ui_get_full_url(false) . '/');
+ ui_get_full_url(false, false, false, false));
array_push ($table->data, $data);
break;
@@ -4271,47 +4276,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// $data = array();
// $data_pie_graph = json_encode ($data_graph);
if ($show_graphs && !empty($slas)) {
- // $data[0] = pie3d_graph(false, $data_graph,
- // 500, 150, __("other"),
- // ui_get_full_url(false, false, false, false),
- // $config['homedir'] . "/images/logo_vertical_water.png",
- // $config['fontpath'], $config['font_size']);
-
-
- // //Print resume
- // $table_resume = null;
- // $table_resume->head[0] = __('Average Value');
-
- // $table_resume->data[0][0] = '';
- // $table_resume->data[0][0] .= format_numeric($total_SLA / count($sla_showed), 2);
- // $table_resume->data[0][0] .= "%";
-
- // $data[1] = html_print_table($table_resume, true);
-
- // $table_resume = null;
- // $table_resume->head[0] = __('SLA Compliance');
-
- // if ($total_result_SLA == 'ok') {
- // $table_resume->data[0][0] = ''.__('OK').'';
- // }
- // if ($total_result_SLA == 'fail') {
- // $table_resume->data[0][0] = ''.__('Fail').'';
- // }
- // if ($total_result_SLA == 'unknown') {
- // $table_resume->data[0][0] = ''.__('Unknown').'';
- // }
-
- // $data[2] = html_print_table($table_resume, true);
- // $next_row++;
- // array_push ($table->data, $data);
-
$table->colspan[$next_row][0] = 3;
$next_row++;
$data = array();
$data[0] = html_print_table($tableslice, true);
array_push ($table->data, $data);
}
-
+
if (!empty($table_planned_downtimes)) {
$data = array();
$data[0] = html_print_table($table_planned_downtimes, true);
@@ -4563,7 +4534,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$data[0] = html_print_table($table_event_graph, true);
@@ -4591,7 +4562,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size'], 1, false, $colors);
$data[0] = html_print_table($table_event_graph, true);
@@ -4617,7 +4588,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$data[0] = html_print_table($table_event_graph, true);
@@ -4764,7 +4735,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data = array ();
- $data[0] = graph_custom_sql_graph($content["id_rc"], $sizgraph_w, $sizgraph_h, $content["type"], true, ui_get_full_url(false) . '/');
+ $data[0] = graph_custom_sql_graph(
+ $content["id_rc"],
+ $sizgraph_w,
+ $sizgraph_h,
+ $content["type"],
+ true,
+ ui_get_full_url(false, false, false, false));
array_push($table->data, $data);
break;
@@ -4830,7 +4807,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$data[0] = html_print_table($table_event_graph, true);
@@ -4856,7 +4833,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$data[0] = html_print_table($table_event_graph, true);
@@ -4874,9 +4851,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$filter_event_critical,
$filter_event_warning,
$filter_event_no_validated);
-
+
$colors = get_criticity_pie_colors($data_graph);
-
+
$table_event_graph = null;
$table_event_graph->head[0] = __('Events by criticity');
$table_event_graph->width = '100%';
@@ -4884,7 +4861,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size'], 1, false, $colors);
$data[0] = html_print_table($table_event_graph, true);
@@ -4910,7 +4887,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$table_event_graph->data[0][0] = pie3d_graph(
false, $data_graph, 500, 150, __("other"), "",
- $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
$data[0] = html_print_table($table_event_graph, true);
@@ -6136,7 +6113,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data[0] = pie3d_graph(false, $data_pie_graph,
$sizgraph_w, $sizgraph_h, __("other"),
- ui_get_full_url(false, true, false, false) . '/', $config['homedir'] . "/images/logo_vertical_water.png",
+ ui_get_full_url(false, true, false, false) . '/',
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
@@ -6531,7 +6509,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data = array();
if ($show_graph == 1 || $show_graph == 2) {
$data[0] = pie3d_graph(false, $data_pie_graph,
- 600, 150, __("other"), ui_get_full_url(false) . '/', $config['homedir'] . "/images/logo_vertical_water.png",
+ 600, 150, __("other"),
+ ui_get_full_url(false, false, false, false),
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
array_push ($table->data, $data);
//Display bars graph
@@ -6540,7 +6520,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$height = count($data_pie_graph) * 20 + 85;
$data = array();
- $data[0] = hbar_graph(false, $data_hbar, 600, $height, array(), array(), "", "", true, ui_get_full_url(false) . '/', $config['homedir'] . "/images/logo_vertical_water.png", '', '', true, 1, true);
+ $data[0] = hbar_graph(false, $data_hbar, 600, $height,
+ array(), array(), "", "", true,
+ ui_get_full_url(false, false, false, false),
+ ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", '', '', true, 1, true);
array_push ($table->data, $data);
}
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 14104b82d3..de39d22bef 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -736,7 +736,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
var stack = 0, bars = true, lines = false, steps = false;
- var plot = $.plot($('#'+graph_id), datas, options);
+ var plot = $.plot($('#' + graph_id), datas, options);
// Adjust the overview plot to the width and position of the main plot
adjust_left_width_canvas(graph_id, 'overview_'+graph_id);
@@ -789,7 +789,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
}));
$('#menu_cancelzoom_' + graph_id)
- .attr('src',homeurl + '/images/zoom_cross.png');
+ .attr('src', homeurl + '/images/zoom_cross.png');
currentRanges = ranges;
// don't fire event on the overview to prevent eternal loop
@@ -896,7 +896,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
}
// Events
- $('#'+graph_id).bind('plothover', function (event, pos, item) {
+ $('#' + graph_id).bind('plothover', function (event, pos, item) {
overview.setCrosshair({ x: pos.x, y: 0 });
currentPlot = plot;
latestPosition = pos;
@@ -906,7 +906,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
});
- $('#'+graph_id).bind("plotclick", function (event, pos, item) {
+ $('#' + graph_id).bind("plotclick", function (event, pos, item) {
plot.unhighlight();
if (item && item.series.label != '' && (item.series.label == legend_events || item.series.label == legend_events+series_suffix_str || item.series.label == legend_alerts || item.series.label == legend_alerts+series_suffix_str)) {
plot.unhighlight();
diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php
index 399ca7942e..8857f5b77e 100644
--- a/pandora_console/include/graphs/functions_flot.php
+++ b/pandora_console/include/graphs/functions_flot.php
@@ -292,7 +292,13 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
}
$menu_width = 25 * $nbuttons + 15;
- $return .= "