From 14d5bb04c148b9993e24cd08acc3885c66c8014d Mon Sep 17 00:00:00 2001 From: danielmaya Date: Wed, 13 Dec 2017 17:10:05 +0100 Subject: [PATCH] Fixed group status icon --- .../visual_console_builder.editor.js | 56 ++++++------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index fd7886f275..d47070bec4 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -2719,26 +2719,18 @@ function createItem(type, values, id_data) { break; case 'group_item': - - switch (type) { - case 'group_item': - class_type = "group_item"; - break; - case 'static_graph': - class_type = "static_graph"; - break; - } + class_type = "group_item"; - img_src = "images/spinner.gif"; + img_src = "images/spinner.gif"; - item = $('
') - .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'); + item = $('
') + .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'); @@ -2839,7 +2831,7 @@ function createItem(type, values, id_data) { if(values['label_position'] == 'up'){ - if(values['image'] == '' || values['image'] == 'none'){ + if((values['image'] == '' || values['image'] == 'none') && values['show_statistics'] != 1){ item .append('
'+values['label']+'
') .append($input); @@ -2848,14 +2840,12 @@ function createItem(type, values, id_data) { item .append('
'+values['label']+'
') .append($image) - .append($image) .append($input); } } else if(values['label_position'] == 'down'){ - - if(values['image'] == '' || values['image'] == 'none'){ + if((values['image'] == '' || values['image'] == 'none') && values['show_statistics'] != 1){ item .append('
'+values['label']+'
') .append($input); @@ -2863,7 +2853,6 @@ function createItem(type, values, id_data) { } else{ item - .append($image) .append($image) .append('
'+values['label']+'
') .append($input); @@ -2881,14 +2870,13 @@ function createItem(type, values, id_data) { .append('
'+values['label']+'
') } - if(values['image'] == '' || values['image'] == 'none'){ + if((values['image'] == '' || values['image'] == 'none') && values['show_statistics'] != 1){ item .append($input); } else{ item .append($image) - .append($image) .append($input); } @@ -2904,19 +2892,16 @@ function createItem(type, values, id_data) { .append('
'+values['label']+'
') } - if(values['image'] == '' || values['image'] == 'none'){ + if((values['image'] == '' || values['image'] == 'none') && values['show_statistics'] != 1){ item .append($input); } else{ item .append($image) - .append($image) .append($input); } - - - + } if(values['show_statistics'] != 1){ @@ -2976,15 +2961,8 @@ function createItem(type, values, id_data) { break; case 'static_graph': - switch (type) { - case 'group_item': - class_type = "group_item"; - break; - case 'static_graph': - class_type = "static_graph"; - break; - } - + class_type = "static_graph"; + img_src = "images/spinner.gif"; item = $('
')