Skip to content

Commit

Permalink
fix(dedicated.pcc): fix order label when SAP HANA is unavailable
Browse files Browse the repository at this point in the history
ref: MANAGER-14373

Signed-off-by: David Arsène <[email protected]>
  • Loading branch information
darsene committed Nov 26, 2024
1 parent c03894f commit 92329fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ export default class VmwareVdcAddCtrl {
this.hostList = [];

this.model = { vdc: null, host: null, datastoreRequired: false };
this.manageSapHanaOrder();
}

manageSapHanaOrder() {
this.hostTypes = Object.values(HOST_TYPE).filter(
(host) => this.orderSapHana || host !== HOST_TYPE.SAPHANA,
);
this.step1DescriptionLabel = this.$translate.instant(
`dedicatedCloud_configuration_add_datacenter_step_1_description${
!this.orderSapHana ? '_no_saphana' : ''
}`,
);
}

datacentersLoad() {
Expand Down Expand Up @@ -64,21 +76,15 @@ export default class VmwareVdcAddCtrl {
this.hostsLoading = true;
return this.checkDatastore()
.then((data) => {
const hostType = { ...HOST_TYPE };
if (!this.orderSapHana) {
delete hostType.SAPHANA;
}
this.model.datastoreRequired = !data;
this.hostList = Object.values(hostType).map((host) => {
return {
name:
host !== HOST_TYPE.STANDARD
? `${this.model.vdc.vdc}_${host}`
: this.model.vdc.vdc,
range: this.model.vdc.vdc,
host,
};
});
this.hostList = this.hostTypes.map((host) => ({
name:
host !== HOST_TYPE.STANDARD
? `${this.model.vdc.vdc}_${host}`
: this.model.vdc.vdc,
range: this.model.vdc.vdc,
host,
}));
})
.catch((err) => {
return this.goBack(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<oui-step-form
data-header="{{ :: 'dedicatedCloud_configuration_add_datacenter_step_1_title' | translate }}"
data-description="{{ :: 'dedicatedCloud_configuration_add_datacenter_step_1_description' | translate }}"
data-description="{{ :: $ctrl.step1DescriptionLabel }}"
data-on-cancel="$ctrl.onCancel()"
data-cancel-text="{{ :: 'dedicatedCloud_configuration_add_datacenter_cta_cancel' | translate }}"
data-on-submit="$ctrl.hostsLoad()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"dedicatedCloud_configuration_add_datacenter_description": "Tous les virtual data centers (VDC) bénéficient du module d'observabilité Aria Operations et de la license vSphere Entreprise Plus par défaut. Les 'management fees' représentent le coût des VMs de management (par exemple votre vCenter, Aria Operations) qui sont hébergées en dehors de vos hôtes dédiés, ce qui vous permet de disposer de 100% de leurs capacités (CPU, RAM).",
"dedicatedCloud_configuration_add_datacenter_step_1_title": "Sélectionnez votre nouveau virtual Datacenter",
"dedicatedCloud_configuration_add_datacenter_step_1_description": "Ajoutez un VDC à votre infrastructure VMware. La sélection des hôtes (standard, vSAN ou SAP HANA) se fera à la prochaine étape.",
"dedicatedCloud_configuration_add_datacenter_step_1_description_no_saphana": "Ajoutez un VDC à votre infrastructure VMware. La sélection des hôtes (standard ou vSAN) se fera à la prochaine étape.",
"dedicatedCloud_configuration_add_datacenter_step_2_title": "Sélectionnez le type d'hôtes",
"dedicatedCloud_configuration_add_datacenter_step_2_description": "Ajoutez les hôtes qui composeront initialement votre VDC. Si vos besoins évoluent, vous pourrez compléter avec d'autres types d'hôtes ultérieurement.",
"dedicatedCloud_configuration_add_datacenter_cta_submit": "Ajouter un datacentre",
Expand Down

0 comments on commit 92329fe

Please sign in to comment.