diff --git a/packages/manager/modules/billing-components/src/components/cancellation-form/confirm-terminate.constants.js b/packages/manager/modules/billing-components/src/components/cancellation-form/confirm-terminate.constants.js index bd66bfcd498c..c13aa5809ce8 100644 --- a/packages/manager/modules/billing-components/src/components/cancellation-form/confirm-terminate.constants.js +++ b/packages/manager/modules/billing-components/src/components/cancellation-form/confirm-terminate.constants.js @@ -7,6 +7,7 @@ export const SERVICE_WITH_AGORA_TERMINATION = [ 'vrack-services', 'okms', 'logs-account', + 'nutanix', ]; export const SERVICE_GROUP_WITH_AGORA_TERMINATION_REGEX = /hycu-vms-*|(logs-enterprise(-hds)?$)/; diff --git a/packages/manager/modules/billing-components/src/components/services-actions/services-actions.component.js b/packages/manager/modules/billing-components/src/components/services-actions/services-actions.component.js index e65a8afb3ac0..2b9e68fb16f7 100644 --- a/packages/manager/modules/billing-components/src/components/services-actions/services-actions.component.js +++ b/packages/manager/modules/billing-components/src/components/services-actions/services-actions.component.js @@ -10,6 +10,8 @@ export default { getCancelCommitmentLink: '&?', getCancelResiliationLink: '&?', getResiliationLink: '&?', + handleGoToResiliation: '&?', + isCustomResiliationHandle: ' diff --git a/packages/manager/modules/billing-components/src/components/subscription-tile/subscription-tile.component.js b/packages/manager/modules/billing-components/src/components/subscription-tile/subscription-tile.component.js index 8c0d2b7e761e..47c6b1321a01 100644 --- a/packages/manager/modules/billing-components/src/components/subscription-tile/subscription-tile.component.js +++ b/packages/manager/modules/billing-components/src/components/subscription-tile/subscription-tile.component.js @@ -16,6 +16,8 @@ export default { commitImpressionData: ' diff --git a/packages/manager/modules/billing/src/autoRenew/actions/terminate-agora-service/component.js b/packages/manager/modules/billing/src/autoRenew/actions/terminate-agora-service/component.js index ad2344d2f2db..9675cc05da78 100644 --- a/packages/manager/modules/billing/src/autoRenew/actions/terminate-agora-service/component.js +++ b/packages/manager/modules/billing/src/autoRenew/actions/terminate-agora-service/component.js @@ -6,6 +6,7 @@ export default { goBack: '<', id: '<', serviceType: '<', + serviceName: ' { + $stateProvider.state('nutanix.dashboard.general-info.resiliate.**', { + url: '/resiliate', + lazyLoad: ($transition$) => { + const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad'); + + return import('./resiliate.module').then((mod) => + $ocLazyLoad.inject(mod.default || mod), + ); + }, + }); + }, +); + +export default moduleName; diff --git a/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.module.js b/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.module.js new file mode 100644 index 000000000000..6d53d17d0313 --- /dev/null +++ b/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.module.js @@ -0,0 +1,19 @@ +import angular from 'angular'; + +import '@uirouter/angularjs'; +import 'angular-translate'; + +import ovhManagerBillingComponents from '@ovh-ux/manager-billing-components'; +import routing from './resiliate.routing'; + +const moduleName = 'ovhManagerNutanixDashboardGeneralInfoResiliate'; + +angular + .module(moduleName, [ + 'pascalprecht.translate', + 'ui.router', + ovhManagerBillingComponents, + ]) + .config(routing); + +export default moduleName; diff --git a/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.routing.js b/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.routing.js new file mode 100644 index 000000000000..a244ce1c0ec3 --- /dev/null +++ b/packages/manager/modules/nutanix/src/dashboard/general-info/resiliate/resiliate.routing.js @@ -0,0 +1,43 @@ +import { SERVICE_TYPE } from './constant'; + +export default /* @ngInject */ ($stateProvider) => { + $stateProvider.state('nutanix.dashboard.general-info.resiliate', { + url: '/resiliate', + views: { + modal: { + component: 'billingAutorenewTerminateAgoraService', + }, + }, + params: { + serviceName: null, + }, + layout: 'modal', + resolve: { + serviceType: () => SERVICE_TYPE, + id: /* @ngInject */ (serviceInfo) => serviceInfo.serviceId, + goBack: /* @ngInject */ ($state, $timeout, Alerter, serviceName) => ( + message, + type, + ) => { + const promise = $state.go('nutanix.dashboard.general-info', { + serviceName, + }); + + if (message) { + promise.then(() => + $timeout(() => + Alerter.set( + `alert-${type}`, + message, + null, + 'nutanix-dashboard-alert', + ), + ), + ); + } + + return promise; + }, + }, + }); +}; diff --git a/packages/manager/modules/nutanix/src/dashboard/general-info/routing.js b/packages/manager/modules/nutanix/src/dashboard/general-info/routing.js index 31d16c400c7f..1c4bc2c29ced 100644 --- a/packages/manager/modules/nutanix/src/dashboard/general-info/routing.js +++ b/packages/manager/modules/nutanix/src/dashboard/general-info/routing.js @@ -55,6 +55,10 @@ export default /* @ngInject */ ($stateProvider) => { ), goToRedeploy: /* @ngInject */ ($state) => () => $state.go('nutanix.dashboard.general-info.redeploy'), + goToResiliate: /* @ngInject */ ($state) => (serviceName) => + $state.go('nutanix.dashboard.general-info.resiliate', { + serviceName, + }), breadcrumb: /* @ngInject */ ($translate) => $translate.instant('nutanix_dashboard_general_info'), isPackTypeAvailable: /* @ngInject */ (ovhFeatureFlipping) => diff --git a/packages/manager/modules/nutanix/src/dashboard/general-info/template.html b/packages/manager/modules/nutanix/src/dashboard/general-info/template.html index 5c26c669c24d..d4b28b9f1ead 100644 --- a/packages/manager/modules/nutanix/src/dashboard/general-info/template.html +++ b/packages/manager/modules/nutanix/src/dashboard/general-info/template.html @@ -1,3 +1,4 @@ +
@@ -247,10 +248,11 @@ go-to-commit="$ctrl.goToCommit()" go-to-cancel-commit="$ctrl.goToCancelCommit()" go-to-cancel-resiliation="$ctrl.goToCancelResiliation()" - go-to-resiliation="$ctrl.goToResiliation()" service-infos="$ctrl.serviceInfo" user="$ctrl.user" tracking-prefix="{{ ::$ctrl.trackingPrefix }}" + is-custom-resiliation-handle="true" + handle-go-to-resiliation="$ctrl.goToResiliate($ctrl.serviceName)" > diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_de_DE.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_de_DE.json index b8a135603c98..b2268df9f79c 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_de_DE.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_de_DE.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Anleitungen", "nutanix_dashboard_guides_header_all_guides": "Alle Anleitungen", "nutanix_dashboard_cluster_warning1": "Ihre Nutanix-Lizenz muss vor dem [{{endDate}}] auf Ihrem Cluster in Prism Central registriert werden.", - "nutanix_dashboard_cluster_warning2": "Registrieren Sie Ihre Lizenz" + "nutanix_dashboard_cluster_warning2": "Registrieren Sie Ihre Lizenz", + "nutanix_dashboard_service_suspended": "Der Dienst wurde gekündigt." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_en_GB.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_en_GB.json index 280930eb5cbd..f3bcecfbf5dc 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_en_GB.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_en_GB.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Guides", "nutanix_dashboard_guides_header_all_guides": "All guides", "nutanix_dashboard_cluster_warning1": "You must register your Nutanix licence on your cluster in Prism Central before [{{endDate}}]", - "nutanix_dashboard_cluster_warning2": "Register your licence" + "nutanix_dashboard_cluster_warning2": "Register your licence", + "nutanix_dashboard_service_suspended": "The service has been cancelled." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_es_ES.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_es_ES.json index a9d20aa01796..1382e103f76c 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_es_ES.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_es_ES.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Guías", "nutanix_dashboard_guides_header_all_guides": "Todas las guías", "nutanix_dashboard_cluster_warning1": "Debe registrar su licencia Nutanix en su cluster en Prism Central antes del [{{endDate}}].", - "nutanix_dashboard_cluster_warning2": "Registre su licencia" + "nutanix_dashboard_cluster_warning2": "Registre su licencia", + "nutanix_dashboard_service_suspended": "El servicio se ha dado de baja." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_fr_CA.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_fr_CA.json index 8740d0bc844f..b559f616c93c 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_fr_CA.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_fr_CA.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Guides", "nutanix_dashboard_guides_header_all_guides": "Tous les guides", "nutanix_dashboard_cluster_warning1": "Vous devez enregistrer votre licence Nutanix sur votre cluster dans Prism Central avant le [{{endDate}}]", - "nutanix_dashboard_cluster_warning2": "Enregistrez votre licence" + "nutanix_dashboard_cluster_warning2": "Enregistrez votre licence", + "nutanix_dashboard_service_suspended": "Le service a été résilié." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_it_IT.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_it_IT.json index 0b3430de092f..41bb236052a1 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_it_IT.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_it_IT.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Guide", "nutanix_dashboard_guides_header_all_guides": "Tutte le guide", "nutanix_dashboard_cluster_warning1": "Registra la tua licenza Nutanix sul tuo cluster in Prism Central prima del [{{endDate}}]", - "nutanix_dashboard_cluster_warning2": "Registra la tua licenza" + "nutanix_dashboard_cluster_warning2": "Registra la tua licenza", + "nutanix_dashboard_service_suspended": "Il servizio è stato disattivato." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pl_PL.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pl_PL.json index df0d592a3bcf..8e1953fadfac 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pl_PL.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pl_PL.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Przewodniki", "nutanix_dashboard_guides_header_all_guides": "Wszystkie przewodniki", "nutanix_dashboard_cluster_warning1": "Należy zarejestrować licencję Nutanix na klastrze w Prism Central przed [{{endDate}}]", - "nutanix_dashboard_cluster_warning2": "Zarejestruj licencję" + "nutanix_dashboard_cluster_warning2": "Zarejestruj licencję", + "nutanix_dashboard_service_suspended": "Usługa została zakończona." } diff --git a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pt_PT.json b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pt_PT.json index 15d155aba7cd..7ac08086157f 100644 --- a/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pt_PT.json +++ b/packages/manager/modules/nutanix/src/dashboard/translations/Messages_pt_PT.json @@ -4,5 +4,6 @@ "nutanix_dashboard_guides_header": "Manuais", "nutanix_dashboard_guides_header_all_guides": "Todos os manuais", "nutanix_dashboard_cluster_warning1": "Deve registar a licença Nutanix no seu cluster em Prism Central antes de [{{endDate}}]", - "nutanix_dashboard_cluster_warning2": "Registe a sua licença" + "nutanix_dashboard_cluster_warning2": "Registe a sua licença", + "nutanix_dashboard_service_suspended": "O serviço foi rescindido." }