Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/terminate nutatix cluster #14157

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)?$)/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const SERVICE_TYPE = {
VRACK_SERVICES: 'VRACK_SERVICES_RESOURCE',
VRACK: 'VRACK',
VMWARE_CLOUD_DIRECTOR_ORGANIZATION: 'VMWARE_CLOUD_DIRECTOR_ORGANIZATION',
NUTANIX: 'NUTANIX',
};

export const RENEW_URL = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export default {
getCancelCommitmentLink: '&?',
getCancelResiliationLink: '&?',
getResiliationLink: '&?',
handleGoToResiliation: '&?',
isCustomResiliationHandle: '<?',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export default class ServicesActionsCtrl {

this.SERVICE_TYPE = SERVICE_TYPE;
this.isLoading = true;
this.billingManagementAvailabilityAndHaveAutorenewLink = false;
}

$onInit() {
const fetchAutoRenewLink = this.$q.defer();
if (!this.billingManagementAvailability) {
fetchAutoRenewLink.resolve(null);
} else if (this.$injector.has('shellClient')) {

if (this.$injector.has('shellClient')) {
this.$injector
.get('shellClient')
.navigation.getURL('dedicated', '#/billing/autorenew')
Expand All @@ -36,6 +36,8 @@ export default class ServicesActionsCtrl {
}
return fetchAutoRenewLink.promise.then((link) => {
this.autorenewLink = link;
this.billingManagementAvailabilityAndHaveAutorenewLink =
this.billingManagementAvailability && !!this.autorenewLink;
this.isLoading = false;
if (this.service.SERVICE_TYPE !== this.SERVICE_TYPE.VRACK) {
this.initLinks();
Expand Down Expand Up @@ -123,7 +125,7 @@ export default class ServicesActionsCtrl {
default:
this.resiliateLink = this.service.canResiliateByEndRule()
? resiliationByEndRuleLink
: this.autorenewLink &&
: this.billingManagementAvailabilityAndHaveAutorenewLink &&
`${this.autorenewLink}/delete?serviceId=${this.service.serviceId}${serviceTypeParam}`;
break;
}
Expand Down Expand Up @@ -162,4 +164,12 @@ export default class ServicesActionsCtrl {
this.atInternet.trackClick({ name, type: 'action' });
}
}

handleClickResiliate() {
this.trackAction('go-to-resiliate');

if (this.handleGoToResiliation) {
this.handleGoToResiliation();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
aria-label="{{:: 'billing_services_actions_menu_label' | translate }}"
compact
data-placement="end"
data-ng-if="!$ctrl.isLoading && ($ctrl.autorenewLink || $ctrl.service.canBeEngaged || $ctrl.service.hasPendingEngagement)"
data-ng-if="!$ctrl.isLoading && (($ctrl.billingManagementAvailabilityAndHaveAutorenewLink && $ctrl.service.serviceType !== $ctrl.SERVICE_TYPE.NUTANIX) || ($ctrl.service.serviceType === $ctrl.SERVICE_TYPE.NUTANIX && $ctrl.service.status === 'ok') || $ctrl.service.canBeEngaged || $ctrl.service.hasPendingEngagement)"
>
<oui-action-menu-item
ng-if="$ctrl.autorenewLink && $ctrl.service.hasDebt() && !$ctrl.service.hasBillingRights($ctrl.user.nichandle)"
Expand All @@ -25,7 +25,7 @@
</oui-action-menu-item>

<div
data-ng-if=":: $ctrl.autorenewLink && !$ctrl.service.hasParticularRenew() && !$ctrl.service.hasPendingResiliation() && !$ctrl.service.hasDebt()"
data-ng-if=":: $ctrl.billingManagementAvailabilityAndHaveAutorenewLink && !$ctrl.service.hasParticularRenew() && !$ctrl.service.hasPendingResiliation() && !$ctrl.service.hasDebt()"
>
<!-- Service in autorenew -->
<oui-action-menu-item
Expand Down Expand Up @@ -139,9 +139,9 @@
data-ng-if="$ctrl.canResiliate() && (!$ctrl.service.shouldDeleteAtExpiration() || !$ctrl.service.isResiliated()) && !$ctrl.service.hasDebt() && !$ctrl.service.hasPendingResiliation()"
>
<oui-action-menu-item
ng-if="$ctrl.resiliateLink && ($ctrl.service.hasAdminRights($ctrl.user.auth.account) || $ctrl.service.hasAdminRights($ctrl.user.nichandle))"
href="{{:: $ctrl.resiliateLink }}"
on-click="$ctrl.trackAction('go-to-resiliate')"
ng-if="($ctrl.resiliateLink || $ctrl.isCustomResiliationHandle) && ($ctrl.service.hasAdminRights($ctrl.user.auth.account) || $ctrl.service.hasAdminRights($ctrl.user.nichandle))"
href="{{:: $ctrl.isCustomResiliationHandle === true ? undefined : $ctrl.resiliateLink }}"
on-click="$ctrl.handleClickResiliate()"
data-navi-id="go-to-resiliate"
top
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default {
commitImpressionData: '<?',
withContactManagement: '<?',
disableServiceActions: '<?',
isCustomResiliationHandle: '<?',
handleGoToResiliation: '&?',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
get-cancel-resiliation-link="$ctrl.goToCancelResiliation()"
get-resiliation-link="$ctrl.goToResiliation()"
billing-management-availability="$ctrl.featuresAvailability.isFeatureAvailable('billing:management')"
is-custom-resiliation-handle="$ctrl.isCustomResiliationHandle"
handle-go-to-resiliation="$ctrl.handleGoToResiliation()"
>
</billing-services-actions>
</oui-tile-actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
goBack: '<',
id: '<',
serviceType: '<',
serviceName: '<?',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<oui-message data-type="warning" class="mb-2">
<span
data-translate="{{:: 'autorenew_agora_terminate_service_warning_' + $ctrl.serviceType}}"
data-translate-values="{ 'serviceName': $ctrl.serviceName }"
></span>
</oui-message>
<oui-field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"autorenew_agora_terminate_service_warning_OKMS_RESOURCE": "Bitte bestätigen Sie die Kündigung Ihres KMS",
"autorenew_agora_terminate_service_success_OKMS_RESOURCE": "Ihre Anfrage zur Kündigung Ihres KMS wurde registriert. Eine E-Mail mit weiteren Informationen wurde an Sie versandt.",
"autorenew_agora_terminate_service_error_OKMS_RESOURCE": "Bei der Anfrage zur Kündigung Ihres KMS ist ein Fehler aufgetreten. {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Geben Sie „TERMINATE“ in das unten stehende Feld ein, um zu bestätigen",
"autorenew_agora_terminate_service_confirm_input": "Geben Sie im folgenden Feld „TERMINATE\" ein, um den Vorgang zu bestätigen.",
"autorenew_agora_terminate_service_DBAAS_LOGS": "Meine LDP kündigen",
"autorenew_agora_terminate_service_warning_DBAAS_LOGS": "Bitte bestätigen Sie die Kündigung Ihrer LDP.",
"autorenew_agora_terminate_service_success_DBAAS_LOGS": "Ihre Anfrage zur Kündigung Ihrer LDP wurde registriert. Eine E-Mail mit weiteren Informationen zur Vorgehensweise wurde soeben an Sie versandt.",
Expand All @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_VMWARE_CLOUD_DIRECTOR_BACKUP": "Managed Veeam for VCD kündigen",
"autorenew_agora_terminate_service_warning_VMWARE_CLOUD_DIRECTOR_BACKUP": "Bitte bestätigen Sie die Kündigung von Managed Veeam for VCD.",
"autorenew_agora_terminate_service_success_VMWARE_CLOUD_DIRECTOR_BACKUP": "Ihre Kündigungsanfrage für Managed Veeam for VCD wurde registriert. Eine E-Mail mit weiteren Informationen zur Vorgehensweise wurde soeben an Sie versandt.",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Bei der Kündigungsanfrage für Managed Veeam for VCD ist ein Fehler aufgetreten. {{error}}"
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Bei der Kündigungsanfrage für Managed Veeam for VCD ist ein Fehler aufgetreten. {{error}}",
"autorenew_agora_terminate_service_NUTANIX": "Den Nutanix on OVHcloud Dienst kündigen",
"autorenew_agora_terminate_service_warning_NUTANIX": "Bitte bestätigen Sie die Kündigung Ihres Nutanix on OVHcloud „{{serviceName}}“.",
"autorenew_agora_terminate_service_success_NUTANIX": "Ihre Kündigungsanfrage für Nutanix wurde registriert. Eine E-Mail mit weiteren Informationen zur Vorgehensweise wurde soeben an Sie versandt.",
"autorenew_agora_terminate_service_error_NUTANIX": "Bei der Anfrage zur Kündigung Ihres Nutanix ist ein Fehler aufgetreten. {{error}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"autorenew_agora_terminate_service_warning_OKMS_RESOURCE": "Please confirm the cancelation of your KMS",
"autorenew_agora_terminate_service_success_OKMS_RESOURCE": "Your KMS cancelation request has been processed. You have been sent an email detailing the procedure to follow.",
"autorenew_agora_terminate_service_error_OKMS_RESOURCE": "An error has occurred requesting to terminate your KMS. {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Enter \"TERMINATE\" in the field below to confirm",
"autorenew_agora_terminate_service_confirm_input": "Enter TERMINATE in the field below to confirm",
"autorenew_agora_terminate_service_DBAAS_LOGS": "Cancel my LDP",
"autorenew_agora_terminate_service_warning_DBAAS_LOGS": "Please confirm the cancellation of your LDP",
"autorenew_agora_terminate_service_success_DBAAS_LOGS": "Your LDP cancellation request has been submitted. You have been sent an email detailing the procedure to follow.",
Expand All @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_VMWARE_CLOUD_DIRECTOR_BACKUP": "Cancel Managed Veeam for VCD",
"autorenew_agora_terminate_service_warning_VMWARE_CLOUD_DIRECTOR_BACKUP": "Please confirm that you wish to cancel Managed Veeam for VCD",
"autorenew_agora_terminate_service_success_VMWARE_CLOUD_DIRECTOR_BACKUP": "Your request to cancel Managed Veeam for VCD has been submitted. You have been sent an email detailing the procedure to follow.",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "An error has occurred submitting the request to cancel Managed Veeam for VCD. {{error}}"
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "An error has occurred submitting the request to cancel Managed Veeam for VCD. {{error}}",
"autorenew_agora_terminate_service_NUTANIX": "Cancel Nutanix on OVHcloud service",
"autorenew_agora_terminate_service_warning_NUTANIX": "Please confirm the cancellation of your “{{serviceName}}” Nutanix on OVHcloud",
"autorenew_agora_terminate_service_success_NUTANIX": "Your Nutanix cancellation request has been submitted. You have been sent an email detailing the steps to follow.",
"autorenew_agora_terminate_service_error_NUTANIX": "An error has occurred submitting your Nutanix service cancellation request. {{error}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"autorenew_agora_terminate_service_warning_OKMS_RESOURCE": "Confirme la baja de su KMS",
"autorenew_agora_terminate_service_success_OKMS_RESOURCE": "La solicitud de baja de su KMS se ha enviado. Le hemos enviado el procedimiento por correo electrónico.",
"autorenew_agora_terminate_service_error_OKMS_RESOURCE": "Se ha producido un error al solicitar la baja del KMS. {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Introduzca «TERMINATE» en el siguiente campo para confirmar la operación",
"autorenew_agora_terminate_service_confirm_input": "Introduzca «TERMINATE» en el siguiente campo para confirmar la operación.",
"autorenew_agora_terminate_service_DBAAS_LOGS": "Dar de baja mi LDP",
"autorenew_agora_terminate_service_warning_DBAAS_LOGS": "Por favor, confirme la baja de su LDP.",
"autorenew_agora_terminate_service_success_DBAAS_LOGS": "La solicitud de baja de su LDP se ha enviado correctamente. Le hemos enviado un mensaje de correo electrónico con el procedimiento que debe seguir.",
Expand All @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_VMWARE_CLOUD_DIRECTOR_BACKUP": "Dar de baja Managed Veeam for VCD",
"autorenew_agora_terminate_service_warning_VMWARE_CLOUD_DIRECTOR_BACKUP": "Por favor, confirme la baja de Managed Veeam for VCD",
"autorenew_agora_terminate_service_success_VMWARE_CLOUD_DIRECTOR_BACKUP": "La solicitud de baja de Managed Veeam for VCD se ha enviado correctamente. Le hemos enviado un mensaje de correo electrónico con el procedimiento que debe seguir.",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Se ha producido un error al solicitar la baja de Managed Veeam for VCD. {{error}}"
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Se ha producido un error al solicitar la baja de Managed Veeam for VCD. {{error}}",
"autorenew_agora_terminate_service_NUTANIX": "Dar de baja el servicio Nutanix on OVHcloud",
"autorenew_agora_terminate_service_warning_NUTANIX": "Por favor, confirme la baja de su servicio Nutanix on OVHcloud «{{serviceName}}».",
"autorenew_agora_terminate_service_success_NUTANIX": "La solicitud de baja de su servicio Nutanix se ha enviado correctamente. Le hemos enviado un mensaje de correo electrónico con el procedimiento que debe seguir.",
"autorenew_agora_terminate_service_error_NUTANIX": "Se ha producido un error al solicitar la baja de su servicio Nutanix. {{error}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_error_DBAAS_LOGS": "Une erreur est survenue lors de la demande de résiliation de votre LDP. {{error}}",
"autorenew_agora_terminate_service_error_VRACK_SERVICES_RESOURCE": "Une erreur est survenue lors de la demande de résiliation de vRack Services. {{error}}",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Une erreur est survenue lors de la demande de résiliation de Managed Veeam for VCD. {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer"
"autorenew_agora_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer",
"autorenew_agora_terminate_service_NUTANIX": "Résilier le service Nutanix on OVHcloud",
"autorenew_agora_terminate_service_warning_NUTANIX": "Veuillez confirmer la résiliation de votre Nutanix on OVHcloud \"{{serviceName}}\"",
"autorenew_agora_terminate_service_success_NUTANIX": "Votre demande de résiliation de votre Nutanix a été prise en compte. Un e-mail contenant la procédure vous a été envoyé.",
"autorenew_agora_terminate_service_error_NUTANIX": "Une erreur est survenue lors de la demande de résiliation de votre Nutanix. {{error}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_error_DBAAS_LOGS": "Une erreur est survenue lors de la demande de résiliation de votre LDP. {{error}}",
"autorenew_agora_terminate_service_error_VRACK_SERVICES_RESOURCE": "Une erreur est survenue lors de la demande de résiliation de vRack Services. {{error}}",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Une erreur est survenue lors de la demande de résiliation de Managed Veeam for VCD. {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer"
"autorenew_agora_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer",
"autorenew_agora_terminate_service_NUTANIX": "Résilier le service Nutanix on OVHcloud",
"autorenew_agora_terminate_service_warning_NUTANIX": "Veuillez confirmer la résiliation de votre Nutanix on OVHcloud \"{{serviceName}}\"",
"autorenew_agora_terminate_service_success_NUTANIX": "Votre demande de résiliation de votre Nutanix a été prise en compte. Un e-mail contenant la procédure vous a été envoyé.",
"autorenew_agora_terminate_service_error_NUTANIX": "Une erreur est survenue lors de la demande de résiliation de votre Nutanix. {{error}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"autorenew_agora_terminate_service_warning_OKMS_RESOURCE": "Conferma la disattivazione del KMS",
"autorenew_agora_terminate_service_success_OKMS_RESOURCE": "La richiesta di disattivazione del KMS è stata presa in carico. Ti abbiamo inviato un’email con la procedura da seguire.",
"autorenew_agora_terminate_service_error_OKMS_RESOURCE": "Si è verificato un errore durante la richiesta di disattivazione del KMS: {{error}}",
"autorenew_agora_terminate_service_confirm_input": "Inserisci \"TERMINATE\" nel campo qui sotto per confermare",
"autorenew_agora_terminate_service_confirm_input": "Inserisci \"TERMINATE\" nel campo qui sotto per confermare l’operazione",
"autorenew_agora_terminate_service_DBAAS_LOGS": "Disattivare il mio LDP",
"autorenew_agora_terminate_service_warning_DBAAS_LOGS": "Conferma la disattivazione del tuo LDP",
"autorenew_agora_terminate_service_success_DBAAS_LOGS": "La tua richiesta di disattivazione del LDP è stata presa in carico. Ti abbiamo inviato un’email con la procedura da seguire.",
Expand All @@ -19,5 +19,9 @@
"autorenew_agora_terminate_service_VMWARE_CLOUD_DIRECTOR_BACKUP": "Disattivare Managed Veeam for VCD",
"autorenew_agora_terminate_service_warning_VMWARE_CLOUD_DIRECTOR_BACKUP": "Conferma la disattivazione di Managed Veeam for VCD",
"autorenew_agora_terminate_service_success_VMWARE_CLOUD_DIRECTOR_BACKUP": "La tua richiesta di disattivazione di Managed Veeam for VCD è stata presa in carico. Ti abbiamo inviato un’email con la procedura da seguire.",
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Si è verificato un errore durante la richiesta di disattivazione di Managed Veeam for VCD: {{error}}"
"autorenew_agora_terminate_service_error_VMWARE_CLOUD_DIRECTOR_BACKUP": "Si è verificato un errore durante la richiesta di disattivazione di Managed Veeam for VCD: {{error}}",
"autorenew_agora_terminate_service_NUTANIX": "Disattivare il servizio Nutanix on OVHcloud",
"autorenew_agora_terminate_service_warning_NUTANIX": "Conferma la disattivazione del tuo Nutanix on OVHcloud \"{{serviceName}}\"",
"autorenew_agora_terminate_service_success_NUTANIX": "La tua richiesta di disattivazione di Nutanix è stata presa in carico. Ti abbiamo inviato un’email con la procedura da seguire.",
"autorenew_agora_terminate_service_error_NUTANIX": "Si è verificato un errore durante la richiesta di disattivazione del tuo Nutanix: {{error}}"
}
Loading
Loading