cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to b592e0a
Date Wed, 24 Sep 2014 21:25:53 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master f5eae55ab -> b592e0af3


CLOUDSTACK-7625: UI > IP Address page > EnableVPN > If createRemoteAccessVpn returns
success, but the newly created remoteaccessvpn object's state is not Running, treat it as
a failure.


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

Branch: refs/heads/master
Commit: b592e0af345c38b5a898ec238bc4f2c8cedf6ef9
Parents: f5eae55
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Sep 24 14:25:22 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Sep 24 14:25:42 2014 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b592e0af/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 55c4937..8bbde6a 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2361,10 +2361,15 @@
                                         success: function(data) {
                                             args.response.success({
                                                 _custom: {
-                                                    getUpdatedItem: function(json) {
+                                                    getUpdatedItem: function(json) {    
                                               	
+                                                    	var vpnenabledAndRunning = false;
+                                                    	if (json.queryasyncjobresultresponse.jobresult.remoteaccessvpn.state
== "Running") {
+                                                    		vpnenabledAndRunning = true;
+                                                    	}                                  
                 	
+                                                    	                                   
                	
                                                         return {
                                                             vpn: json.queryasyncjobresultresponse.jobresult.remoteaccessvpn,
-                                                            vpnenabled: true
+                                                            vpnenabled: vpnenabledAndRunning
                                                         };
                                                     },
                                                     getActionFilter: function() {
@@ -2387,7 +2392,13 @@
                                         return 'label.enable.vpn';
                                     },
                                     complete: function(args) {
-                                        return _l('message.enabled.vpn') + ' ' + args.vpn.publicip
+ '.' + '<br/>' + _l('message.enabled.vpn.ip.sec') + '<br/>' + args.vpn.presharedkey;
+                                    	var msg;
+                                    	if (args.vpn.state == "Running") {
+                                    	    msg = _l('message.enabled.vpn') + ' ' + args.vpn.publicip
+ '.' + '<br/>' + _l('message.enabled.vpn.ip.sec') + '<br/>' + args.vpn.presharedkey;
                               	
+                                    	} else {
+                                    		msg = "VPN configuration has been generated, but it
failed to apply. Please check connectivity of the network element, then re-try.";
+                                    	}   
+                                        return msg;
                                     }
                                 },
                                 notification: {


Mime
View raw message