Now can create static graphs a group items without images, fix bugs - #1407

This commit is contained in:
enriquecd 2017-11-02 15:54:18 +01:00
parent 594b6e9417
commit f0fe30fc3a
3 changed files with 563 additions and 41 deletions

View File

@ -289,6 +289,157 @@ function update_button_palette_callback() {
} }
break; break;
case 'group_item': case 'group_item':
if((values['image'] == '' || values['image'] == 'none') && (values['label'] == '') && (values['show_statistics'] == false)){
alert('Undefined image');
return false;
}
$("#text_" + idItem).html(values['label']);
if(values['show_statistics'] == 1){
if (!$('#image_'+idItem).length) {
if(values['label_position'] == 'left'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:right;');
}
else if(values['label_position'] == 'right'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:left;');
}
else{
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png");
}
$('#'+idItem).append($image);
}
if ((values['width'] == 0) || (values['height'] == 0)) {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 520);
$("#image_" + idItem).attr('height', 80);
$("#image_" + idItem).css('width', '520px');
$("#image_" + idItem).css('height', '80px');
$("#image_" + idItem).attr('src', 'images/console/signes/group_status.png');
}
else {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
$("#image_" + idItem).attr('src', 'images/console/signes/group_status.png');
}
}
else{
if ((values['width'] == 0) || (values['height'] == 0)) {
if(values['image'] != '' && values['image'] != 'none'){
if (!$('#image_'+idItem).length) {
if(values['label_position'] == 'left'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:right;');
}
else if(values['label_position'] == 'right'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:left;');
}
else{
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png");
}
$('#'+idItem).append($image);
}
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px');
}
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px');
$("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px');
}
}
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px');
$("#image_" + idItem).remove();
}
}
else {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
}
}
break;
case 'static_graph': case 'static_graph':
if($('input[name=width]').val() == ''){ if($('input[name=width]').val() == ''){
@ -299,7 +450,7 @@ function update_button_palette_callback() {
alert('Undefined height'); alert('Undefined height');
return false; return false;
} }
if(((values['image'] == '') && (values['show_statistics']) == false)){ if(((values['image'] == '' || values['image'] == 'none') && (values['label'] == ''))){
alert('Undefined image'); alert('Undefined image');
return false; return false;
} }
@ -333,22 +484,75 @@ function update_button_palette_callback() {
else{ else{
if ((values['width'] == 0) || (values['height'] == 0)) { if ((values['width'] == 0) || (values['height'] == 0)) {
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
if(values['image'] != '' && values['image'] != 'none'){
if (!$('#image_'+idItem).length) {
if(values['label_position'] == 'left'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:right;');
}
else if(values['label_position'] == 'right'){
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png")
.attr('style','float:left;');
}
else{
var $image = $('<img></img>')
.attr('id', 'image_' + idItem)
.attr('class', 'image')
.attr('src', 'images/console/icons/'+values["image"]+".png");
}
$('#'+idItem).append($image);
}
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px');
}
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px');
$("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px');
}
}
else{
$("#image_" + idItem).removeAttr('width'); $("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height'); $("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70); $("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70); $("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px'); $("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px'); $("#image_" + idItem).css('height', '70px');
$("#image_" + idItem).remove();
} }
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px');
$("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px');
}
} }
else { else {
$("#image_" + idItem).removeAttr('width'); $("#image_" + idItem).removeAttr('width');
@ -485,7 +689,7 @@ function update_button_palette_callback() {
alert('Undefined height'); alert('Undefined height');
return false; return false;
} }
if(values['image'] == ''){ if(values['image'] == '' || values['image'] == 'none'){
alert('Undefined image'); alert('Undefined image');
return false; return false;
} }
@ -697,6 +901,11 @@ function create_button_palette_callback() {
} }
break; break;
case 'group_item': case 'group_item':
if((values['image'] == '' || values['image'] == 'none') && (values['label'] == '') && (values['show_statistics'] == false)){
alert('Undefined images');
validate = false;
}
break;
case 'static_graph': case 'static_graph':
if ((values['width'] == '')) { if ((values['width'] == '')) {
alert('Undefined width'); alert('Undefined width');
@ -706,10 +915,11 @@ function create_button_palette_callback() {
alert('Undefined height'); alert('Undefined height');
validate = false; validate = false;
} }
if((values['image'] == '') && (values['show_statistics']) == false){ if((values['image'] == '' || values['image'] == 'none') && (values['label']) == false){
alert('Undefined image'); alert('Undefined image');
validate = false; validate = false;
} }
break; break;
case 'auto_sla_graph': case 'auto_sla_graph':
@ -739,7 +949,7 @@ function create_button_palette_callback() {
alert('Undefined height'); alert('Undefined height');
validate = false; validate = false;
} }
if ((values['image'] == '')) { if ((values['image'] == '' || values['image'] == 'none')) {
alert($("#message_alert_no_image").html()); alert($("#message_alert_no_image").html());
validate = false; validate = false;
} }
@ -2478,6 +2688,262 @@ function createItem(type, values, id_data) {
break; break;
case 'group_item': case 'group_item':
switch (type) {
case 'group_item':
class_type = "group_item";
break;
case 'static_graph':
class_type = "static_graph";
break;
}
img_src = "images/spinner.gif";
item = $('<div></div>')
.attr('id', id_data)
.attr('class', 'item ' + class_type)
.css('text-align', 'left')
.css('position', 'absolute')
.css('display', 'inline-block')
.css('top', values['top'] + 'px')
.css('left', values['left'] + 'px');
if(values['show_statistics'] != 1){
if(values['label_position'] == 'left'){
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', 'images/console/signes/group_status.png')
.attr('style','float:right;');
}
else if(values['label_position'] == 'right'){
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', 'images/console/signes/group_status.png')
.attr('style','float:left;');
}
else{
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', 'images/console/signes/group_status.png');
}
}
else{
if(values['label_position'] == 'left'){
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', img_src)
.attr('style','float:right;');
}
else if(values['label_position'] == 'right'){
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', img_src)
.attr('style','float:left;');
}
else{
var $image = $('<img></img>')
.attr('id', 'image_' + id_data)
.attr('class', 'image')
.attr('src', img_src);
}
}
if(values['show_statistics'] != 1){
if ((values['width'] == 0) || (values['height'] == 0)) {
// Do none
if(values['image'] != '' && values['image'] != 'none'){
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$image.attr('width', '70')
.attr('height', '70');
}
else{
$image.attr('width', $('#preview > img')[0].naturalWidth)
.attr('height', $('#preview > img')[0].naturalHeight);
}
}
else{
$image.attr('width', '70')
.attr('height', '70');
}
}
else {
$image.attr('width', values['width'])
.attr('height', values['height']);
}
}
var $input = $('<input></input>')
.attr('id', 'hidden-status_' + id_data)
.attr('type', 'hidden')
.attr('value', -1)
.attr('name', 'status_' + id_data);
if(values['label_position'] == 'up'){
if(values['image'] == '' || values['image'] == 'none'){
item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input);
}
else{
item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($image)
.append($image)
.append($input);
}
}
else if(values['label_position'] == 'down'){
if(values['image'] == '' || values['image'] == 'none'){
item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input);
}
else{
item
.append($image)
.append($image)
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input);
}
}
else if(values['label_position'] == 'left'){
if(values['height'] == 0){
item
.append('<table style="float:left;height:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>');
}
else{
item
.append('<table style="float:left;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
}
if(values['image'] == '' || values['image'] == 'none'){
item
.append($input);
}
else{
item
.append($image)
.append($image)
.append($input);
}
}
else if(values['label_position'] == 'right'){
if(values['height'] == 0){
item
.append('<table style="float:right;height:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>');
}
else{
item
.append('<table style="float:right;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
}
if(values['image'] == '' || values['image'] == 'none'){
item
.append($input);
}
else{
item
.append($image)
.append($image)
.append($input);
}
}
if(values['show_statistics'] != 1){
set_static_graph_status(id_data, values['image']);
}
else{
set_static_graph_status(id_data, 'show_statistics');
}
if(values['show_statistics'] != 1){
if ((values['width'] == 0) || (values['height'] == 0)) {
if(values['image'] != '' && values['image'] != 'none'){
// Do none
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$image.attr('width', '70')
.attr('height', '70');
}
else{
$image.attr('width', $('#preview > img')[0].naturalWidth)
.attr('height', $('#preview > img')[0].naturalHeight);
}
}
else{
$image.attr('width', '70')
.attr('height', '70');
}
}
else {
$image.attr('width', values['width'])
.attr('height', values['height']);
}
}
else{
if ((values['width'] == 0) || (values['height'] == 0)) {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 520);
$("#image_" + idItem).attr('height', 80);
$("#image_" + idItem).css('width', '520px');
$("#image_" + idItem).css('height', '80px');
$("#image_" + idItem).attr('src', 'images/console/signes/group_status.png');
}
else {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
$("#image_" + idItem).attr('src', 'images/console/signes/group_status.png');
}
}
break;
case 'static_graph': case 'static_graph':
switch (type) { switch (type) {
case 'group_item': case 'group_item':
@ -2532,6 +2998,8 @@ function createItem(type, values, id_data) {
if ((values['width'] == 0) || (values['height'] == 0)) { if ((values['width'] == 0) || (values['height'] == 0)) {
// Do none // Do none
if(values['image'] != '' && values['image'] != 'none'){
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$image.attr('width', '70') $image.attr('width', '70')
.attr('height', '70'); .attr('height', '70');
@ -2539,7 +3007,16 @@ function createItem(type, values, id_data) {
else{ else{
$image.attr('width', $('#preview > img')[0].naturalWidth) $image.attr('width', $('#preview > img')[0].naturalWidth)
.attr('height', $('#preview > img')[0].naturalHeight); .attr('height', $('#preview > img')[0].naturalHeight);
} }
}
else{
$image.attr('width', '70')
.attr('height', '70');
}
} }
else { else {
$image.attr('width', values['width']) $image.attr('width', values['width'])
@ -2564,19 +3041,37 @@ function createItem(type, values, id_data) {
.attr('name', 'status_' + id_data); .attr('name', 'status_' + id_data);
if(values['label_position'] == 'up'){ if(values['label_position'] == 'up'){
item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>') if(values['image'] == '' || values['image'] == 'none'){
.append($image) item
.append($image) .append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input); .append($input);
}
else{
item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($image)
.append($image)
.append($input);
}
} }
else if(values['label_position'] == 'down'){ else if(values['label_position'] == 'down'){
item
.append($image) if(values['image'] == '' || values['image'] == 'none'){
.append($image) item
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>') .append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input); .append($input);
}
else{
item
.append($image)
.append($image)
.append('<table style="width:70px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
.append($input);
}
} }
else if(values['label_position'] == 'left'){ else if(values['label_position'] == 'left'){
@ -2588,10 +3083,19 @@ function createItem(type, values, id_data) {
item item
.append('<table style="float:left;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>') .append('<table style="float:left;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
} }
if(values['image'] == '' || values['image'] == 'none'){
item
.append($input);
}
else{
item item
.append($image) .append($image)
.append($image) .append($image)
.append($input); .append($input);
}
} }
else if(values['label_position'] == 'right'){ else if(values['label_position'] == 'right'){
if(values['height'] == 0){ if(values['height'] == 0){
@ -2602,10 +3106,20 @@ function createItem(type, values, id_data) {
item item
.append('<table style="float:right;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>') .append('<table style="float:right;height:'+values['height']+'px"><tr><td></td></tr><tr><td><span id="text_'+id_data+'" class="text">'+values['label']+'</span></td></tr><tr><td></td></tr></table>')
} }
if(values['image'] == '' || values['image'] == 'none'){
item
.append($input);
}
else{
item item
.append($image) .append($image)
.append($image) .append($image)
.append($input); .append($input);
}
} }
if(values['show_statistics'] != 1){ if(values['show_statistics'] != 1){
@ -2618,15 +3132,22 @@ function createItem(type, values, id_data) {
if(values['show_statistics'] != 1){ if(values['show_statistics'] != 1){
if ((values['width'] == 0) || (values['height'] == 0)) { if ((values['width'] == 0) || (values['height'] == 0)) {
if(values['image'] != '' && values['image'] != 'none'){
// Do none // Do none
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$image.attr('width', '70') $image.attr('width', '70')
.attr('height', '70'); .attr('height', '70');
}
else{
$image.attr('width', $('#preview > img')[0].naturalWidth)
.attr('height', $('#preview > img')[0].naturalHeight);
}
} }
else{ else{
$image.attr('width', $('#preview > img')[0].naturalWidth) $image.attr('width', '70')
.attr('height', $('#preview > img')[0].naturalHeight); .attr('height', '70');
} }
} }
else { else {
$image.attr('width', values['width']) $image.attr('width', values['width'])
@ -4226,7 +4747,7 @@ function showPreviewStaticGraph(staticGraph) {
.css('text-align', 'right') .css('text-align', 'right')
.append($spinner); .append($spinner);
if(staticGraph == ''){ if(staticGraph == '' || staticGraph == 'none'){
if (is_metaconsole()) { if (is_metaconsole()) {
$spinner.prop("src", "../../images/image_problem_area.png"); $spinner.prop("src", "../../images/image_problem_area.png");
@ -4282,7 +4803,7 @@ function showPreviewIcon(icon) {
.append($spinner); .append($spinner);
if (icon == '') { if (icon == '' || icon == 'none') {
if (is_metaconsole()) { if (is_metaconsole()) {
$spinner.prop("src", "../../images/image_problem_area.png"); $spinner.prop("src", "../../images/image_problem_area.png");
} }

View File

@ -442,7 +442,7 @@ function visual_map_print_item($mode = "read", $layoutData,
// Link to an module // Link to an module
if (empty($layoutData['id_metaconsole'])) { if (empty($layoutData['id_metaconsole'])) {
$url = $config['homeurl'] . $url = $config['homeurl'] .
'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo']; 'index.php?sec=estado&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo'];
} }
else { else {
$url = ui_meta_get_url_console_child( $url = ui_meta_get_url_console_child(
@ -613,7 +613,7 @@ function visual_map_print_item($mode = "read", $layoutData,
// Link to an module // Link to an module
if (empty($layoutData['id_metaconsole'])) { if (empty($layoutData['id_metaconsole'])) {
$url = $config['homeurl'] . $url = $config['homeurl'] .
'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo']; 'index.php?sec=estado&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo'];
} }
else { else {
$url = ui_meta_get_url_console_child( $url = ui_meta_get_url_console_child(
@ -662,11 +662,11 @@ function visual_map_print_item($mode = "read", $layoutData,
$url = $url =
$server["server_url"] . $server["server_url"] .
'/index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo']; '/index.php?sec=estado&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo'];
} }
else { else {
$url = $url =
$config['homeurl'].'/index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo']; $config['homeurl'].'/index.php?sec=estado&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo'];
} }
} }
else { else {
@ -730,7 +730,7 @@ function visual_map_print_item($mode = "read", $layoutData,
else { else {
if (empty($layoutData['id_metaconsole'])) { if (empty($layoutData['id_metaconsole'])) {
$url = $config['homeurl'] . $url = $config['homeurl'] .
'/index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo']; '/index.php?sec=estado&amp;sec2=operation/agentes/status_monitor&amp;id_module=' . $layoutData['id_agente_modulo'];
} }
else { else {
$url = ui_meta_get_url_console_child( $url = ui_meta_get_url_console_child(
@ -1607,7 +1607,8 @@ function visual_map_print_item($mode = "read", $layoutData,
break; break;
case STATIC_GRAPH: case STATIC_GRAPH:
case GROUP_ITEM: case GROUP_ITEM:
if ($layoutData['image'] != null || $layoutData['show_statistics'] == 1) {
if (($layoutData['image'] != null && $layoutData['image'] != 'none') || $layoutData['show_statistics'] == 1) {
$img_style_title = strip_tags($label); $img_style_title = strip_tags($label);

View File

@ -201,7 +201,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items['image_row']['html'] = $form_items['image_row']['html'] =
'<td align="left">' . __('Image') . '</td> '<td align="left">' . __('Image') . '</td>
<td align="left">' . <td align="left">' .
html_print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', '', true) . html_print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', 'none', true) .
'</td>'; '</td>';