2010-03-31 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_visual_map.php: in function "printItemInVisualConsole"
	changed the text align of elements label to center.
	
	* operation/visual_console/render_view.php: changed the title to Pandora's
	header.
	
	* godmode/reporting/visual_console_builder.php: fixed the id of visual
	console in the update wizard action.
	
	* godmode/reporting/visual_console_builder.editor.php: small changes in the
	style. Set the width and height for module graph.
	
	* godmode/reporting/visual_console_builder.editor.js: set the default value
	for width and height for module graph in the function "cleanFields". And in
	the function "createItem" deleted br tag the simple value.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2532 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-03-31 14:23:16 +00:00
parent e8452584d2
commit 99fa6ee1bf
6 changed files with 46 additions and 31 deletions

View File

@ -1,3 +1,21 @@
2010-03-31 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map.php: in function "printItemInVisualConsole"
changed the text align of elements label to center.
* operation/visual_console/render_view.php: changed the title to Pandora's
header.
* godmode/reporting/visual_console_builder.php: fixed the id of visual
console in the update wizard action.
* godmode/reporting/visual_console_builder.editor.php: small changes in the
style. Set the width and height for module graph.
* godmode/reporting/visual_console_builder.editor.js: set the default value
for width and height for module graph in the function "cleanFields". And in
the function "createItem" deleted br tag the simple value.
2010-03-31 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: added new parameter for function

View File

@ -367,8 +367,8 @@ function cleanFields() {
$("select[name=parent]").val('');
$("select[name=map_linked]").val('');
$("input[name=label_color]").val('#000000');
$("input[name=width_module_graph]").val(0);
$("input[name=height_module_graph]").val(0);
$("input[name=width_module_graph]").val(300);
$("input[name=height_module_graph]").val(180);
$("#preview").empty();
var anyText = $("#any_text").html(); //Trick for catch the translate text.
@ -538,7 +538,7 @@ function createItem(type, values, id_data) {
var imageSize = '';
var item = $('<div id="' + id_data + '" class="item simple_value" 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 />' +
'<span id="text_' + id_data + '" class="text"> ' + values['label'] + '</span>' +
'<strong>' + getModuleValue(id_data) + '</strong>' +
'</div>'
);

View File

@ -44,7 +44,7 @@ foreach ($all_images as $image_file) {
$images_list[$image_file] = $image_file;
}
echo '<div id="editor">';
echo '<div id="editor" style="margin-top: -10px;">';
echo '<div id="toolbox">';
printButtonEditorVisualConsole('static_graph', __('Static Graph'), 'left', false, 'camera');
printButtonEditorVisualConsole('percentile_bar', __('Percentile Bar'), 'left', false, 'percentile');
@ -55,7 +55,7 @@ echo '<div id="editor">';
printButtonEditorVisualConsole('delete_item', __('Delete item'), 'right', true, 'delete');
echo '</div>';
echo '</div>';
echo '<div style="clear:both;"></div>';
echo '<div style="clear:both; margin-bottom: 10px;"></div>';
echo "<form id='form_visual_map' method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
print_input_hidden('action', 'update');
@ -150,9 +150,9 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td><?php echo __('Size');?></td>
<td>
<?php
print_input_text('width_module_graph', 0, '', 3, 5);
print_input_text('width_module_graph', 300, '', 3, 5);
echo ' X ';
print_input_text('height_module_graph', 0, '', 3, 5);
print_input_text('height_module_graph', 180, '', 3, 5);
?>
</td>
</tr>
@ -174,7 +174,7 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
</tr>
<tr id="advance_options_link" class="datos">
<td colspan="2" style="text-align: center;">
<a href="javascript: showAdvanceOptions()"><?php echo __('Advance options');?></a>
<a href="javascript: showAdvanceOptions()"><?php echo __('Advanced options');?></a>
</td>
</tr>
</tbody>

View File

@ -135,9 +135,9 @@ switch ($activeTab) {
$width = (int) get_parameter ("width", 0);
$height = (int) get_parameter ("height", 0);
$message = '';
$message = process_wizard_add ($id_agents, $image, $layout["id"], $range, $width, $height);
$message = process_wizard_add ($id_agents, $image, $idVisualConsole, $range, $width, $height);
if (!empty ($id_modules)) {
$message .= process_wizard_add_modules ($id_modules, $image, $layout["id"], $range, $width, $height);
$message .= process_wizard_add_modules ($id_modules, $image, $idVisualConsole, $range, $width, $height);
}
$statusProcessInDB = array('flag' => true, 'message' => $message);
$action = 'edit';

View File

@ -104,8 +104,8 @@ function printItemInVisualConsole($layoutData) {
break;
case SIMPLE_VALUE:
echo '<div id="' . $id . '" class="item simple_value" style="color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
echo $text . '<br />';
echo '<strong>' . get_db_value ('datos', 'tagente_estado', 'id_agente_modulo', $id_module) . '</strong>';
echo $text;
echo ' <strong>' . get_db_value ('datos', 'tagente_estado', 'id_agente_modulo', $id_module) . '</strong>';
echo '</div>';
break;
}
@ -440,9 +440,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
// Draw image
if ($resizedMap)
echo '<div style="z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
else
echo '<div style="z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
if (!isset ($id_agent))
$id_agent = 0;
@ -547,9 +547,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
// Percentile bar (type = 3)
if ($resizedMap)
echo '<div style="z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
else
echo '<div style="z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
$valor = get_db_sql ('SELECT datos FROM tagente_estado WHERE id_agente_modulo = '.$layout_data['id_agente_modulo']);
$width = $layout_data['width'];
if ( $layout_data['height'] > 0)
@ -575,9 +575,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
case 1;
// SINGLE GRAPH (type = 1)
if ($resizedMap)
echo '<div style="z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
else
echo '<div style="z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo '<div style="text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
echo $layout_data['label'];
echo "<br>";

View File

@ -52,25 +52,22 @@ if (! give_acl ($config["id_user"], $id_group, "AR")) {
}
// Render map
echo "<h2>".__('Visual console')." &raquo; ".__('Map');
echo "&nbsp;".$layout_name."&nbsp;&nbsp;";
$options = array();
if ($config["pure"] == 0) {
echo '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;id='.$id_layout.'&amp;refr='.$config["refr"].'&amp;pure=1">';
print_image ("images/fullscreen.png", false, array ("title" => __('Full screen mode')));
echo "</a>";
$options[] = '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;id='.$id_layout.'&amp;refr='.$config["refr"].'&amp;pure=1">'
. print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
. "</a>";
} else {
echo '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;id='.$id_layout.'&amp;refr='.$config["refr"].'">';
print_image ("images/normalscreen.png", false, array ("title" => __('Back to normal mode')));
echo "</a>";
$options[] = '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;id='.$id_layout.'&amp;refr='.$config["refr"].'">'
. print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
. "</a>";
}
echo "&nbsp;";
if (give_acl ($config["id_user"], $id_group, "AW"))
echo '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$id_layout.'">'.print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';
echo '</h2>';
$options[] = '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$id_layout.'">'.print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';
print_page_header (__("Visual console") . " &raquo; " . $layout_name, "images/monitor.png", false, '', false, $options);
print_pandora_visual_map ($id_layout);