From 8aa4fc8ddeb0f76a6831eec3e398ff8144fbdedf Mon Sep 17 00:00:00 2001 From: soufien mhelhali Date: Mon, 25 Nov 2024 02:14:24 +0100 Subject: [PATCH 1/4] feat(dedicated): add iplb delete option for us ref: MANAGER-15666 Signed-off-by: soufien mhelhali --- .../manager/modules/iplb/src/home/index.js | 13 +- .../iplb/src/home/iplb-home.constants.js | 2 + .../iplb/src/home/iplb-home.controller.js | 21 ++++ .../modules/iplb/src/home/iplb-home.html | 9 ++ packages/manager/modules/iplb/src/index.js | 3 +- .../manager/modules/iplb/src/iplb.module.js | 20 ++- .../modules/iplb/src/listing/constants.js | 19 +++ .../manager/modules/iplb/src/listing/index.js | 19 +++ .../iplb/src/listing/listing.component.js | 25 ++++ .../iplb/src/listing/listing.controller.js | 114 ++++++++++++++++++ .../modules/iplb/src/listing/listing.html | 34 ++++++ .../listing.route.js} | 22 ++-- .../listing/translations/Messages_fr_FR.json | 11 ++ .../iplb/src/modal/terminate/constants.js | 5 + .../modal/terminate/terminate.controller.js | 48 ++++++++ .../iplb/src/modal/terminate/terminate.html | 30 +++++ 16 files changed, 371 insertions(+), 24 deletions(-) create mode 100644 packages/manager/modules/iplb/src/listing/constants.js create mode 100644 packages/manager/modules/iplb/src/listing/index.js create mode 100644 packages/manager/modules/iplb/src/listing/listing.component.js create mode 100644 packages/manager/modules/iplb/src/listing/listing.controller.js create mode 100644 packages/manager/modules/iplb/src/listing/listing.html rename packages/manager/modules/iplb/src/{iplb.routing.js => listing/listing.route.js} (63%) create mode 100644 packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json create mode 100644 packages/manager/modules/iplb/src/modal/terminate/constants.js create mode 100644 packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js create mode 100644 packages/manager/modules/iplb/src/modal/terminate/terminate.html diff --git a/packages/manager/modules/iplb/src/home/index.js b/packages/manager/modules/iplb/src/home/index.js index 0a9adbe612f4..c8ef4e8a4fb2 100644 --- a/packages/manager/modules/iplb/src/home/index.js +++ b/packages/manager/modules/iplb/src/home/index.js @@ -7,7 +7,7 @@ import IpLoadBalancerHomeService from './iplb-home.service'; import IpLoadBalancerHomeStatusService from './iplb-home-status.service'; import IpLoadBalancerUpdateQuotaCtrl from './updateQuota/iplb-update-quota.controller'; import IplbBulletChartComponent from './bullet-chart.component'; - +import IpLoadBalancerTerminateCtrl from '../modal/terminate/terminate.controller'; import IplbHeaderTemplate from '../header/iplb-dashboard-header.html'; import IplbHomeTemplate from './iplb-home.html'; @@ -15,6 +15,8 @@ import './bullet-chart.less'; import './status-card.less'; import './home.less'; +import { LB_DELETE_FEATURE } from './iplb-home.constants'; + const moduleName = 'ovhManagerIplbHome'; angular @@ -41,6 +43,14 @@ angular }, resolve: { breadcrumb: () => null, + isDeleteOptionsAvailable: /* @ngInject */ (ovhFeatureFlipping) => { + return ovhFeatureFlipping + .checkFeatureAvailability([LB_DELETE_FEATURE]) + .then((featureAvailability) => + featureAvailability.isFeatureAvailable(LB_DELETE_FEATURE), + ) + .catch(() => false); + }, }, }); }, @@ -53,6 +63,7 @@ angular .controller('IpLoadBalancerHomeCtrl', IpLoadBalancerHomeCtrl) .service('IpLoadBalancerHomeStatusService', IpLoadBalancerHomeStatusService) .controller('IpLoadBalancerUpdateQuotaCtrl', IpLoadBalancerUpdateQuotaCtrl) + .controller('IpLoadBalancerTerminateCtrl', IpLoadBalancerTerminateCtrl) .directive('iplbBulletChart', IplbBulletChartComponent) .run(/* @ngTranslationsInject:json ./translations */); diff --git a/packages/manager/modules/iplb/src/home/iplb-home.constants.js b/packages/manager/modules/iplb/src/home/iplb-home.constants.js index 00a00cee0432..72919f69bba2 100644 --- a/packages/manager/modules/iplb/src/home/iplb-home.constants.js +++ b/packages/manager/modules/iplb/src/home/iplb-home.constants.js @@ -25,6 +25,7 @@ export const MESSAGE_DISPLAY_DATE = '2023-04-01'; export const LB_TEMPORARY_WARNING_BANNER_FEATURE = 'ip-load-balancer:lb-temporary-warning-banner'; +export const LB_DELETE_FEATURE = 'ip-load-balancer:delete'; export const LB_SUBSCRIPTION_CONTACT_SECTION = 'ip-load-balancer:lb-contact-section'; @@ -33,5 +34,6 @@ export default { INFO_LINK, MESSAGE_DISPLAY_DATE, LB_TEMPORARY_WARNING_BANNER_FEATURE, + LB_DELETE_FEATURE, LB_SUBSCRIPTION_CONTACT_SECTION, }; diff --git a/packages/manager/modules/iplb/src/home/iplb-home.controller.js b/packages/manager/modules/iplb/src/home/iplb-home.controller.js index 0f60679fd655..45fdabc6d5d2 100644 --- a/packages/manager/modules/iplb/src/home/iplb-home.controller.js +++ b/packages/manager/modules/iplb/src/home/iplb-home.controller.js @@ -8,6 +8,7 @@ import map from 'lodash/map'; import 'moment'; import IplbHomeUpdateQuotaTemplate from './updateQuota/iplb-update-quota.html'; +import IpLoadBalancerTerminateTemplate from '../modal/terminate/terminate.html'; import { INFO_LINK, MESSAGE_DISPLAY_DATE, @@ -40,6 +41,7 @@ export default class IpLoadBalancerHomeCtrl { ovhManagerRegionService, CucVrackService, ovhFeatureFlipping, + isDeleteOptionsAvailable, ) { this.$http = $http; this.$state = $state; @@ -63,6 +65,7 @@ export default class IpLoadBalancerHomeCtrl { this.ovhManagerRegionService = ovhManagerRegionService; this.VrackService = CucVrackService; this.ovhFeatureFlipping = ovhFeatureFlipping; + this.isDeleteOptionsAvailable = isDeleteOptionsAvailable; this.serviceName = this.$stateParams.serviceName; @@ -247,6 +250,24 @@ export default class IpLoadBalancerHomeCtrl { text: this.$translate.instant('iplb_edit'), isAvailable: () => false, }, + deleteService: { + callback: () => + this.CucControllerHelper.modal.showModal({ + modalConfig: { + template: IpLoadBalancerTerminateTemplate, + controller: 'IpLoadBalancerTerminateCtrl', + controllerAs: '$ctrl', + resolve: { + service: () => this, + }, + }, + }), + text: this.$translate.instant('iplb_delete'), + isAvailable: () => + this.isDeleteOptionsAvailable && + !this.subscription.loading && + !this.subscription.hasErrors, + }, manageAutorenew: { text: this.$translate.instant('iplb_manage'), href: this.coreURLBuilder.buildURL('dedicated', '#/billing/autoRenew', { diff --git a/packages/manager/modules/iplb/src/home/iplb-home.html b/packages/manager/modules/iplb/src/home/iplb-home.html index e80ed013b2c3..2a9719f98a4a 100644 --- a/packages/manager/modules/iplb/src/home/iplb-home.html +++ b/packages/manager/modules/iplb/src/home/iplb-home.html @@ -393,6 +393,15 @@ data-ng-bind="::$ctrl.actions.manageAutorenew.text" > + + + { $stateProvider diff --git a/packages/manager/modules/iplb/src/iplb.module.js b/packages/manager/modules/iplb/src/iplb.module.js index 7709ad93e9b3..097d4e3bc374 100644 --- a/packages/manager/modules/iplb/src/iplb.module.js +++ b/packages/manager/modules/iplb/src/iplb.module.js @@ -7,19 +7,15 @@ import ngTranslateAsyncLoader from '@ovh-ux/ng-translate-async-loader'; import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; import ngOvhFeatureFlipping from '@ovh-ux/ng-ovh-feature-flipping'; -import routing from './iplb.routing'; - const moduleName = 'ovhManagerIpLoadBalancer'; -angular - .module(moduleName, [ - ngOvhFeatureFlipping, - ngTranslateAsyncLoader, - 'oui', - 'pascalprecht.translate', - 'ovhManagerFilters', - ListLayoutHelper.moduleName, - ]) - .config(routing); +angular.module(moduleName, [ + ngOvhFeatureFlipping, + ngTranslateAsyncLoader, + 'oui', + 'pascalprecht.translate', + 'ovhManagerFilters', + ListLayoutHelper.moduleName, +]); export default moduleName; diff --git a/packages/manager/modules/iplb/src/listing/constants.js b/packages/manager/modules/iplb/src/listing/constants.js new file mode 100644 index 000000000000..b7058c5de841 --- /dev/null +++ b/packages/manager/modules/iplb/src/listing/constants.js @@ -0,0 +1,19 @@ +export const DEFAULT_NUMBER_OF_COLUMNS = 4; + +export const STRING_COLUMN_OPTIONS = [ + 'contains', + 'startsWith', + 'endsWith', + 'is', + 'isNot', +]; + +export const NUMBER_COLUMN_OPTIONS = ['is']; +export const LB_DELETE_FEATURE = 'ip-load-balancer:delete'; + +export default { + DEFAULT_NUMBER_OF_COLUMNS, + NUMBER_COLUMN_OPTIONS, + STRING_COLUMN_OPTIONS, + LB_DELETE_FEATURE, +}; diff --git a/packages/manager/modules/iplb/src/listing/index.js b/packages/manager/modules/iplb/src/listing/index.js new file mode 100644 index 000000000000..1d19bb0777ae --- /dev/null +++ b/packages/manager/modules/iplb/src/listing/index.js @@ -0,0 +1,19 @@ +import angular from 'angular'; +import '@uirouter/angularjs'; +import '@ovh-ux/ui-kit'; +import '@ovh-ux/manager-core'; + +import IpLoadBalancerTerminateCtrl from '../modal/terminate/terminate.controller'; +import iplbListing from './listing.component'; +import route from './listing.route'; + +const moduleName = 'iplbListing'; + +angular + .module(moduleName, ['oui', 'ui.router', 'ovhManagerCore']) + .controller('IpLoadBalancerTerminateCtrl', IpLoadBalancerTerminateCtrl) + .component('iplbListing', iplbListing) + .config(route) + .run(/* @ngTranslationsInject:json ./translations */); + +export default moduleName; diff --git a/packages/manager/modules/iplb/src/listing/listing.component.js b/packages/manager/modules/iplb/src/listing/listing.component.js new file mode 100644 index 000000000000..f0c9234fef18 --- /dev/null +++ b/packages/manager/modules/iplb/src/listing/listing.component.js @@ -0,0 +1,25 @@ +import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; +import controller from './listing.controller'; +import template from './listing.html'; + +export default { + bindings: { + ...ListLayoutHelper.componentBindings, + header: '<', + staticResources: ' ({ + property: get(criteria, 'field') || this.defaultFilterColumn, + operator: get(criteria, 'comparator'), + value: criteria.reference[0], + })); + + this.stringColumnOptions = { + operators: STRING_COLUMN_OPTIONS, + }; + + this.numberColumnOptions = { + operators: NUMBER_COLUMN_OPTIONS, + }; + } + + loadPage() { + return this.$q.resolve({ + data: get(this.resources, 'data'), + meta: { + totalCount: this.paginationTotalCount, + }, + }); + } + + getSorting(property) { + return this.sort === property ? this.sortOrder.toLowerCase() : ''; + } + + getDisplayedColumns(columns) { + this.displayedColumns = columns + ? JSON.stringify( + map( + columns.filter(({ hidden }) => !hidden), + ({ name, property }) => name || property, + ), + ) + : []; + } + + onPageChange({ pageSize, offset }) { + this.onParamsChange({ + page: parseInt(offset / pageSize, 10) + 1, + pageSize, + }); + } + + onCriteriaChange($criteria) { + const filter = $criteria.map((criteria) => ({ + field: get(criteria, 'property') || this.defaultFilterColumn, + comparator: criteria.operator, + reference: [criteria.value], + })); + + this.onParamsChange({ + filter: JSON.stringify(filter), + }); + } + + onSortChange({ name, order }) { + this.onParamsChange({ + sort: name, + sortOrder: order, + }); + } + + onParamsChange(params) { + return this.onListParamsChange({ + ...params, + columns: this.displayedColumns, + }); + } + + onColumnChange(id, columns) { + this.getDisplayedColumns(columns); + return this.onListParamsChange(); + } + + gotoService({ serviceName }) { + this.$state.go('iplb.detail.home', { serviceName }); + } + + deleteIplb(service) { + this.CucControllerHelper.modal.showModal({ + modalConfig: { + template, + controller: 'IpLoadBalancerTerminateCtrl', + controllerAs: '$ctrl', + resolve: { + service: () => service, + }, + }, + }); + } +} diff --git a/packages/manager/modules/iplb/src/listing/listing.html b/packages/manager/modules/iplb/src/listing/listing.html new file mode 100644 index 000000000000..65127d160358 --- /dev/null +++ b/packages/manager/modules/iplb/src/listing/listing.html @@ -0,0 +1,34 @@ +
+ +
+ + + + + + + + + + + + + diff --git a/packages/manager/modules/iplb/src/iplb.routing.js b/packages/manager/modules/iplb/src/listing/listing.route.js similarity index 63% rename from packages/manager/modules/iplb/src/iplb.routing.js rename to packages/manager/modules/iplb/src/listing/listing.route.js index 399d299093ef..883e34159d25 100644 --- a/packages/manager/modules/iplb/src/iplb.routing.js +++ b/packages/manager/modules/iplb/src/listing/listing.route.js @@ -1,11 +1,12 @@ import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; +import { LB_DELETE_FEATURE } from './constants'; export default /* @ngInject */ ($stateProvider) => { $stateProvider.state('iplb.index', { url: `?${ListLayoutHelper.urlQueryParams}`, views: { iplbContainer: { - component: 'managerListLayout', + component: 'iplbListing', }, }, params: ListLayoutHelper.stateParams, @@ -14,20 +15,21 @@ export default /* @ngInject */ ($stateProvider) => { apiPath: () => '/ipLoadbalancing', dataModel: () => 'ipLoadbalancing.Ip', defaultFilterColumn: () => 'serviceName', - header: /* @ngInject */ ($translate) => $translate.instant('iplb_title'), - customizableColumns: () => true, getServiceNameLink: /* @ngInject */ ($state) => ({ serviceName }) => $state.href('iplb.detail', { serviceName, }), + breadcrumb: () => null, hideBreadcrumb: () => true, + isDeleteOptionsAvailable: /* @ngInject */ (ovhFeatureFlipping) => { + return ovhFeatureFlipping + .checkFeatureAvailability([LB_DELETE_FEATURE]) + .then((featureAvailability) => + featureAvailability.isFeatureAvailable(LB_DELETE_FEATURE), + ) + .catch(() => false); + }, + header: /* @ngInject */ ($translate) => $translate.instant('iplb_title'), }, - redirectTo: (transition) => - transition - .injector() - .getAsync('resources') - .then((resources) => - resources.data.length === 0 ? { state: 'iplb.onboarding' } : false, - ), }); }; diff --git a/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json b/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..f28fab5e4d9a --- /dev/null +++ b/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json @@ -0,0 +1,11 @@ +{ + "iplb_listing_action_delete": "Supprimer mon service", + "iplb_listing_action_detail": "Voir les details de mon service", + "iplb_terminate_service": "Supprimer mon service", + "iplb_terminate_service_warning": "Veuillez confirmer la suppression de votre service", + "iplb_terminate_service_success": "Votre demande de suppression de votre service a été prise en compte. Un e-mail contenant la procédure vous a été envoyé.", + "iplb_terminate_service_error": "Une erreur est survenue lors de la demande de suppression de votre service. {{error}}", + "iplb_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer", + "iplb_terminate_service_terminate_valide": "Valider", + "iplb_terminate_service_terminate_cancel": "Annuler" +} diff --git a/packages/manager/modules/iplb/src/modal/terminate/constants.js b/packages/manager/modules/iplb/src/modal/terminate/constants.js new file mode 100644 index 000000000000..203add1344d7 --- /dev/null +++ b/packages/manager/modules/iplb/src/modal/terminate/constants.js @@ -0,0 +1,5 @@ +export const TERMINATE_PATTERN = /^TERMINATE$/; + +export default { + TERMINATE_PATTERN, +}; diff --git a/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js b/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js new file mode 100644 index 000000000000..fe138fe0ffef --- /dev/null +++ b/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js @@ -0,0 +1,48 @@ +import { TERMINATE_PATTERN } from './constants'; + +export default class IpLoadBalancerTerminateCtrl { + /* @ngInject */ + constructor( + $http, + $translate, + $uibModalInstance, + service, + CucControllerHelper, + Alerter, + ) { + this.$uibModalInstance = $uibModalInstance; + this.service = service; + this.CucControllerHelper = CucControllerHelper; + this.TERMINATE_PATTERN = TERMINATE_PATTERN; + this.$translate = $translate; + this.$http = $http; + this.Alerter = Alerter; + } + + dismiss() { + this.$uibModalInstance.dismiss(); + } + + terminate() { + this.$http + .post(`/ipLoadbalancing/${this.service.serviceName}/terminate`) + .then(() => { + this.Alerter.success( + this.$translate.instant('iplb_terminate_service_success'), + ); + }) + .catch((err) => { + this.Alerter.error( + this.$translate.instant('iplb_terminate_service_error', { + t0: err.data ? err.data.message : err.message, + }), + this.alertId, + ); + }); + this.$uibModalInstance.close(); + } + + close() { + this.$uibModalInstance.close(); + } +} diff --git a/packages/manager/modules/iplb/src/modal/terminate/terminate.html b/packages/manager/modules/iplb/src/modal/terminate/terminate.html new file mode 100644 index 000000000000..bf84cd3f80c2 --- /dev/null +++ b/packages/manager/modules/iplb/src/modal/terminate/terminate.html @@ -0,0 +1,30 @@ + +
+ + + + + + +
+
From daa54031b4c4cd9a11575801087fb5604d3833a7 Mon Sep 17 00:00:00 2001 From: soufien mhelhali Date: Fri, 29 Nov 2024 07:29:35 +0100 Subject: [PATCH 2/4] feat(dedicated): use extends for listing controller --- .../modules/iplb/src/listing/constants.js | 19 ---- .../iplb/src/listing/listing.controller.js | 91 +------------------ .../modules/iplb/src/listing/listing.html | 1 + .../modules/iplb/src/listing/listing.route.js | 9 +- .../listing/translations/Messages_fr_FR.json | 2 +- .../modal/terminate/terminate.controller.js | 3 +- .../iplb/src/modal/terminate/terminate.html | 3 +- 7 files changed, 16 insertions(+), 112 deletions(-) delete mode 100644 packages/manager/modules/iplb/src/listing/constants.js diff --git a/packages/manager/modules/iplb/src/listing/constants.js b/packages/manager/modules/iplb/src/listing/constants.js deleted file mode 100644 index b7058c5de841..000000000000 --- a/packages/manager/modules/iplb/src/listing/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -export const DEFAULT_NUMBER_OF_COLUMNS = 4; - -export const STRING_COLUMN_OPTIONS = [ - 'contains', - 'startsWith', - 'endsWith', - 'is', - 'isNot', -]; - -export const NUMBER_COLUMN_OPTIONS = ['is']; -export const LB_DELETE_FEATURE = 'ip-load-balancer:delete'; - -export default { - DEFAULT_NUMBER_OF_COLUMNS, - NUMBER_COLUMN_OPTIONS, - STRING_COLUMN_OPTIONS, - LB_DELETE_FEATURE, -}; diff --git a/packages/manager/modules/iplb/src/listing/listing.controller.js b/packages/manager/modules/iplb/src/listing/listing.controller.js index a7d68ef8871f..adaac0d91d09 100644 --- a/packages/manager/modules/iplb/src/listing/listing.controller.js +++ b/packages/manager/modules/iplb/src/listing/listing.controller.js @@ -1,100 +1,15 @@ -import get from 'lodash/get'; -import map from 'lodash/map'; - -import { NUMBER_COLUMN_OPTIONS, STRING_COLUMN_OPTIONS } from './constants'; +import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; import template from '../modal/terminate/terminate.html'; -export default class iplbListingCtrl { +export default class iplbListingCtrl extends ListLayoutHelper.ListLayoutCtrl { /* @ngInject */ constructor($state, $q, ouiDatagridService, CucControllerHelper) { - this.$q = $q; + super($q, ouiDatagridService); this.$state = $state; this.ouiDatagridService = ouiDatagridService; this.CucControllerHelper = CucControllerHelper; } - $onInit() { - this.datagridId = `dg-${this.id}`; - this.getDisplayedColumns(this.columns); - this.dataNaviId = `${this.id}-list`; - - this.criteria = JSON.parse(this.filter).map((criteria) => ({ - property: get(criteria, 'field') || this.defaultFilterColumn, - operator: get(criteria, 'comparator'), - value: criteria.reference[0], - })); - - this.stringColumnOptions = { - operators: STRING_COLUMN_OPTIONS, - }; - - this.numberColumnOptions = { - operators: NUMBER_COLUMN_OPTIONS, - }; - } - - loadPage() { - return this.$q.resolve({ - data: get(this.resources, 'data'), - meta: { - totalCount: this.paginationTotalCount, - }, - }); - } - - getSorting(property) { - return this.sort === property ? this.sortOrder.toLowerCase() : ''; - } - - getDisplayedColumns(columns) { - this.displayedColumns = columns - ? JSON.stringify( - map( - columns.filter(({ hidden }) => !hidden), - ({ name, property }) => name || property, - ), - ) - : []; - } - - onPageChange({ pageSize, offset }) { - this.onParamsChange({ - page: parseInt(offset / pageSize, 10) + 1, - pageSize, - }); - } - - onCriteriaChange($criteria) { - const filter = $criteria.map((criteria) => ({ - field: get(criteria, 'property') || this.defaultFilterColumn, - comparator: criteria.operator, - reference: [criteria.value], - })); - - this.onParamsChange({ - filter: JSON.stringify(filter), - }); - } - - onSortChange({ name, order }) { - this.onParamsChange({ - sort: name, - sortOrder: order, - }); - } - - onParamsChange(params) { - return this.onListParamsChange({ - ...params, - columns: this.displayedColumns, - }); - } - - onColumnChange(id, columns) { - this.getDisplayedColumns(columns); - return this.onListParamsChange(); - } - gotoService({ serviceName }) { this.$state.go('iplb.detail.home', { serviceName }); } diff --git a/packages/manager/modules/iplb/src/listing/listing.html b/packages/manager/modules/iplb/src/listing/listing.html index 65127d160358..f6a3ca31a1a2 100644 --- a/packages/manager/modules/iplb/src/listing/listing.html +++ b/packages/manager/modules/iplb/src/listing/listing.html @@ -1,6 +1,7 @@
+
{ $stateProvider.state('iplb.index', { @@ -31,5 +31,12 @@ export default /* @ngInject */ ($stateProvider) => { }, header: /* @ngInject */ ($translate) => $translate.instant('iplb_title'), }, + redirectTo: (transition) => + transition + .injector() + .getAsync('resources') + .then((resources) => + resources.data.length === 0 ? { state: 'iplb.onboarding' } : false, + ), }); }; diff --git a/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json b/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json index f28fab5e4d9a..a12684cb97bd 100644 --- a/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json +++ b/packages/manager/modules/iplb/src/listing/translations/Messages_fr_FR.json @@ -6,6 +6,6 @@ "iplb_terminate_service_success": "Votre demande de suppression de votre service a été prise en compte. Un e-mail contenant la procédure vous a été envoyé.", "iplb_terminate_service_error": "Une erreur est survenue lors de la demande de suppression de votre service. {{error}}", "iplb_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer", - "iplb_terminate_service_terminate_valide": "Valider", + "iplb_terminate_service_terminate_valid": "Valider", "iplb_terminate_service_terminate_cancel": "Annuler" } diff --git a/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js b/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js index fe138fe0ffef..a99ffe1bbcbb 100644 --- a/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js +++ b/packages/manager/modules/iplb/src/modal/terminate/terminate.controller.js @@ -29,6 +29,7 @@ export default class IpLoadBalancerTerminateCtrl { .then(() => { this.Alerter.success( this.$translate.instant('iplb_terminate_service_success'), + 'InfoErrors', ); }) .catch((err) => { @@ -36,7 +37,7 @@ export default class IpLoadBalancerTerminateCtrl { this.$translate.instant('iplb_terminate_service_error', { t0: err.data ? err.data.message : err.message, }), - this.alertId, + 'InfoErrors', ); }); this.$uibModalInstance.close(); diff --git a/packages/manager/modules/iplb/src/modal/terminate/terminate.html b/packages/manager/modules/iplb/src/modal/terminate/terminate.html index bf84cd3f80c2..27aba3be6279 100644 --- a/packages/manager/modules/iplb/src/modal/terminate/terminate.html +++ b/packages/manager/modules/iplb/src/modal/terminate/terminate.html @@ -2,10 +2,9 @@ data-heading="{{:: 'iplb_terminate_service' | translate}}" data-primary-action="$ctrl.terminate()" data-primary-disabled="!$ctrl.terminateConfirmation" - data-primary-label="{{:: 'iplb_terminate_service_terminate_valide' | translate }}" + data-primary-label="{{:: 'iplb_terminate_service_terminate_valid' | translate }}" data-secondary-action="$ctrl.close()" data-secondary-label="{{:: 'iplb_terminate_service_terminate_cancel' | translate }}" - data-loading="$ctrl.isDeleting" data-on-dismiss="$ctrl.close()" >
From 3102b5b93f891eb4cc74c77bba6e663a03110904 Mon Sep 17 00:00:00 2001 From: soufien mhelhali Date: Wed, 4 Dec 2024 10:42:17 +0100 Subject: [PATCH 3/4] feat(dedicated): keep detail navigation for EU/CA --- .../manager/modules/iplb/src/listing/listing.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/manager/modules/iplb/src/listing/listing.html b/packages/manager/modules/iplb/src/listing/listing.html index f6a3ca31a1a2..c5f5075cc998 100644 --- a/packages/manager/modules/iplb/src/listing/listing.html +++ b/packages/manager/modules/iplb/src/listing/listing.html @@ -20,15 +20,14 @@ - + - + From 35d6e3794899f9145baa5ebf5ec71afc1ffe737b Mon Sep 17 00:00:00 2001 From: soufien mhelhali Date: Fri, 17 Jan 2025 07:08:01 +0100 Subject: [PATCH 4/4] feat(dedicated): add info banner in iplb home page ref: feat/MANAGER-15666 Signed-off-by: soufien mhelhali --- .../manager/modules/iplb/src/header/iplb-dashboard-header.html | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/manager/modules/iplb/src/header/iplb-dashboard-header.html b/packages/manager/modules/iplb/src/header/iplb-dashboard-header.html index 54d4f3bccbd9..809810b425cb 100644 --- a/packages/manager/modules/iplb/src/header/iplb-dashboard-header.html +++ b/packages/manager/modules/iplb/src/header/iplb-dashboard-header.html @@ -31,6 +31,7 @@
+