Visual console improvements - Add: font style/size setting - map size setting - back color map - graph function a type graph line/area - Improve wizard - Back graph color... #110

This commit is contained in:
enriquecd 2016-11-16 18:58:27 +01:00
parent 534b7eb05a
commit 76c1f7cd82
12 changed files with 253 additions and 58 deletions

View File

@ -51,11 +51,11 @@ $pure = get_parameter('pure', 0);
switch ($action) {
case 'new':
if (!defined('METACONSOLE')) {
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "' enctype='multipart/form-data'>";
echo "<form id='back' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "' enctype='multipart/form-data'>";
html_print_input_hidden('action', 'save');
}
else {
echo '<form action="index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '" method="post" enctype="multipart/form-data">';
echo '<form id="back" action="index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '" method="post" enctype="multipart/form-data">';
html_print_input_hidden('action2', 'save');
}
@ -63,22 +63,22 @@ switch ($action) {
case 'update':
case 'save':
if (!defined('METACONSOLE')) {
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "' enctype='multipart/form-data'>";
echo "<form id='back' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "' enctype='multipart/form-data'>";
html_print_input_hidden('action', 'update');
}
else {
//echo '<form action="index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '" method="post">';
echo "<form action='index.php?sec=screen&sec2=screens/screens&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "&id_visualmap=" . $idVisualConsole . "&action=visualmap' method='post' enctype='multipart/form-data'>";
echo "<form id='back' action='index.php?sec=screen&sec2=screens/screens&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "&id_visualmap=" . $idVisualConsole . "&action=visualmap' method='post' enctype='multipart/form-data'>";
html_print_input_hidden('action2', 'update');
}
break;
case 'edit':
if (!defined('METACONSOLE')) {
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "' enctype='multipart/form-data'>";
echo "<form id='back' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "' enctype='multipart/form-data'>";
html_print_input_hidden('action', 'update');
}
else {
echo "<form action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "&action=visualmap' method='post' enctype='multipart/form-data' >";
echo "<form id='back' action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "&action=visualmap' method='post' enctype='multipart/form-data' >";
html_print_input_hidden('action2', 'update');
}
break;
@ -120,9 +120,42 @@ $backgrounds_list = array_merge($backgrounds_list,
list_files($config['homedir'] . '/images/console/background/', "png", 1, 0));
$table->data[2][0] = __('Background');
$table->data[2][1] = html_print_select($backgrounds_list, 'background',
$background, '', '', 0, true);
$background, '', 'None', 'None.png', true);
$table->data[3][0] = __('Background image');
$table->data[3][1] = html_print_input_file('background_image',true);
$table->data[4][0] = __('Background color');
if($action == 'new'){
$table->data[4][1] .= html_print_input_text ('background_color', 'white', '', 8, 8, true);
}
else{
$table->data[4][1] .= html_print_input_text ('background_color', $background_color, '', 8, 8, true);
}
$table->data[5][0] = __('Size - (Width x Height)');
$table->data[5][1] = html_print_input_text('width', 1024, '', 10, 10, true , true) .
' x ' .
html_print_input_text('height', 768, '', 10, 10, true, true);
if($action == 'new'){
$table->data[5][1] .= '<button disabled id="getsize" style="margin-left:20px;" value="modsize">Set default size</button>';
}
else{
$table->data[5][1] .= '<button id="getsize" style="margin-left:20px;" value="modsize">Set default size</button>';
}
$table->data[5][1] .= ui_print_help_tip(__("You must define size"), true);
if($action == 'new'){
$table->data[5][1] .= '<button disabled id="modsize" style="margin-left:20px;" value="modsize">Set other size</button><span style="margin-left:20px;" id="modsizetext">Disabled</span>';
}
else{
$table->data[5][1] .= '<button id="modsize" style="margin-left:20px;" value="modsize">Set other size</button><span style="margin-left:20px;" id="modsizetext">Disabled</span>';
}
$table->data[5][2] = '<img id="imagen" style="display:none" src="images/console/background/'.$background.'">';
$table->data[0][3] = $table->data[0][4] = $table->data[0][5] = '';
if ($action == 'new') {
$textButtonSubmit = __('Save');
$classButtonSubmit = 'sub wand';
@ -134,10 +167,76 @@ else {
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button ($textButtonSubmit, 'update_layout', false,
echo '<div class="action-buttons" style="width: '.$table->width.'">';
if($action == 'new'){
html_print_submit_button ($textButtonSubmit, 'update_layout', true,
'class="' . $classButtonSubmit . '"');
echo '</div>';
}
else{
html_print_submit_button ($textButtonSubmit, 'update_layout', false,
'class="' . $classButtonSubmit . '"');
}
echo '</div>';
echo "</form>";
?>
<script src="include/javascript/jquery.colorpicker.js"></script>
<script>
$(document).ready (function () {
$("#modsize").click(function(event){
event.preventDefault();
if($('input[name=width]').attr('readonly')){
$('input[name=width]').attr('readonly',false);
$('input[name=height]').attr('readonly',false);
$('#modsizetext').html('Enabled');
$('input[name=update_layout]').attr('disabled',false);
}
else{
$('input[name=width]').attr('readonly',true);
$('input[name=height]').attr('readonly',true);
$('#modsizetext').html('Disabled');
$('input[name=update_layout]').attr('enabled',false);
}
$('input[name=width]').val($('#imagen').width());
$('input[name=height]').val($('#imagen').height());
});
$("#getsize").click(function(event){
event.preventDefault();
$('input[name=update_layout]').attr('disabled',false);
$('input[name=width]').val($('#imagen').width());
$('input[name=height]').val($('#imagen').height());
});
$("#background").click(function(event){
$('#imagen').attr('src','images/console/background/'+$('#background').val());
$('input[name=update_layout]').attr('disabled',true);
$("#getsize").attr('disabled',false);
$("#modsize").attr('disabled',false);
});
$("#file-background_image").change(function(event){
$('#back').submit();
});
$("#text-background_color").attachColorPicker();
});
</script>

View File

@ -101,11 +101,13 @@ function visual_map_main() {
$("#custom_graph_row").css('display', 'none');
$("#agent_row").css('display', '');
$("#module_row").css('display', '');
$("#type_graph").css('display', '');
}
else {
$("#custom_graph_row").css('display', '');
$("#agent_row").css('display', 'none');
$("#module_row").css('display', 'none');
$("#type_graph").css('display', 'none');
}
}
});
@ -264,7 +266,7 @@ function readFields() {
var text = tinymce.get('text-label').getContent();
values['label'] = text;
values['type_graph'] = $("select[name=type_graph]").val();
values['image'] = $("select[name=image]").val();
values['background_color'] = $("select[name=background_color]").val();
values['left'] = $("input[name=left]").val();
@ -749,6 +751,15 @@ function loadFieldsFromDB(item) {
}
}
if (key == 'type_graph') {
if (val == "area") {
$("select[name=type_graph]").val(val);
}
else {
$("select[name=type_graph]").val(val);
}
}
if (key == 'image') {
//Load image preview
$("select[name=image]").val(val);
@ -880,8 +891,8 @@ function loadFieldsFromDB(item) {
$("input[name='radio_choice'][value='custom_graph']")
.prop('checked', true);
$("input[name='radio_choice']").trigger('change');
$("#custom_graph option[value=" + data.id_custom_graph + "]")
.prop("selected", true);
// $("#custom_graph option[value=" + data.id_custom_graph + "]")
// .prop("selected", true);
}
else {
$("input[name='radio_choice'][value='module_graph']")
@ -1031,6 +1042,9 @@ function hiddenFields(item) {
$("#background_color").css('display', 'none');
$("#background_color." + item).css('display', '');
$("#type_graph").css('display', 'none');
$("#type_graph." + item).css('display', '');
$("#radio_choice_graph").css('display', 'none');
$("#radio_choice_graph." + item).css('display', '');
@ -1535,8 +1549,8 @@ function createItem(type, values, id_data) {
// Do none
}
else {
item.css('width', values['width'] + 'px')
.css('height', values['height'] + 'px');
item.css('width','70' + 'px')
.css('height', '70' + 'px');
}
var $image = $('<img></img>')
@ -1545,6 +1559,8 @@ function createItem(type, values, id_data) {
.attr('src', img_src);
if ((values['width'] == 0) && (values['height'] == 0)) {
// Do none
$image.attr('width', '70')
.attr('height', '70');
}
else {
$image.attr('width', values['width'])
@ -1627,8 +1643,8 @@ function createItem(type, values, id_data) {
break;
case 'icon':
if ((values['width'] == 0) && (values['height'] == 0)) {
sizeStyle = '';
imageSize = '';
sizeStyle = 'width: ' + '70' + 'px; height: ' + '70' + 'px;';
imageSize = 'width="' + '70' + '" height="' + '70' + '"';
}
else {
sizeStyle = 'width: ' + values['width'] + 'px; height: ' + values['height'] + 'px;';

View File

@ -198,10 +198,14 @@ ui_require_javascript_file ('encode_decode_base64');
"14pt=.visual_font_size_14pt, " +
"24pt=.visual_font_size_24pt, " +
"36pt=.visual_font_size_36pt, " +
"72pt=.visual_font_size_72pt",
"72pt=.visual_font_size_72pt, " +
"96pt=.visual_font_size_96pt, " +
"128pt=.visual_font_size_128pt, " +
"154pt=.visual_font_size_154pt, " +
"196pt=.visual_font_size_196pt",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "bold,italic, |, justifyleft, justifycenter, justifyright, |,undo, redo, |, image, link, |, forecolor, fontsizeselect, |, code",
theme_advanced_buttons1 : "bold,italic, |, justifyleft, justifycenter, justifyright, |,undo, redo, |, image, link, |, fontselect, |, forecolor, fontsizeselect, |, code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_statusbar_location : "none",

View File

@ -108,11 +108,11 @@ $table->data = array();
//Background
$table->data[0]['icon'] = '';
$table->data[0][0] = __('Background');
$table->data[0][1] = html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;');
$table->data[0][2] = html_print_input_text('width', $visualConsole['width'], '', 3, 5, true) .
$table->data[0][0] = '<div style="display:none;">'.__('Background').'</div>';
$table->data[0][1] = '<div style="display:none;">'.html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;').'</div>';
$table->data[0][2] = '<div style="display:none;">'.html_print_input_text('width', $visualConsole['width'], '', 3, 5, true) .
' x ' .
html_print_input_text('height', $visualConsole['height'], '', 3, 5, true);
html_print_input_text('height', $visualConsole['height'], '', 3, 5, true).'</div>';
$table->data[0][3] = $table->data[0][4] = $table->data[0][5] = '';
$i = 1;
@ -593,7 +593,11 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
"14pt=.visual_font_size_14pt, " +
"24pt=.visual_font_size_24pt, " +
"36pt=.visual_font_size_36pt, " +
"72pt=.visual_font_size_72pt",
"72pt=.visual_font_size_72pt, " +
"96pt=.visual_font_size_96pt, " +
"128pt=.visual_font_size_128pt, " +
"154pt=.visual_font_size_154pt, " +
"196pt=.visual_font_size_196pt",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "bold,italic, |, image, link, |, forecolor, fontsizeselect",

View File

@ -103,6 +103,9 @@ switch ($activeTab) {
case 'new':
$idGroup = '';
$background = '';
$background_color = '';
$width = '';
$height = '';
$visualConsoleName = '';
break;
@ -110,6 +113,9 @@ switch ($activeTab) {
case 'save':
$idGroup = (int) get_parameter('id_group');
$background = (string) get_parameter('background');
$background_color = (string) get_parameter('background_color');
$width = (int) get_parameter('width');
$height = (int) get_parameter('height');
$visualConsoleName = (string) get_parameter('name');
// ACL for the new visual console
@ -128,7 +134,10 @@ switch ($activeTab) {
$values = array(
'name' => $visualConsoleName,
'id_group' => $idGroup,
'background' => $background
'background' => $background,
'background_color' => $background_color,
'width' => $width,
'height' => $height
);
$error = $_FILES['background_image']['error'];
@ -196,12 +205,13 @@ switch ($activeTab) {
// If the background is changed the size is reseted
$background_now = $visualConsole['background'];
if ($background_now != $background && $background) {
/*if ($background_now != $background && $background) {
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
$values['width'] = $sizeBackground[0];
$values['height'] = $sizeBackground[1];
}
}*/
$values['width'] = $width;
$values['height'] = $height;
switch ($action) {
case 'update':
$result = false;
@ -261,6 +271,9 @@ switch ($activeTab) {
$visualConsoleName = $visualConsole['name'];
$idGroup = $visualConsole['id_group'];
$background = $visualConsole['background'];
$background_color = $visualConsole['background_color'];
$width = $visualConsole['width'];
$height = $visualConsole['height'];
break;
}
break;
@ -295,6 +308,7 @@ switch ($activeTab) {
//Update background
$background = get_parameter('background');
$background_color = get_parameter('background_color');
$width = get_parameter('width');
$height = get_parameter('height');
@ -307,6 +321,7 @@ switch ($activeTab) {
db_process_sql_update('tlayout',
array('background' => $background,
'background_color' => $background_color,
'width' => $width,
'height' => $height),
array('id' => $idVisualConsole));
@ -378,6 +393,11 @@ switch ($activeTab) {
case 'wizard':
$visualConsoleName = $visualConsole['name'];
$background = $visualConsole['background'];
$fonts = get_parameter ('fonts');
$fontf = get_parameter ('fontf');
switch ($action) {
case 'update':
$id_agents = get_parameter ('id_agents', array ());
@ -449,7 +469,7 @@ switch ($activeTab) {
$enable_link,
$id_server,
$kind_relationship,
$item_in_the_map);
$item_in_the_map,$fontf,$fonts);
$statusProcessInDB = array('flag' => true,
'message' => $message);
@ -516,7 +536,7 @@ switch ($activeTab) {
$enable_link,
$id_server,
$kind_relationship,
$item_in_the_map);
$item_in_the_map,$fontf,$fonts);
}
@ -574,7 +594,7 @@ switch ($activeTab) {
$enable_link,
$id_server,
$kind_relationship,
$item_in_the_map);
$item_in_the_map,$fontf,$fonts);
}

View File

@ -137,6 +137,22 @@ $table->data["staticgraph_modulegraph"][1] .= '&nbsp;&nbsp;&nbsp;' .
__('Height') . ': ' .
html_print_input_text('height', 0, '', 5, 5, true);
$fontf = array('comic sans ms' => 'comic sans ms');
$table->rowstyle['all_9'] = 'display: none;';
$table->data['all_9'][0] = __('Font');
$table->colspan['all_9'][1] = "3";
$table->data["all_9"][1] = html_print_select($fontf,
'fontf', '', '', '', '', true);
$fonts = array('4pt' => '4pt','6pt' => '6pt','8pt' => '8pt','14pt' => '14pt','24pt' => '24pt','36pt' => '36pt','72pt' => '72pt','96pt' => '96pt','128pt' => '128pt','154pt' => '154pt','196pt' => '196pt');
$table->rowstyle['all_10'] = 'display: none;';
$table->data['all_10'][0] = __('Font size');
$table->colspan['all_10'][1] = "3";
$table->data["all_10"][1] = html_print_select($fonts,
'fonts', '', '', '', '', true);
$table->rowstyle["modulegraph_simplevalue"] = 'display: none;';
$table->data["modulegraph_simplevalue"][0] = __('Period');

View File

@ -129,6 +129,7 @@ $line_color = get_parameter('line_color', '');
$get_element_status = get_parameter('get_element_status', 0);
$enable_link = get_parameter('enable_link', 1);
$type_graph = get_parameter('type_graph', 'area');
switch ($action) {
case 'get_font':
@ -394,6 +395,7 @@ switch ($action) {
// In Graphs, background color is stored in column image (sorry)
if ($type == 'module_graph') {
$values['image'] = $background_color;
$values['type_graph'] = $type_graph;
}
switch ($type) {
@ -574,6 +576,7 @@ switch ($action) {
break;
case 'module_graph':
unset($values['image']);
unset($values['type_graph']);
break;
case 'box_item':
unset($values['border_width']);
@ -773,6 +776,8 @@ switch ($action) {
$values['id_layout_linked'] = $map_linked;
$values['parent_item'] = $parent;
$values['enable_link'] = $enable_link;
$values['image'] = $background_color;
$values['type_graph'] = $type_graph;
$values['id_custom_graph'] = $id_custom_graph;

View File

@ -484,7 +484,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
$show_alerts = false, $avg_only = 0, $date = 0, $unit = '',
$baseline = 0, $return_data = 0, $show_title = true, $projection = false,
$adapt_key = '', $compare = false, $series_suffix = '', $series_suffix_str = '',
$show_unknown = false, $percentil = null, $dashboard = false, $vconsole = false) {
$show_unknown = false, $percentil = null, $dashboard = false, $vconsole = false,$type_graph='area') {
global $config;
global $chart;
@ -771,7 +771,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
$only_image = false, $homeurl = '', $ttl = 1, $projection = false,
$adapt_key = '', $compare = false, $show_unknown = false,
$menu = true, $backgroundColor = 'white', $percentil = null,
$dashboard = false, $vconsole = false) {
$dashboard = false, $vconsole = false,$type_graph = 'area') {
global $config;
global $graphic_type;
@ -802,7 +802,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
$show_alerts, $avg_only, $date-$period, $unit, $baseline,
$return_data, $show_title, $projection, $adapt_key,
$compare, $series_suffix, $series_suffix_str,
$show_unknown, $percentil, $dashboard, $vconsole);
$show_unknown, $percentil, $dashboard, $vconsole,$type_graph);
switch ($compare) {
case 'separated':
@ -835,7 +835,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
$show_alerts, $avg_only,
$date, $unit, $baseline, $return_data, $show_title,
$projection, $adapt_key, $compare, '', '', $show_unknown,
$percentil, $dashboard, $vconsole);
$percentil, $dashboard, $vconsole,$type_graph);
if ($return_data) {
@ -865,7 +865,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
}
if ($config['type_module_charts'] === 'area') {
if ($type_graph === 'area') {
if ($compare === 'separated') {
return
area_graph($flash_chart, $chart, $width, $height/2, $color,
@ -899,7 +899,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
$backgroundColor, $dashboard, $vconsole, $agent_module_id);
}
}
elseif ($config['type_module_charts'] === 'line') {
elseif ($type_graph === 'line') {
if ($compare === 'separated') {
return
line_graph($flash_chart, $chart, $width, $height/2, $color,
@ -3931,7 +3931,7 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
'url' => ui_get_full_url("/images/logo_vertical_water.png",
false, false, false));
if ($config['type_module_charts'] === 'area') {
if ($type_graph === 'area') {
if ($compare === 'separated') {
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
@ -3953,7 +3953,7 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
}
}
elseif ($config['type_module_charts'] === 'line') {
elseif ($type_graph === 'line') {
if ($compare === 'separated') {
return
line_graph($flash_chart, $chart, $width, $height/2, $color,
@ -4499,7 +4499,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
}
if ($config['type_module_charts'] === 'area') {
if ($type_graph === 'area') {
return area_graph($flash_chart, $chart, $width, $height, $color,
$legend, array(), '', "", $unit, $homeurl,
$water_mark, $config['fontpath'], $config['font_size'], $unit,

View File

@ -105,6 +105,7 @@ function visual_map_print_item($mode = "read", $layoutData,
$id_module = $layoutData['id_agente_modulo'];
$type = $layoutData['type'];
$period = $layoutData['period'];
$type_graph = $layoutData['type_graph'];
$border_width = $layoutData['border_width'];
$border_color = $layoutData['border_color'];
$fill_color = $layoutData['fill_color'];
@ -772,7 +773,7 @@ function visual_map_print_item($mode = "read", $layoutData,
// Show only avg on the visual console
$img = custom_graphs_print(
$layoutData['id_custom_graph'], $height, $width,
$period, null, true, 0, $only_image, $layoutData['image'],
$period, null, true, 0, false, $layoutData['image'],
array(), '', array(), array(), true,
false, false, true, 1, false, true);
}
@ -782,10 +783,10 @@ function visual_map_print_item($mode = "read", $layoutData,
else
$homeurl = '';
$img = grafico_modulo_sparse($id_module, $period, 0, $width,
$height, '', null, false, 1, false, 0, '', 0, 0,
true, $only_image, $homeurl, 1, false, '', false, false, false,
$layoutData['image'], null, false, true);
$img = grafico_modulo_sparse($id_module, $period, 0,$width,$height,
'',null,
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
'', false, false, false, $layoutData['image'], null, true, false,$type_graph);
}
//Restore db connection
@ -883,7 +884,6 @@ function visual_map_print_item($mode = "read", $layoutData,
if ($layoutData['image'] != null) {
$img_style_title = strip_tags($label);
if ($layoutData['type'] == STATIC_GRAPH) {
if ($layoutData['id_agente_modulo'] != 0) {
@ -1306,7 +1306,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image,
$process_value, $percentileitem_width, $max_value, $type_percentile,
$value_show, $label_type, $type, $enable_link = true,
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
$item_in_the_map = 0) {
$item_in_the_map = 0,$fontf = 'arial',$fonts = '12pt') {
if (empty ($id_modules)) {
$return = ui_print_error_message(
@ -1345,15 +1345,15 @@ function visual_map_process_wizard_add_modules ($id_modules, $image,
default:
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false);
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false);
$label = $agent_label . " - " . $module_label;
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$agent_label . " - " . $module_label.'</span></p>';
break;
case 'module':
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false);
$label = $module_label;
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$module_label.'</span></p>';
break;
case 'agent':
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false);
$label = $agent_label;
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$agent_label.'</span></p>';
break;
case 'none':
$label = '';
@ -1453,7 +1453,7 @@ function visual_map_process_wizard_add_agents ($id_agents, $image,
$process_value, $percentileitem_width, $max_value, $type_percentile,
$value_show, $label_type, $type, $enable_link = 1, $id_server = 0,
$kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
$item_in_the_map = 0) {
$item_in_the_map = 0,$fontf = 'arial',$fonts = '12pt') {
global $config;
@ -2049,7 +2049,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
echo "<div style='width: 920px; overflow:auto; margin: 0 auto;'>";
}
echo '<div id="background_'.$id_layout.'"
echo '<div style="background-color:'.$layout["background_color"].';"><div id="background_'.$id_layout.'"
style="margin:0px auto;
text-align:center;
z-index: 0;
@ -2108,7 +2108,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
}
// End main div
echo "</div>";
echo "</div></div>";

View File

@ -292,6 +292,18 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
html_print_select(array(), 'module', '', '', __('Any'), 0, true) .
'</td>';
$form_items['type_graph'] = array();
$form_items['type_graph']['items'] = array(
'Line',
'Area');
$form_items['type_graph']['html'] = '<td align="left"><span>' .
__('Type of graph') . '</span></td>
<td align="left">'. html_print_select (
array ('line' => __('Line'),
'area' => __('Area')),
'type_graph', '', '', 0, 'area', true, false, false) . '</td>';
$own_info = get_user_info($config['id_user']);
if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "PM"))
$return_all_group = false;

View File

@ -2374,6 +2374,25 @@ span#plugin_description {
.visual_font_size_72pt, .visual_font_size_72pt > em, .visual_font_size_72pt > strong, .visual_font_size_72pt > strong > span, .visual_font_size_72pt > span {
font-size: 72pt !important;
}
.visual_font_size_96pt, .visual_font_size_96pt > em, .visual_font_size_96pt > strong, .visual_font_size_96pt > strong > span, .visual_font_size_96pt > span {
font-size: 96pt !important;
}
.visual_font_size_128pt, .visual_font_size_128pt > em, .visual_font_size_128pt > strong, .visual_font_size_128pt > strong > span, .visual_font_size_128pt > span {
font-size: 128pt !important;
}
.visual_font_size_154pt, .visual_font_size_154pt > em, .visual_font_size_154pt > strong, .visual_font_size_154pt > strong > span, .visual_font_size_154pt > span {
font-size: 154pt !important;
}
.visual_font_size_196pt, .visual_font_size_196pt > em, .visual_font_size_196pt > strong, .visual_font_size_196pt > strong > span, .visual_font_size_196pt > span {
font-size: 196pt !important;
}
.resize_visual_font_size_8pt, .resize_visual_font_size_8pt > em, .resize_visual_font_size_8pt > strong, .resize_visual_font_size_8pt > strong > span, .resize_visual_font_size_8pt > span {
font-size: 4pt !important;
}

View File

@ -204,7 +204,7 @@ if ($config['pure']) {
<?php
}
else {
visual_map_print_visual_map ($id_layout, true, true, null, null, '', false, $graph_javascript);
visual_map_print_visual_map ($id_layout, true, true, null, null, '', false, $graph_javascript, true);
}
ui_require_javascript_file('wz_jsgraphics');