Skip to content

Commit 7e591a4

Browse files
committed
CS-15811: Network offering: filter by VPC supported services
Introduce a new checkbox which indicates that this service offering is for VPC networks. If enabled, then only show the VpcVirtualRouter option for all supported services. If disabled, then disable the VpcVirtualRouter options reviewed-by: jessica
1 parent fbdc7fc commit 7e591a4

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

‎ui/scripts/configuration.js‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,28 @@
12691269
}
12701270
},
12711271

1272-
specifyVlan: { label: 'label.specify.vlan', isBoolean: true },
1272+
specifyVlan: { label: 'label.specify.vlan', isBoolean: true },
1273+
1274+
useVpc: {
1275+
label: 'VPC',
1276+
isBoolean: true,
1277+
onChange: function(args) {
1278+
var $checkbox = args.$checkbox;
1279+
var $selects = $checkbox.closest('form').find('.dynamic-input select');
1280+
var $vpcOptions = $selects.find('option[value=VpcVirtualRouter]');
1281+
1282+
if ($checkbox.is(':checked')) {
1283+
$vpcOptions.siblings().attr('disabled', true);
1284+
$selects.val('VpcVirtualRouter');
1285+
} else {
1286+
$vpcOptions.siblings().attr('disabled', false);
1287+
$vpcOptions.attr('disabled', true);
1288+
$selects.each(function() {
1289+
$(this).val($(this).find('option:first'));
1290+
});
1291+
}
1292+
}
1293+
},
12731294

12741295
supportedServices: {
12751296
label: 'label.supported.services',

0 commit comments

Comments
 (0)