cloudstack 3.0 UI - infrastructure page - update SSL Certificate - overlay loading image during action.

This commit is contained in:
Jessica Wang 2012-03-08 14:10:27 -08:00
parent 5cf04ee03c
commit 13f01f3c5f
1 changed files with 11 additions and 2 deletions

View File

@ -62,7 +62,10 @@
domainsuffix: { label: 'label.domain.suffix' }
}
},
after: function(args) {
after: function(args) {
var $loading = $('<div>').addClass('loading-overlay');
$('.system-dashboard-view:visible').prepend($loading);
$.ajax({
url: createURL('uploadCustomCertificate'),
data: {
@ -92,14 +95,20 @@
else if (result.jobstatus == 2) {
cloudStack.dialog.notice({ message: 'Failed to update SSL Certificate. ' + fromdb(result.jobresult.errortext) });
}
$loading.remove();
}
},
error: function(XMLHttpResponse) {
cloudStack.dialog.notice({ message: 'Failed to update SSL Certificate. ' + parseXMLHttpResponse(XMLHttpResponse) });
$loading.remove();
}
});
});
}
},
error: function(XMLHttpResponse) {
cloudStack.dialog.notice({ message: 'Failed to update SSL Certificate. ' + parseXMLHttpResponse(XMLHttpResponse) });
$loading.remove();
}
});
},
context: {}