You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2012/07/11 00:41:33 UTC
[2/2] git commit: Add block to show/hide tier select
Add block to show/hide tier select
-- Hidden by default, needs real conditional code
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/262bbbe8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/262bbbe8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/262bbbe8
Branch: refs/heads/master
Commit: 262bbbe8001631df8aa00ed6a89bbb66e49dc141
Parents: 9f09381
Author: Brian Federle <br...@citrix.com>
Authored: Tue Jul 10 15:39:09 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Jul 10 15:41:23 2012 -0700
----------------------------------------------------------------------
ui/scripts/network.js | 20 ++++++++++++++------
ui/scripts/ui-custom/enableStaticNAT.js | 1 +
2 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/262bbbe8/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index bb9f4f9..6699d16 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1236,12 +1236,20 @@
custom: cloudStack.uiCustom.enableStaticNAT({
// VPC
tierSelect: function(args) {
- args.response.success({
- data: [
- { id: '1', description: 'VPC 1' },
- { id: '2', description: 'VPC 2' }
- ]
- });
+ args.$tierSelect.hide(); // Hidden by default
+
+ // Determine if tiers are supported here
+ var enableTiers = false;
+
+ if (enableTiers) {
+ args.$tierSelect.show();
+ args.response.success({
+ data: [
+ { id: '1', description: 'VPC 1' },
+ { id: '2', description: 'VPC 2' }
+ ]
+ });
+ }
},
listView: $.extend(true, {}, cloudStack.sections.instances, {
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/262bbbe8/ui/scripts/ui-custom/enableStaticNAT.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/enableStaticNAT.js b/ui/scripts/ui-custom/enableStaticNAT.js
index f3fbfad..67a54e1 100644
--- a/ui/scripts/ui-custom/enableStaticNAT.js
+++ b/ui/scripts/ui-custom/enableStaticNAT.js
@@ -137,6 +137,7 @@
// Get tier data
tierSelect({
context: context,
+ $tierSelect: $tierSelect,
response: {
success: function(args) {
var data = args.data;