2012-02-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: cleaned source code style, and fixed the size of graphs in "top_n" for the dashboard. Fixes: #3483715 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5576 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4cbc1f870c
commit
479837d14d
|
@ -1,3 +1,10 @@
|
|||
2012-02-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_reporting.php: cleaned source code style, and fixed the
|
||||
size of graphs in "top_n" for the dashboard.
|
||||
|
||||
Fixes: #3483715
|
||||
|
||||
2012-02-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* operation/events/events_list.php: Changed arrow when event filter
|
||||
|
|
|
@ -531,7 +531,8 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
|||
$previous_status = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$previous_status = 0;
|
||||
}
|
||||
|
||||
|
@ -723,7 +724,7 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
|||
$previous_status = 0;
|
||||
|
||||
if ($previous_value < 0) {// 4 for the Unknown value
|
||||
$previous_status = 4;
|
||||
$previous_status = 4;
|
||||
}
|
||||
elseif ((($previous_value > ($min_value - $percent)) && ($previous_value < ($min_value + $percent))) ||
|
||||
(($previous_value > ($max_value - $percent)) && ($previous_value < ($max_value + $percent)))) {//2 when value is within the edges
|
||||
|
@ -2138,15 +2139,15 @@ function sla_value_asc_cmp($a, $b)
|
|||
function reporting_render_report_html_item ($content, $table, $report, $mini = false) {
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
if($mini){
|
||||
|
||||
if ($mini) {
|
||||
$sizh = '';
|
||||
$sizhfin = '';
|
||||
$sizem = '1.5';
|
||||
$sizgraph_w = '350';
|
||||
$sizgraph_h = '100';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$sizh = '<h4>';
|
||||
$sizhfin = '</h4>';
|
||||
$sizem = '3';
|
||||
|
@ -2157,7 +2158,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$server_name = $content ['server_name'];
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '') {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)){
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||
}
|
||||
}
|
||||
|
@ -2588,7 +2589,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$monitor_value = reporting_get_agentmodule_sla ($content['id_agent_module'], $content['period'], 1, false, $report["datetime"]);
|
||||
if ($monitor_value === false) {
|
||||
$monitor_value = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$monitor_value = format_numeric ($monitor_value);
|
||||
}
|
||||
$data[0] = '<p style="font: bold '.$sizem.'em Arial, Sans-serif; color: #000000;">';
|
||||
|
@ -2623,7 +2625,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$value = reporting_get_agentmodule_data_average ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($value === false) {
|
||||
$value = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$value = format_numeric ($value);
|
||||
}
|
||||
$data[0] = '<p style="font: bold '.$sizem.'em Arial, Sans-serif; color: #000000;">'.$value.'</p>';
|
||||
|
@ -3688,7 +3691,7 @@ 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, 190, __("other"),"", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$sizgraph_w, $sizgraph_h, __("other"),"", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size']);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
@ -3696,7 +3699,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table->colspan[4][0] = 3;
|
||||
$height = count($data_pie_graph)*20+35;
|
||||
$data = array();
|
||||
$data[0] = hbar_graph(false, $data_hbar, 600, $height, array(), array(), "", "", true, "", $config['homedir'] . "/images/logo_vertical_water.png", '', '', true, 1, true);
|
||||
$data[0] = hbar_graph(false, $data_hbar, $sizgraph_w, $height, array(), array(), "", "", true, "", $config['homedir'] . "/images/logo_vertical_water.png", '', '', true, 1, true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue