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
This commit is contained in:
Brian Federle 2012-08-27 15:20:03 -07:00
parent fbdc7fc59f
commit 7e591a442d
1 changed files with 22 additions and 1 deletions

View File

@ -1269,7 +1269,28 @@
}
},
specifyVlan: { label: 'label.specify.vlan', isBoolean: true },
specifyVlan: { label: 'label.specify.vlan', isBoolean: true },
useVpc: {
label: 'VPC',
isBoolean: true,
onChange: function(args) {
var $checkbox = args.$checkbox;
var $selects = $checkbox.closest('form').find('.dynamic-input select');
var $vpcOptions = $selects.find('option[value=VpcVirtualRouter]');
if ($checkbox.is(':checked')) {
$vpcOptions.siblings().attr('disabled', true);
$selects.val('VpcVirtualRouter');
} else {
$vpcOptions.siblings().attr('disabled', false);
$vpcOptions.attr('disabled', true);
$selects.each(function() {
$(this).val($(this).find('option:first'));
});
}
}
},
supportedServices: {
label: 'label.supported.services',