Merge branch '1407-No-se-puede-quitar-icono-de-objeto-Visual-consoles-2' into 'develop'
Show no data advice when select none in visual console static graph or icon element - #1407 See merge request artica/pandorafms!907
This commit is contained in:
commit
77a0f634cc
|
@ -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,7 +299,7 @@ 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;
|
||||
}
|
||||
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in New Issue