Skip to content

Commit 262bbbe

Browse files
committed
Add block to show/hide tier select
-- Hidden by default, needs real conditional code
1 parent 9f09381 commit 262bbbe

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

‎ui/scripts/network.js‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,12 +1236,20 @@
12361236
custom: cloudStack.uiCustom.enableStaticNAT({
12371237
// VPC
12381238
tierSelect: function(args) {
1239-
args.response.success({
1240-
data: [
1241-
{ id: '1', description: 'VPC 1' },
1242-
{ id: '2', description: 'VPC 2' }
1243-
]
1244-
});
1239+
args.$tierSelect.hide(); // Hidden by default
1240+
1241+
// Determine if tiers are supported here
1242+
var enableTiers = false;
1243+
1244+
if (enableTiers) {
1245+
args.$tierSelect.show();
1246+
args.response.success({
1247+
data: [
1248+
{ id: '1', description: 'VPC 1' },
1249+
{ id: '2', description: 'VPC 2' }
1250+
]
1251+
});
1252+
}
12451253
},
12461254

12471255
listView: $.extend(true, {}, cloudStack.sections.instances, {

‎ui/scripts/ui-custom/enableStaticNAT.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
// Get tier data
138138
tierSelect({
139139
context: context,
140+
$tierSelect: $tierSelect,
140141
response: {
141142
success: function(args) {
142143
var data = args.data;

0 commit comments

Comments
 (0)