You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2016/11/01 08:35:17 UTC

[1/4] git commit: updated refs/heads/4.8 to 84e2825

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 <ro...@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 <ro...@shapeblue.com>
Authored: Wed Oct 5 18:21:51 2016 +0530
Committer: Rohit Yadav <ro...@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') {


[4/4] git commit: updated refs/heads/4.8 to 84e2825

Posted by bh...@apache.org.
Merge pull request #1701 from shapeblue/vr-destroy-ui-allow

CLOUDSTACK-9534: Allow VR to be destroy in UI when in running stateThis allows us to destroy a VR that is in running state from the UI. This action is possible via cloudmonkey/APIs, and would be useful for anyone who wants to simply destroy a VR from the UI without having to stop it first.

As this is a pure UI fix, manual testing would be needed but no regression integration testing is necessary.
/cc @jburwell @karuturi

@blueorangutan package

Screenshot:

![screenshot from 2016-10-05 18-25-49](https://cloud.githubusercontent.com/assets/95203/19113882/398e8a8e-8b29-11e6-8e99-8f28def2e527.png)

* pr/1701:
  CLOUDSTACK-9534: Allow VR to be destroy in UI when in running state

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


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

Branch: refs/heads/4.8
Commit: 84e282596ef7c11e407c82fa5cdeaa1e5b28cbcf
Parents: 2c436a4 65eb320
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 1 14:04:58 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 1 14:04:58 2016 +0530

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



[2/4] git commit: updated refs/heads/4.8 to 84e2825

Posted by bh...@apache.org.
CLOUDSTACK-9550: Use context to filter items in a metrics view

Use available context to filter a metrics view based on zone, cluster, host
in the context object. This fixes metrics view filtering when metrics view is
viewed via Zone->Compute and Storage-> for a resource.

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


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

Branch: refs/heads/4.8
Commit: 2767e1ade6cd9918ea952be4898d02ae30479feb
Parents: 9eb8b2e
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Wed Oct 19 11:41:08 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 19 12:23:11 2016 +0530

----------------------------------------------------------------------
 ui/scripts/metrics.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2767e1ad/ui/scripts/metrics.js
----------------------------------------------------------------------
diff --git a/ui/scripts/metrics.js b/ui/scripts/metrics.js
index 6ac376e..e9a947d 100644
--- a/ui/scripts/metrics.js
+++ b/ui/scripts/metrics.js
@@ -358,9 +358,19 @@
             dataProvider: function(args) {
                 var data = {};
                 listViewDataProvider(args, data);
+
+                if ("zones" in args.context && args.context.zones[0]) {
+                    data['zoneid'] = args.context.zones[0].id;
+                }
+
+                if ("pods" in args.context && args.context.pods[0]) {
+                    data['podid'] = args.context.pods[0].id;
+                }
+
                 if (args.context.metricsFilterData && args.context.metricsFilterData.key && args.context.metricsFilterData.value) {
                     data[args.context.metricsFilterData.key] = args.context.metricsFilterData.value;
                 }
+
                 $.ajax({
                     url: createURL('listClusters'),
                     data: data,
@@ -623,9 +633,29 @@
                 var data = {};
                 data.type = 'routing';
                 listViewDataProvider(args, data);
+
+                if (!args.context.instances) {
+                    if ("zones" in args.context && args.context.zones[0]) {
+                        data['zoneid'] = args.context.zones[0].id;
+                    }
+
+                    if ("pods" in args.context && args.context.pods[0]) {
+                        data['podid'] = args.context.pods[0].id;
+                    }
+
+                    if ("clusters" in args.context && args.context.clusters[0]) {
+                        data['clusterid'] = args.context.clusters[0].id;
+                    }
+                } else {
+                    if (args.context.instances[0]) {
+                        data['id'] = args.context.instances[0].hostid;
+                    }
+                }
+
                 if (args.context.metricsFilterData && args.context.metricsFilterData.key && args.context.metricsFilterData.value) {
                     data[args.context.metricsFilterData.key] = args.context.metricsFilterData.value;
                 }
+
                 $.ajax({
                     url: createURL('listHosts'),
                     data: data,
@@ -843,9 +873,15 @@
             dataProvider: function(args) {
                 var data = {};
                 listViewDataProvider(args, data);
+
+                if ("hosts" in args.context && args.context.hosts[0]) {
+                    data['hostid'] = args.context.hosts[0].id;
+                }
+
                 if (args.context.metricsFilterData && args.context.metricsFilterData.key && args.context.metricsFilterData.value) {
                     data[args.context.metricsFilterData.key] = args.context.metricsFilterData.value;
                 }
+
                 $.ajax({
                     url: createURL('listVirtualMachines'),
                     data: data,
@@ -942,9 +978,19 @@
             dataProvider: function(args) {
                 var data = {listAll: true};
                 listViewDataProvider(args, data);
+
+                if ("instances" in args.context && args.context.instances[0]) {
+                    data['virtualmachineid'] = args.context.instances[0].id;
+                }
+
+                if ("primarystorages" in args.context && args.context.primarystorages[0]) {
+                    data['storageid'] = args.context.primarystorages[0].id;
+                }
+
                 if (args.context.metricsFilterData && args.context.metricsFilterData.key && args.context.metricsFilterData.value) {
                     data[args.context.metricsFilterData.key] = args.context.metricsFilterData.value;
                 }
+
                 $.ajax({
                     url: createURL('listVolumes'),
                     data: data,
@@ -1044,9 +1090,23 @@
             dataProvider: function(args) {
                 var data = {};
                 listViewDataProvider(args, data);
+
+                if ("zones" in args.context && args.context.zones[0]) {
+                    data['zoneid'] = args.context.zones[0].id;
+                }
+
+                if ("pods" in args.context && args.context.pods[0]) {
+                    data['podid'] = args.context.pods[0].id;
+                }
+
+                if ("clusters" in args.context && args.context.clusters[0]) {
+                    data['clusterid'] = args.context.clusters[0].id;
+                }
+
                 if (args.context.metricsFilterData && args.context.metricsFilterData.key && args.context.metricsFilterData.value) {
                     data[args.context.metricsFilterData.key] = args.context.metricsFilterData.value;
                 }
+
                 $.ajax({
                     url: createURL('listStoragePools'),
                     data: data,


[3/4] git commit: updated refs/heads/4.8 to 84e2825

Posted by bh...@apache.org.
Merge pull request #1712 from shapeblue/metrics-view-context-filtering

CLOUDSTACK-9550: Use context to filter items in a metrics viewUse available context to filter a metrics view based on zone, cluster, host
in the context object. This fixes metrics view filtering when metrics view is
viewed via Zone->Compute and Storage-> for a resource.

/cc @jburwell @karuturi -- this is a pure UI fix, one manual test LGTM would be required.

* pr/1712:
  CLOUDSTACK-9550: Use context to filter items in a metrics view

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


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

Branch: refs/heads/4.8
Commit: 2c436a4f1ebfecc73a607ebda52b015288301fbf
Parents: ec1d1e5 2767e1a
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Nov 1 14:02:55 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 1 14:02:55 2016 +0530

----------------------------------------------------------------------
 ui/scripts/metrics.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
----------------------------------------------------------------------