cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/4] git commit: updated refs/heads/4.8 to 84e2825
Date Tue, 01 Nov 2016 08:35:17 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.8 ec1d1e50c -> 84e282596


CLOUDSTACK-9534: Allow VR to be destroy in UI when in running state

This allows admins/users to destroy a VR that is in running state from the UI.
This action is possible via cloudmonkey/APIs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.8
Commit: 65eb3202c281cf75b9825387058343b9535729eb
Parents: 9eb8b2e
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Oct 5 18:21:51 2016 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Oct 7 15:15:37 2016 +0530

----------------------------------------------------------------------
 ui/scripts/system.js | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65eb3202/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index faa388c..7e4200a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2585,6 +2585,11 @@
                                                 label: 'label.destroy.router',
                                                 messages: {
                                                     confirm: function (args) {
+                                                        if (args && args.context
&& args.context.routers[0]) {
+                                                            if (args.context.routers[0].state
== 'Running') {
+                                                                return dictionary['message.action.stop.router']
+ ' ' + dictionary['message.confirm.destroy.router'];
+                                                            }
+                                                        }
                                                         return 'message.confirm.destroy.router';
                                                     },
                                                     notification: function (args) {
@@ -3752,6 +3757,11 @@
                                                 label: 'label.destroy.router',
                                                 messages: {
                                                     confirm: function (args) {
+                                                        if (args && args.context
&& args.context.routers[0]) {
+                                                            if (args.context.routers[0].state
== 'Running') {
+                                                                return dictionary['message.action.stop.router']
+ ' ' + dictionary['message.confirm.destroy.router'];
+                                                            }
+                                                        }
                                                         return 'message.confirm.destroy.router';
                                                     },
                                                     notification: function (args) {
@@ -6674,6 +6684,11 @@
                                                 label: 'label.destroy.router',
                                                 messages: {
                                                     confirm: function (args) {
+                                                        if (args && args.context
&& args.context.routers[0]) {
+                                                            if (args.context.routers[0].state
== 'Running') {
+                                                                return dictionary['message.action.stop.router']
+ ' ' + dictionary['message.confirm.destroy.router'];
+                                                            }
+                                                        }
                                                         return 'message.confirm.destroy.router';
                                                     },
                                                     notification: function (args) {
@@ -9830,6 +9845,11 @@
                                         label: 'label.destroy.router',
                                         messages: {
                                             confirm: function (args) {
+                                                if (args && args.context &&
args.context.routers[0]) {
+                                                    if (args.context.routers[0].state ==
'Running') {
+                                                        return dictionary['message.action.stop.router']
+ ' ' + dictionary['message.confirm.destroy.router'];
+                                                    }
+                                                }
                                                 return 'message.confirm.destroy.router';
                                             },
                                             notification: function (args) {
@@ -20986,8 +21006,9 @@
             }
 
             allowedActions.push("restart");
-
+            allowedActions.push("remove");
             allowedActions.push("viewConsole");
+
             if (isAdmin())
             allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {


Mime
View raw message