Skip to content

Commit 41afde3

Browse files
committed
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.
1 parent 3b84941 commit 41afde3

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

‎ui/scripts/ui-custom/vpc.js‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@
7575
context: args.gateways.context,
7676
after: function(args) {
7777
var data = args.data;
78-
var $loading = $('<div>').addClass('loading-overlay').appendTo($chart);
7978
var error = function(message) {
80-
$loading.remove();
8179
cloudStack.dialog.notice({ message: message });
8280
};
8381

@@ -94,10 +92,16 @@
9492
};
9593
var success = function(args) {
9694
if (!$chart.is(':visible')) return;
97-
98-
$loading.remove();
99-
showGatewayListView();
95+
96+
cloudStack.dialog.confirm({
97+
message: 'Gateway for VPC has been created successfully. Would you like to see its details?',
98+
action: showGatewayListView
99+
});
100100
};
101+
102+
cloudStack.dialog.notice({
103+
message: 'Your gateway is being created; please see notifications window.'
104+
});
101105

102106
cloudStack.ui.notifications.add(
103107
notification,
@@ -132,9 +136,7 @@
132136
cloudStack.dialog.confirm({
133137
message: 'Please confirm that you want to add a Site-to-Site VPN gateway.',
134138
action: function() {
135-
var $loading = $('<div>').addClass('loading-overlay').appendTo($chart);
136139
var error = function(message) {
137-
$loading.remove();
138140
cloudStack.dialog.notice({ message: message });
139141
};
140142

@@ -150,11 +152,16 @@
150152
};
151153
var success = function(args) {
152154
if (!$chart.is(':visible')) return;
153-
154-
$loading.remove();
155-
showVPNListView();
155+
cloudStack.dialog.confirm({
156+
message: 'Gateway for VPC has been created successfully. Would you like to see its details?',
157+
action: showVPNListView
158+
});
156159
};
157160

161+
cloudStack.dialog.notice({
162+
message: 'Your VPN is being created; please see notifications window.'
163+
});
164+
158165
cloudStack.ui.notifications.add(
159166
notification,
160167
success, {},

0 commit comments

Comments
 (0)