mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Show no data advice when select none in visual console static graph or icon element - #1407
This commit is contained in:
parent
cf075dadb9
commit
efcc8b4ea7
@ -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";
|
||||
@ -304,7 +305,11 @@ function update_button_palette_callback() {
|
||||
alert('Undefined height');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(((values['image'] == '') && (values['show_statistics']) == false)){
|
||||
alert('Undefined image');
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#text_" + idItem).html(values['label']);
|
||||
|
||||
if(values['show_statistics'] == 1){
|
||||
@ -476,6 +481,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){
|
||||
@ -688,10 +697,11 @@ function create_button_palette_callback() {
|
||||
alert('Undefined height');
|
||||
validate = false;
|
||||
}
|
||||
if ((values['label'] == '') && (values['image'] == '') && (values['show_statistics']) == false) {
|
||||
alert($("#message_alert_no_label_no_image").html());
|
||||
if((values['image'] == '') && (values['show_statistics']) == false){
|
||||
alert('Undefined image');
|
||||
validate = false;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'auto_sla_graph':
|
||||
if ((values['agent'] == '')) {
|
||||
@ -3791,7 +3801,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();
|
||||
@ -3836,7 +3856,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 = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user