mirror of https://github.com/apache/cloudstack.git
CS-15902: Remove loading overlay from VPC actions
For add VPN and add gateway actions: remove loading overlay to allow user to perform other actions. The overlay is replaced with a set of notification messages indicating the status of the job.
This commit is contained in:
parent
3b8494131f
commit
41afde3207
|
|
@ -75,9 +75,7 @@
|
|||
context: args.gateways.context,
|
||||
after: function(args) {
|
||||
var data = args.data;
|
||||
var $loading = $('<div>').addClass('loading-overlay').appendTo($chart);
|
||||
var error = function(message) {
|
||||
$loading.remove();
|
||||
cloudStack.dialog.notice({ message: message });
|
||||
};
|
||||
|
||||
|
|
@ -94,10 +92,16 @@
|
|||
};
|
||||
var success = function(args) {
|
||||
if (!$chart.is(':visible')) return;
|
||||
|
||||
$loading.remove();
|
||||
showGatewayListView();
|
||||
|
||||
cloudStack.dialog.confirm({
|
||||
message: 'Gateway for VPC has been created successfully. Would you like to see its details?',
|
||||
action: showGatewayListView
|
||||
});
|
||||
};
|
||||
|
||||
cloudStack.dialog.notice({
|
||||
message: 'Your gateway is being created; please see notifications window.'
|
||||
});
|
||||
|
||||
cloudStack.ui.notifications.add(
|
||||
notification,
|
||||
|
|
@ -132,9 +136,7 @@
|
|||
cloudStack.dialog.confirm({
|
||||
message: 'Please confirm that you want to add a Site-to-Site VPN gateway.',
|
||||
action: function() {
|
||||
var $loading = $('<div>').addClass('loading-overlay').appendTo($chart);
|
||||
var error = function(message) {
|
||||
$loading.remove();
|
||||
cloudStack.dialog.notice({ message: message });
|
||||
};
|
||||
|
||||
|
|
@ -150,11 +152,16 @@
|
|||
};
|
||||
var success = function(args) {
|
||||
if (!$chart.is(':visible')) return;
|
||||
|
||||
$loading.remove();
|
||||
showVPNListView();
|
||||
cloudStack.dialog.confirm({
|
||||
message: 'Gateway for VPC has been created successfully. Would you like to see its details?',
|
||||
action: showVPNListView
|
||||
});
|
||||
};
|
||||
|
||||
cloudStack.dialog.notice({
|
||||
message: 'Your VPN is being created; please see notifications window.'
|
||||
});
|
||||
|
||||
cloudStack.ui.notifications.add(
|
||||
notification,
|
||||
success, {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue