diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 2479223ec4..dbac5adb4b 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -48,6 +48,7 @@ function toggle_advance_options_palette(close) { } // Main function, execute in event documentReady + function visual_map_main() { img_handler_start = "images/dot_red.png"; img_handler_end = "images/dot_green.png"; @@ -298,11 +299,11 @@ function update_button_palette_callback() { alert('Undefined height'); return false; } - if(values['image'] == ''){ + if(((values['image'] == '') && (values['show_statistics']) == false)){ alert('Undefined image'); return false; } - + $("#text_" + idItem).html(values['label']); if(values['show_statistics'] == 1){ @@ -484,6 +485,10 @@ function update_button_palette_callback() { alert('Undefined height'); return false; } + if(values['image'] == ''){ + alert('Undefined image'); + return false; + } $("#image_" + idItem).attr('src', "images/spinner.gif"); if ((values['width'] == 0) || (values['height'] == 0)) { if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ @@ -701,14 +706,11 @@ function create_button_palette_callback() { alert('Undefined height'); validate = false; } - if(values['image'] == ''){ + if((values['image'] == '') && (values['show_statistics']) == false){ alert('Undefined image'); - return false; - } - if ((values['label'] == '') && (values['image'] == '') && (values['show_statistics']) == false) { - alert($("#message_alert_no_label_no_image").html()); validate = false; } + break; case 'auto_sla_graph': if ((values['agent'] == '')) { @@ -4224,7 +4226,17 @@ function showPreviewStaticGraph(staticGraph) { .css('text-align', 'right') .append($spinner); - if (staticGraph != '') { + if(staticGraph == ''){ + + if (is_metaconsole()) { + $spinner.prop("src", "../../images/image_problem_area.png"); + } + else{ + $spinner.prop("src", "images/image_problem_area.png"); + } + $('#preview > img').css({'max-width':'100px','max-height':'100px'}); + } + else{ imgBase = "images/console/icons/" + staticGraph; var parameter = Array(); @@ -4269,7 +4281,17 @@ function showPreviewIcon(icon) { .css('text-align', 'left') .append($spinner); - if (icon != '') { + + if (icon == '') { + if (is_metaconsole()) { + $spinner.prop("src", "../../images/image_problem_area.png"); + } + else{ + $spinner.prop("src", "images/image_problem_area.png"); + } + $('#preview > img').css({'max-width':'100px','max-height':'100px'}); + } + else{ imgBase = "images/console/icons/" + icon; var params = [];