From 32e463721b44cacfbae64ad7d4402a7ab9684845 Mon Sep 17 00:00:00 2001 From: Thibault Barske Date: Wed, 18 Dec 2024 15:51:19 +0100 Subject: [PATCH] fixup! feat(nutanix): add nutanix node popin --- .../component/add-nodes-modal/controller.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/manager/modules/nutanix/src/dashboard/component/add-nodes-modal/controller.js b/packages/manager/modules/nutanix/src/dashboard/component/add-nodes-modal/controller.js index 834be3fa75b6..cda3da1ef3f8 100644 --- a/packages/manager/modules/nutanix/src/dashboard/component/add-nodes-modal/controller.js +++ b/packages/manager/modules/nutanix/src/dashboard/component/add-nodes-modal/controller.js @@ -43,6 +43,18 @@ 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}${helpLinkLabel}`; + } + onSubmit() { if (this.cancelSubscriptionForm.$invalid) { return; @@ -50,13 +62,7 @@ export default class { this.openExpressOrderTab(); - this.handleSuccess( - `${this.$translate.instant( - 'nutanix_dashboard_add_nodes_success_banner', - )}${this.$translate.instant( - 'nutanix_dashboard_add_nodes_success_banner_link_label', - )}`, - ); + this.handleSuccess(this.generateSuccessMessage()); } openExpressOrderTab() {