Skip to content

Commit

Permalink
fixup! feat(nutanix): add nutanix node popin
Browse files Browse the repository at this point in the history
  • Loading branch information
tibs245 committed Dec 18, 2024
1 parent 62904d4 commit 32e4637
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,26 @@ export default class {
return `${this.expressOrderLink}?products=${expressOrderParams}`;
}

generateSuccessMessage() {
const successMessage = this.$translate.instant(
'nutanix_dashboard_add_nodes_success_banner',
);
const helpLinkLabel = this.$translate.instant(
'nutanix_dashboard_add_nodes_success_banner_link_label',
);
const orderExpressLink = this.generateOrderExpressLink();

return `${successMessage}<a href="${orderExpressLink}" target="_blank" rel="nooponer">${helpLinkLabel}</a>`;
}

onSubmit() {
if (this.cancelSubscriptionForm.$invalid) {
return;
}

this.openExpressOrderTab();

this.handleSuccess(
`${this.$translate.instant(
'nutanix_dashboard_add_nodes_success_banner',
)}<a href="${this.generateOrderExpressLink()}" target="_blank" rel="nooponer">${this.$translate.instant(
'nutanix_dashboard_add_nodes_success_banner_link_label',
)}</a>`,
);
this.handleSuccess(this.generateSuccessMessage());
}

openExpressOrderTab() {
Expand Down

0 comments on commit 32e4637

Please sign in to comment.