diff --git a/deploy-board/deploy_board/templates/configs/new_capacity.html b/deploy-board/deploy_board/templates/configs/new_capacity.html
index 40e4913841..0273cdb71b 100644
--- a/deploy-board/deploy_board/templates/configs/new_capacity.html
+++ b/deploy-board/deploy_board/templates/configs/new_capacity.html
@@ -61,7 +61,8 @@
Basic Settings
This is for CMP docker with cpu architecture x86_64 only hosts. For other types, please click the Advanced Settings on the left.
-
+
@@ -103,6 +104,7 @@ Basic Settings
var placements = getDefaultPlacement(capacityCreationInfo);
var hostTypes = getDefaultHostType(capacityCreationInfo.hostTypes, capacityCreationInfo.defaultHostType, capacityCreationInfo.defaultARMHostType);
+const disableBackupInstanceTypes = `{{ disable_backup_instance_types}}`;
var capacitySetting = new Vue({
el:"#capacityPanel",
@@ -138,6 +140,9 @@ Basic Settings
}
}),
showStatefulHelp: false,
+ disableBackupInstanceTypes,
+ enableMultipleHostTypes: false,
+ backupHosttypes: "None",
},
methods:{
validateInput: function(clusterInfo){
@@ -202,6 +207,7 @@ Basic Settings
clusterInfo['hostType'] = this.selectedHostTypeValue;
clusterInfo['securityZone'] = this.selectedSecurityZoneValue;
clusterInfo['statefulStatus'] = this.selectedStatefulStatus;
+ clusterInfo['enableMultipleHostTypes'] = this.enableMultipleHostTypes;
if (this.selectedPlacements != null){
clusterInfo['placement'] = this.selectedPlacements.join(',');
}
@@ -244,6 +250,10 @@ Basic Settings
this.assignPublicIP = assignPublicIP;
this.placements = placements.getSimpleList(assignPublicIP, null);
},
+ selecttypes: function(value){
+ this.enableMultipleHostTypes = value;
+ this.backupHosttypes = getBackupIds(capacityCreationInfo.hostTypesMapping, capacityCreationInfo.hostTypes, capacitySetting.selectedHostTypeValue, this.enableMultipleHostTypes);
+ },
updateAwsRole: function(value){
this.awsRole = value
},
@@ -279,7 +289,9 @@ Basic Settings
$('.single-select-search').chosen({
"width": "100%"
}).change(function() {
- capacitySetting.selectedHostTypeValue = $('.single-select-search').val()
+ capacitySetting.selectedHostTypeValue = $('.single-select-search').val();
+ capacitySetting.backupHosttypes = "None";
+ capacitySetting.enableMultipleHostTypes = false;
});
$(".chosen-select").chosen({
diff --git a/deploy-board/deploy_board/templates/configs/new_capacity_adv.html b/deploy-board/deploy_board/templates/configs/new_capacity_adv.html
index 0f13a8d25b..db5a74eff5 100644
--- a/deploy-board/deploy_board/templates/configs/new_capacity_adv.html
+++ b/deploy-board/deploy_board/templates/configs/new_capacity_adv.html
@@ -56,7 +56,7 @@ Capacity
+ showhelp="true" v-on:helpclick="hostTypeHelpClick" v-bind:disablebackupinstancetypes="disableBackupInstanceTypes" v-bind:enablemultiplehosttypes="enableMultipleHostTypes" v-on:enablemultiplehosttypesclick="selecttypes">
@@ -123,6 +123,7 @@ Capacity
const hieraPaths = `{{ puppet_hiera_paths }}`;
const puppetRepository = `{{ puppet_repository }}`;
const deployServiceWikiUrl = `{{ conflicting_deploy_service_wiki_url }}`;
+const disableBackupInstanceTypes = `{{ disable_backup_instance_types}}`;
var capacitySetting = new Vue({
el: "#mainPanel",
@@ -220,6 +221,9 @@ Capacity
hieraPaths,
puppetRepository,
deployServiceWikiUrl,
+ disableBackupInstanceTypes,
+ enableMultipleHostTypes: false,
+ backupHosttypes: "None",
},
methods: {
addConfig: function (config) {
@@ -417,6 +421,8 @@ Capacity
capacitySetting.hostTypeOptions = hostTypes.getOptions();
capacitySetting.selectedHostTypeValue = hostTypes.getSelectedId();
capacityCreationInfo.hostTypes = data;
+ capacitySetting.enableMultipleHostTypes = false;
+ capacitySetting.backupHosttypes = "None";
//Schedule this to nextTick that calls after next DOM refresh
//as JQuery chosen call must happen after DOM updates finished
Vue.nextTick(function(){
@@ -499,6 +505,10 @@ Capacity
this.assignPublicIP = assignPublicIP
this.placements = placements.getFullList(assignPublicIP, null)
},
+ selecttypes: function(value){
+ this.enableMultipleHostTypes = value;
+ this.backupHosttypes = getBackupIds(info.hostTypesMapping, capacityCreationInfo.hostTypes, capacitySetting.selectedHostTypeValue, this.enableMultipleHostTypes);
+ },
validateInput: function (clusterInfo) {
//Validate input data.
var count = clusterInfo['capacity'];
@@ -613,6 +623,7 @@ Capacity
clusterInfo['replacementTimeout'] = this.replacementTimeout;
clusterInfo['statefulStatus'] = this.selectedStatefulStatus;
clusterInfo['accountId'] = this.currentAccountId;
+ clusterInfo['enableMultipleHostTypes'] = this.enableMultipleHostTypes;
if (this.selectedPlacements != null && this.selectedPlacements.length>0){
clusterInfo['placement'] = this.selectedPlacements.join(',');
}
@@ -712,7 +723,9 @@ Capacity
$('.single-select-search').chosen({
"width": "100%"
}).change(function() {
- capacitySetting.selectedHostTypeValue = $('.single-select-search').val()
+ capacitySetting.selectedHostTypeValue = $('.single-select-search').val();
+ capacitySetting.backupHosttypes = "None";
+ capacitySetting.enableMultipleHostTypes = false;
});
$(".chosen-select").chosen({ "width": "100%" })
diff --git a/deploy-board/deploy_board/webapp/cluster_view.py b/deploy-board/deploy_board/webapp/cluster_view.py
index df01bcf79b..4450899d6e 100644
--- a/deploy-board/deploy_board/webapp/cluster_view.py
+++ b/deploy-board/deploy_board/webapp/cluster_view.py
@@ -48,7 +48,7 @@ def get(self, request, name, stage):
request, DEFAULT_ARCH)
for host_type in host_types:
host_type['mem'] = float(host_type['mem']) / 1024
-
+ host_types_mapping = hosttypesmapping_helper.get_fulllist(request)
security_zones = securityzones_helper.get_by_provider_and_cell_name(
request, None, DEFAULT_PROVIDER, DEFAULT_CELL)
placements = placements_helper.get_by_provider_and_cell_name(
@@ -59,6 +59,7 @@ def get(self, request, name, stage):
capacity_creation_info = {
'environment': env,
'hostTypes': host_types,
+ 'hostTypesMapping': host_types_mapping,
'securityZones': security_zones,
'placements': placements,
'baseImages': default_base_image,
@@ -137,7 +138,7 @@ def get(self, request, name, stage):
request, DEFAULT_ARCH)
for host_type in host_types:
host_type['mem'] = float(host_type['mem']) / 1024
-
+ host_types_mapping = hosttypesmapping_helper.get_fulllist(request)
security_zones = securityzones_helper.get_by_provider_and_cell_name(
request, None, DEFAULT_PROVIDER, DEFAULT_CELL)
placements = placements_helper.get_by_provider_and_cell_name(
@@ -157,6 +158,7 @@ def get(self, request, name, stage):
capacity_creation_info = {
'environment': env,
'hostTypes': host_types,
+ 'hostTypesMapping': host_types_mapping,
'securityZones': security_zones,
'placements': placements,
'cells': cells,