mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 13:55:43 +02:00
fixed errors in graphs
This commit is contained in:
parent
fdb19d309d
commit
d0faeb3ec1
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.8 KiB |
@ -720,6 +720,8 @@ if ($list_modules) {
|
|||||||
if (empty ($modules)) {
|
if (empty ($modules)) {
|
||||||
$modules = array ();
|
$modules = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
$table->width = "100%";
|
$table->width = "100%";
|
||||||
$table->cellpadding = 4;
|
$table->cellpadding = 4;
|
||||||
$table->cellspacing = 4;
|
$table->cellspacing = 4;
|
||||||
|
@ -4058,7 +4058,7 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
|||||||
'file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
'file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
'url' => ui_get_full_url("/images/logo_vertical_water.png",
|
'url' => ui_get_full_url("/images/logo_vertical_water.png",
|
||||||
false, false, false));
|
false, false, false));
|
||||||
|
$type_graph = $config['type_module_charts'];
|
||||||
if ($type_graph === 'area') {
|
if ($type_graph === 'area') {
|
||||||
if ($compare === 'separated') {
|
if ($compare === 'separated') {
|
||||||
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
||||||
|
@ -170,6 +170,7 @@ function html_print_side_layer ($params) {
|
|||||||
|
|
||||||
$out_html = '<div id="side_layer" class="menu_sidebar ' . $round_class . '" style="display:none; z-index:1; overflow: hidden; height: ' . $params['height'] . '; width: ' . $params['width'] . ';">';
|
$out_html = '<div id="side_layer" class="menu_sidebar ' . $round_class . '" style="display:none; z-index:1; overflow: hidden; height: ' . $params['height'] . '; width: ' . $params['width'] . ';">';
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
$table->id = 'side_layer_layout';
|
$table->id = 'side_layer_layout';
|
||||||
$table->width = $params['width'] . 'px';
|
$table->width = $params['width'] . 'px';
|
||||||
$table->cellspacing = 2;
|
$table->cellspacing = 2;
|
||||||
|
@ -3710,6 +3710,7 @@ function reporting_get_event_histogram ($events, $text_header_event = false) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$table = new stdClass();
|
||||||
if (!$text_header_event) {
|
if (!$text_header_event) {
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
}
|
}
|
||||||
|
@ -2251,9 +2251,10 @@ function set_watermark(graph_id, plot, watermark_src) {
|
|||||||
if ($('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height') != undefined) {
|
if ($('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height') != undefined) {
|
||||||
down_ticks_height = $('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height').split('px')[0];
|
down_ticks_height = $('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height').split('px')[0];
|
||||||
}
|
}
|
||||||
var left_pos = parseInt(context.canvas.width - 3) - $('#watermark_image_'+graph_id)[0].width;
|
//var left_pos = parseInt(context.canvas.width - 3) - $('#watermark_image_'+graph_id)[0].width;
|
||||||
var top_pos = parseInt(context.canvas.height - down_ticks_height - 10) - $('#watermark_image_'+graph_id)[0].height;
|
//var top_pos = parseInt(context.canvas.height - down_ticks_height - 10) - $('#watermark_image_'+graph_id)[0].height;
|
||||||
|
var left_pos = 380;
|
||||||
|
var top_pos = 6;
|
||||||
context.drawImage(this, left_pos, top_pos);
|
context.drawImage(this, left_pos, top_pos);
|
||||||
|
|
||||||
}, false);
|
}, false);
|
||||||
|
@ -208,8 +208,6 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:".$font_size."pt'></p>";
|
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:".$font_size."pt'></p>";
|
||||||
|
|
||||||
if (!empty($threshold_data)) {
|
if (!empty($threshold_data)) {
|
||||||
html_debug($threshold_data, true);
|
|
||||||
html_debug($yellow_threshold, true);
|
|
||||||
$yellow_up = $threshold_data['yellow_up'];
|
$yellow_up = $threshold_data['yellow_up'];
|
||||||
$red_up = $threshold_data['red_up'];
|
$red_up = $threshold_data['red_up'];
|
||||||
$yellow_inverse = $threshold_data['yellow_inverse'];
|
$yellow_inverse = $threshold_data['yellow_inverse'];
|
||||||
@ -228,9 +226,6 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||||||
$red_up = $module_data['max_critical'];
|
$red_up = $module_data['max_critical'];
|
||||||
$yellow_inverse = !($module_data['warning_inverse'] == 0);
|
$yellow_inverse = !($module_data['warning_inverse'] == 0);
|
||||||
$red_inverse = !($module_data['critical_inverse'] == 0);
|
$red_inverse = !($module_data['critical_inverse'] == 0);
|
||||||
html_debug($yellow_up, true);
|
|
||||||
html_debug($yellow_threshold, true);
|
|
||||||
html_debug($yellow_inverse, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,7 @@ $id = get_parameter('id');
|
|||||||
$width = get_parameter ("width", STATWIN_DEFAULT_CHART_WIDTH);
|
$width = get_parameter ("width", STATWIN_DEFAULT_CHART_WIDTH);
|
||||||
$height = get_parameter ("height", STATWIN_DEFAULT_CHART_HEIGHT);
|
$height = get_parameter ("height", STATWIN_DEFAULT_CHART_HEIGHT);
|
||||||
$label = get_parameter ("label", "");
|
$label = get_parameter ("label", "");
|
||||||
|
$label_graph = base64_decode(get_parameter ("label", ""));
|
||||||
$start_date = get_parameter ("start_date", date("Y/m/d"));
|
$start_date = get_parameter ("start_date", date("Y/m/d"));
|
||||||
$start_time = get_parameter ("start_time", date("H:i:s"));
|
$start_time = get_parameter ("start_time", date("H:i:s"));
|
||||||
$draw_events = get_parameter ("draw_events", 0);
|
$draw_events = get_parameter ("draw_events", 0);
|
||||||
@ -204,7 +205,7 @@ $id = get_parameter('id');
|
|||||||
switch ($graph_type) {
|
switch ($graph_type) {
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
echo grafico_modulo_boolean ($id, $period, $draw_events,
|
echo grafico_modulo_boolean ($id, $period, $draw_events,
|
||||||
$width, $height, $label, $unit, $draw_alerts,
|
$width, $height, $label_graph, $unit, $draw_alerts,
|
||||||
$avg_only, false, $date, false, $urlImage,
|
$avg_only, false, $date, false, $urlImage,
|
||||||
'adapter_' . $graph_type, $time_compare,
|
'adapter_' . $graph_type, $time_compare,
|
||||||
$unknown_graph);
|
$unknown_graph);
|
||||||
@ -216,7 +217,7 @@ $id = get_parameter('id');
|
|||||||
break;
|
break;
|
||||||
case 'sparse':
|
case 'sparse':
|
||||||
echo grafico_modulo_sparse ($id, $period, $draw_events,
|
echo grafico_modulo_sparse ($id, $period, $draw_events,
|
||||||
$width, $height, $label, $unit, $draw_alerts,
|
$width, $height, $label_graph, $unit, $draw_alerts,
|
||||||
$avg_only, false, $date, $unit, $baseline, 0, true,
|
$avg_only, false, $date, $unit, $baseline, 0, true,
|
||||||
false, $urlImage, 1, false,
|
false, $urlImage, 1, false,
|
||||||
'adapter_' . $graph_type, $time_compare,
|
'adapter_' . $graph_type, $time_compare,
|
||||||
@ -230,7 +231,7 @@ $id = get_parameter('id');
|
|||||||
break;
|
break;
|
||||||
case 'string':
|
case 'string':
|
||||||
echo grafico_modulo_string ($id, $period, $draw_events,
|
echo grafico_modulo_string ($id, $period, $draw_events,
|
||||||
$width, $height, $label, null, $draw_alerts, 1,
|
$width, $height, $label_graph, null, $draw_alerts, 1,
|
||||||
false, $date, false, $urlImage,
|
false, $date, false, $urlImage,
|
||||||
'adapter_' . $graph_type);
|
'adapter_' . $graph_type);
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
@ -241,7 +242,7 @@ $id = get_parameter('id');
|
|||||||
break;
|
break;
|
||||||
case 'log4x':
|
case 'log4x':
|
||||||
echo grafico_modulo_log4x ($id, $period, $draw_events,
|
echo grafico_modulo_log4x ($id, $period, $draw_events,
|
||||||
$width, $height, $label, $unit, $draw_alerts, 1,
|
$width, $height, $label_graph, $unit, $draw_alerts, 1,
|
||||||
$pure, $date);
|
$pure, $date);
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
if ($show_events_graph)
|
if ($show_events_graph)
|
||||||
@ -398,6 +399,7 @@ $id = get_parameter('id');
|
|||||||
|
|
||||||
unset($table);
|
unset($table);
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
$table->id = 'stat_win_form';
|
$table->id = 'stat_win_form';
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->cellspacing = 2;
|
$table->cellspacing = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user