Updated Branches:
  refs/heads/vpc 3b8494131 -> df4a4a6b2

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.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/41afde32
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/41afde32
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/41afde32

Branch: refs/heads/vpc
Commit: 41afde3207ab2ed0e40322d9e4023ebd704a2af7
Parents: 3b84941
Author: Brian Federle <[email protected]>
Authored: Thu Aug 9 11:02:10 2012 -0700
Committer: Brian Federle <[email protected]>
Committed: Thu Aug 9 16:15:29 2012 -0700

----------------------------------------------------------------------
 ui/scripts/ui-custom/vpc.js |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/41afde32/ui/scripts/ui-custom/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/vpc.js b/ui/scripts/ui-custom/vpc.js
index 17cb7c9..f4bd5e0 100644
--- a/ui/scripts/ui-custom/vpc.js
+++ b/ui/scripts/ui-custom/vpc.js
@@ -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, {},

Reply via email to