You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/05/28 00:35:41 UTC
[12/50] [abbrv] git commit: CS-13091: Remove enable/disable physical
network actions
CS-13091: Remove enable/disable physical network actions
Due to limitations in the API, for now the enable/disable
functionality for physical networks will be removed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/d845f203
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d845f203
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d845f203
Branch: refs/heads/3.0.x
Commit: d845f203e47db3f233d31e4361ce0c750b7158ee
Parents: d0b9aec
Author: Brian Federle <br...@citrix.com>
Authored: Fri May 25 10:59:56 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri May 25 11:00:13 2012 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 84 ++------------------------------------------
1 files changed, 4 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d845f203/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index a60cb29..18ed9a9 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1827,81 +1827,7 @@
notification: {
poll: pollAsyncJobResult
}
- },
- enable: {
- label: 'label.action.enable.physical.network',
- messages: {
- confirm: function(args) {
- return 'message.action.enable.physical.network';
- },
- notification: function(args) {
- return 'label.action.enable.physical.network';
- }
- },
- action: function(args) {
- $.ajax({
- url: createURL('updatePhysicalNetwork'),
- data: {
- id: args.context.physicalNetworks[0].id,
- state: 'Enabled'
- },
- success: function(json) {
- args.response.success({
- _custom: {
- jobId: json.updatephysicalnetworkresponse.jobid,
- getUpdatedItem: function(json) {
- return {
- state: 'Enabled'
- };
- },
- getActionFilter: function() {
- return cloudStack.actionFilter.physicalNetwork;
- }
- }
- });
- },
- error: function(json) { args.response.error(parseXMLHttpResponse(json)); }
- });
- },
- notification: { poll: pollAsyncJobResult }
- },
- disable: {
- label: 'label.action.disable.physical.network',
- messages: {
- confirm: function(args) {
- return 'message.action.disable.physical.network';
- },
- notification: function(args) {
- return 'label.action.disable.physical.network';
- }
- },
- action: function(args) {
- $.ajax({
- url: createURL('updatePhysicalNetwork'),
- data: {
- id: args.context.physicalNetworks[0].id,
- state: 'Disabled'
- },
- success: function(json) {
- args.response.success({
- _custom: {
- jobId: json.updatephysicalnetworkresponse.jobid,
- getUpdatedItem: function(json) {
- return {
- state: 'Disabled'
- };
- },
- getActionFilter: function() {
- return cloudStack.actionFilter.physicalNetwork;
- }
- }
- });
- },
- error: function(json) { args.response.error(parseXMLHttpResponse(json)); }
- });
- },
- notification: { poll: pollAsyncJobResult }
- }
+ }
}
},
dataProvider: function(args) {
@@ -9315,12 +9241,10 @@
cloudStack.actionFilter.physicalNetwork = function(args) {
var state = args.context.item.state;
- if (state == 'Enabled') {
- return ['disable', 'remove'];
- } else if (state == 'Disabled') {
- return ['enable', 'remove'];
+ if (state != 'Destroyed') {
+ return ['remove'];
}
-
+
return [];
};
})($, cloudStack);