You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/04/21 19:03:21 UTC
[10/49] git commit: updated refs/heads/marvin_refactor to 0b5fe9a
CLOUDSTACK-2038: cloudstack UI - mixed zone management - network menu - guest network section - show/hide Add Guest Network action upon selected zone type on top menu.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/65448791
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/65448791
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/65448791
Branch: refs/heads/marvin_refactor
Commit: 65448791ed55be8e4291223f37ed81256ffc0e1e
Parents: f85ab8a
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Apr 15 14:56:36 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Mon Apr 15 14:56:36 2013 -0700
----------------------------------------------------------------------
ui/scripts/network.js | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65448791/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index dfb9f10..a9a1a6b 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -320,21 +320,14 @@
title: 'label.guest.networks',
listView: {
actions: {
- add: {
+ add: { //add Isolated guest network (can't add Shared guest network here)
label: 'label.add.guest.network',
- preFilter: function(args) {
- var advSgDisabledZones;
- $.ajax({
- url: createURL('listZones'),
- async: false,
- success: function(json) {
- advSgDisabledZones = $.grep(json.listzonesresponse.zone, function(zone) {
- return (zone.networktype == 'Advanced' && zone.securitygroupsenabled != true); //Isolated networks can only be created in Advanced SG-disabled zone (but not in Basic zone nor Advanced SG-enabled zone)
- });
- }
- });
- return (advSgDisabledZones != null && advSgDisabledZones.length > 0);
+ preFilter: function(args) { //Isolated networks is only supported in Advanced (SG-disabled) zone
+ if(args.context.zoneType != 'Basic')
+ return true;
+ else
+ return false;
},
createForm: {