2010-01-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_visual_map.php: Changed the way of create marks 
	for graphs in visual console from divs to tables. Label parameter is 
	now coded in base 64 codification when pgraph.php page is requested. 

	Fixes bug #3152661, #3152673
	
	* include/fgraph.php: Decode received parameter (label) in base 64 codification.

	* godmode/reporting/visual_console_builder.editor.js: In Visual console builder editor 
	added some image borders to create marks around graphs.

	Fixes bug #3152673

	* operation/agentes/stat_win.php
	godmode/reporting/graph_builder.preview.php: Label parameter is now coded 
	in base 64 format when pgraph.php page is requested.

	Fixes bug #3152661




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3735 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-01-12 12:03:45 +00:00
parent 0576d30d49
commit d978ef6917
6 changed files with 34 additions and 11 deletions

View File

@ -1,3 +1,25 @@
2010-01-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_visual_map.php: Changed the way of create marks
for graphs in visual console from divs to tables. Label parameter is
now coded in base 64 codification when pgraph.php page is requested.
Fixes bug #3152661, #3152673
* include/fgraph.php: Decode received parameter (label) in base 64 codification.
* godmode/reporting/visual_console_builder.editor.js: In Visual console builder editor
added some image borders to create marks around graphs.
Fixes bug #3152673
* operation/agentes/stat_win.php
godmode/reporting/graph_builder.preview.php: Label parameter is now coded
in base 64 format when pgraph.php page is requested.
Fixes bug #3152661
2010-01-11 Raúl Mateos <raulofpandora@gmail.com>
* install.php: Updated build and year.

View File

@ -101,7 +101,7 @@ $weights = implode(',', $weight_array);
echo graphic_combined_module (explode (',', $modules), explode (',', $weights), $period, $graph_width, $graph_height,
'Combined%20Sample%20Graph', '', $events, 0, 0, $stacked);
} else {
echo "<img src='include/fgraph.php?tipo=combined&id=$modules&weight_l=$weights&label=Combined%20Sample%20Graph&height=$graph_height&width=$graph_width&stacked=$stacked&period=$period' border=1 alt=''>";
echo "<img src='include/fgraph.php?tipo=combined&id=$modules&weight_l=$weights&label=" . base64_encode ("Combined%20Sample%20Graph") . "&height=$graph_height&width=$graph_width&stacked=$stacked&period=$period' border=1 alt=''>";
}
}
else {

View File

@ -608,7 +608,7 @@ function createItem(type, values, id_data) {
var item = $('<div id="' + id_data + '" class="item module_graph" style="color: ' + values['label_color'] + '; text-align: center; position: absolute; ' + sizeStyle + ' margin-top: ' + values['top'] + 'px; margin-left: ' + values['left'] + 'px;">' +
'<span id="text_' + id_data + '" class="text">' + values['label'] + '</span><br />' +
'<img class="image" id="image_' + id_data + '" src="' + getModuleGraph(id_data) + '" />' +
'<img class="image" id="image_' + id_data + '" src="' + getModuleGraph(id_data) + '" style="border:1px solid #808080;" />' +
'</div>'
);
break;

View File

@ -2349,7 +2349,8 @@ $id = (string) get_parameter ('id');
$weight_l = (string) get_parameter ('weight_l');
$width = (int) get_parameter ('width', 450);
$height = (int) get_parameter ('height', 200);
$label = (string) get_parameter ('label', '');
// Decode received parameter ($label) in base 64 codification
$label = base64_decode((string) get_parameter ('label', ''));
$color = (string) get_parameter ('color', '#226677');
$percent = (int) get_parameter ('percent', 100);
$zoom = (int) get_parameter ('zoom', 100);

View File

@ -108,7 +108,7 @@ function printItemInVisualConsole($layoutData) {
echo '<div id="' . $id . '" class="item module_graph" style="color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
echo $text . '<br />';
echo $img;
echo '<table style="border:1px solid #808080;"><tr><td>' . $img . '</td></tr></table>';
echo '</div>';
break;
case SIMPLE_VALUE:
@ -739,9 +739,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
if ($show_links) {
if (($layout_data['id_layout_linked'] == "") || ($layout_data['id_layout_linked'] == 0)) {
echo '<div style="border-width:1px; border-style:solid; border-color:#808080"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$layout_data["id_agent"].'&amp;tab=data">';
echo '<table style="border:1px solid #808080;"><tr><td><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$layout_data["id_agent"].'&amp;tab=data">';
} else {
echo '<div style="border-width:1px; border-style:solid; border-color:#808080"><a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;pure='.$config["pure"].'&amp;id='.$layout_data['id_layout_linked'].'">';
echo '<table style="border:1px solid #808080;"><tr><td><a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;pure='.$config["pure"].'&amp;id='.$layout_data['id_layout_linked'].'">';
}
}
if ($resizedMap)
@ -749,11 +749,11 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
// ATTENTION: DO NOT USE &amp; here because is bad-translated and doesnt work
// resulting fault image links :(
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=".safe_input ($layout_data['label'])."&height=".((integer)($proportion * $layout_data['height']))."&pure=1&width=".((integer)($proportion * $layout_data['width']))."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".((integer)($proportion * $layout_data['height']))."&pure=1&width=".((integer)($proportion * $layout_data['width']))."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
else
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=".safe_input ($layout_data['label'])."&height=".$layout_data['height']."&pure=1&width=".$layout_data['width']."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
echo "</a>";
echo "</div></div>";
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".$layout_data['height']."&pure=1&width=".$layout_data['width']."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
echo "</a></tr></td></table>";
echo "</div>";
break;
}

View File

@ -157,7 +157,7 @@ if ($config['flash_charts'] && $graph_type != "log4x") {
}
}
else {
$image = "../../include/fgraph.php?tipo=".$graph_type."&draw_alerts=".$draw_alerts."&draw_events=".$draw_events."&id=".$id."&zoom=".$zoom."&label=".$label."&height=".$height."&width=".$width."&period=".$period."&avg_only=".$avg_only."&baseline=".$baseline;
$image = "../../include/fgraph.php?tipo=".$graph_type."&draw_alerts=".$draw_alerts."&draw_events=".$draw_events."&id=".$id."&zoom=".$zoom."&label=". base64_encode ($label) ."&height=".$height."&width=".$width."&period=".$period."&avg_only=".$avg_only."&baseline=".$baseline;
$image .= "&date=" . $date;