Skip to content

Commit

Permalink
feat(dedicated.server): rbx1 eol banner (#14742)
Browse files Browse the repository at this point in the history
* feat(dedicated.server): rbx1 eol banner

ref: MANAGER-16530

Signed-off-by: Quentin Pavy <[email protected]>

* fix(i18n): add missing translations [CDS 3616]

Signed-off-by: CDS Translator Agent <[email protected]>

* feat(dedicated.server): display rb1x banner for rbx1 not in ct rack

ref: MANAGER-16530

Signed-off-by: Quentin Pavy <[email protected]>

---------

Signed-off-by: Quentin Pavy <[email protected]>
Signed-off-by: CDS Translator Agent <[email protected]>
Co-authored-by: Quentin Pavy <[email protected]>
  • Loading branch information
qpavy and Quentin Pavy authored Jan 17, 2025
1 parent 41ae4e6 commit f674d47
Show file tree
Hide file tree
Showing 21 changed files with 122 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ export const UPGRADE_TYPE = {
STORAGE: 'storage',
};

export const RBX1_DATACENTER = 'RBX_1';
export const RBX1_CONTAINER_START_WITH = 'CT';

export default {
ELIGIBLE_FOR_UPGRADE,
COMMIT_IMPRESSION_TRACKING_DATA,
RECOMMIT_IMPRESSION_TRACKING_DATA,
UPGRADE_TYPE,
RBX1_DATACENTER,
RBX1_CONTAINER_START_WITH,
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import includes from 'lodash/includes';
import isEmpty from 'lodash/isEmpty';

import UpgradeTask from './upgrade/upgrade-task.class';
import { ELIGIBLE_FOR_UPGRADE } from './dashboard.constants';
import {
ELIGIBLE_FOR_UPGRADE,
RBX1_CONTAINER_START_WITH,
RBX1_DATACENTER,
} from './dashboard.constants';
import { UPGRADE_MODE } from './upgrade/upgrade.constants';

export default /* @ngInject */ ($stateProvider) => {
Expand Down Expand Up @@ -334,6 +338,13 @@ export default /* @ngInject */ ($stateProvider) => {
})
: null,
),
displayRbxEolBanner: /* @ngInject */ (features, server) => {
return (
features.isFeatureAvailable('dedicated-server:rbx1-eol-banner') &&
server.datacenter === RBX1_DATACENTER &&
!server.rack.toUpperCase().startsWith(RBX1_CONTAINER_START_WITH)
);
},
},
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default /* @ngInject */ ($stateProvider) => {
'dedicated-server:dns',
'dedicated-server:upgradeWithTicket',
'dedicated-server:vmac-unavailable-banner',
'dedicated-server:rbx1-eol-banner',
]),
ola: /* @ngInject */ (
$stateParams,
Expand Down
1 change: 1 addition & 0 deletions packages/manager/modules/bm-server-components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export { default as serverSecondaryDns } from './secondary-dns';
export { default as serverMainPage } from './server';
export { default as serverDashboard } from './server-dashboard';
export { default as vmacUnavailableBanner } from './vmac-unavailable-banner';
export { default as rbx1EolBanner } from './rbx1-eol-banner';
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import controller from './controller';
import template from './template.html';

export default {
controller,
name: 'ovhManagerBmServerComponentsRbx1EolBanner',
template,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const GUIDE_LINKS = {
DEFAULT: 'https://www.ovhcloud.com/en-ie/lp/end-service-rbx-1/',
ASIA: 'https://www.ovhcloud.com/asia/lp/end-service-rbx-1/',
AU: 'https://www.ovhcloud.com/en-au/lp/end-service-rbx-1/',
CA: 'https://www.ovhcloud.com/en-ca/lp/end-service-rbx-1/',
DE: 'https://www.ovhcloud.com/de/lp/end-service-rbx-1/',
ES: 'https://www.ovhcloud.com/es-es/lp/end-service-rbx-1/',
FR: 'https://www.ovhcloud.com/fr/lp/end-service-rbx-1/',
GB: 'https://www.ovhcloud.com/en-gb/lp/end-service-rbx-1/',
IE: 'https://www.ovhcloud.com/en-ie/lp/end-service-rbx-1/',
IN: 'https://www.ovhcloud.com/en-in/lp/end-service-rbx-1/',
IT: 'https://www.ovhcloud.com/it/lp/end-service-rbx-1/',
MA: 'https://www.ovhcloud.com/fr-ma/lp/end-service-rbx-1/',
NL: 'https://www.ovhcloud.com/nl/lp/end-service-rbx-1/',
PL: 'https://www.ovhcloud.com/pl/lp/end-service-rbx-1/',
PT: 'https://www.ovhcloud.com/pt/lp/end-service-rbx-1/',
QC: 'https://www.ovhcloud.com/fr-ca/lp/end-service-rbx-1/',
SN: 'https://www.ovhcloud.com/fr-sn/lp/end-service-rbx-1/',
SG: 'https://www.ovhcloud.com/en-sg/lp/end-service-rbx-1/',
TN: 'https://www.ovhcloud.com/fr-tn/lp/end-service-rbx-1/',
US: 'https://www.ovhcloud.com/en/lp/end-service-rbx-1/',
WE: 'https://www.ovhcloud.com/en-ie/lp/end-service-rbx-1/',
WS: 'https://www.ovhcloud.com/es/lp/end-service-rbx-1/',
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { GUIDE_LINKS } from './constants';

export default class RbxEolBannerController {
/* @ngInject */
constructor(coreConfig) {
this.guideLink =
GUIDE_LINKS[coreConfig.getUser().ovhSubsidiary] || GUIDE_LINKS.DEFAULT;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import angular from 'angular';
import '@ovh-ux/ng-translate-async-loader';
import 'angular-translate';
import '@ovh-ux/ui-kit';

import component from './component';

const moduleName = 'ovhManagerRbx1EolBanner';

angular
.module(moduleName, [
'oui',
'ngTranslateAsyncLoader',
'pascalprecht.translate',
])
.component(component.name, component)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<oui-message data-type="warning" class="mb-4">
<p
data-translate="rbx1_eol_banner_title"
data-translate-values="{guideLink: $ctrl.guideLink}"
></p>
</oui-message>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "BITTE BEACHTEN SIE: Um Ihnen die Migration Ihrer Dienste von RBX1 zu ermöglichen, das in diesem Jahr modernisiert werden soll, wird der Zeitraum für die Migration der Server bis zum 30. Juni 2025 verlängert. Weitere Informationen finden Sie in der E-Mail, die Sie erhalten haben, sowie in unserer <a href=\"{{guideLink}}\" target=\"_blank\">Migrationsanleitung</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "IMPORTANT! To enable you to migrate your RBX1 services, which are scheduled to be modernized this year, the server migration period is extended until June 30, 2025. For further details, please refer to the email you have received and refer to our <a href=\"{{guideLink}}\" target=\"_blank\">migration</a> guide."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "ATENCIÓN: Para asegurarnos de que puede migrar correctamente los servicios de RBX1, cuya modernización está prevista para este año, el período de migración de servidores se amplía hasta el 30 de junio de 2025. Para más información, consulte el correo electrónico recibido y nuestra <a href=\"{{guideLink}}\" target=\"_blank\">guía de migración</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "ATTENTION: Pour vous permettre de migrer vos services de RBX1 dont la modernisation est prévue cette année, la période de migration des serveurs est étendue jusqu'au 30 juin 2025. Pour plus de détail, merci de vous référer au mail reçu et de consulter notre <a href=\"{{guideLink}}\" target=\"_blank\">guide de migration</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "ATTENTION: Pour vous permettre de migrer vos services de RBX1 dont la modernisation est prévue cette année, la période de migration des serveurs est étendue jusqu'au 30 juin 2025. Pour plus de détail, merci de vous référer au mail reçu et de consulter notre <a href=\"{{guideLink}}\" target=\"_blank\">guide de migration</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "ATTENZIONE: Per consentirti di trasferire i tuoi servizi da RBX1, la cui modernizzazione è prevista quest'anno, il periodo di migrazione dei server sarà esteso fino al 30 giugno 2025. Per maggiori dettagli, consulta l'email ricevuta e la nostra <a href=\"{{guideLink}}\" target=\"_blank\">guida alla migrazione</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "UWAGA! Aby umożliwić migrację usług RBX1, które mają zostać zmodernizowane w tym roku, okres migracji serwerów został przedłużony do 30 czerwca 2025 r. Więcej informacji znajdziesz w e-mailu, który do Ciebie wysłaliśmy oraz w <a href=\"{{guideLink}}\" target=\"_blank\">przewodniku dotyczącym migracji</a>."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rbx1_eol_banner_title": "ATENÇÃO: Para lhe permitir migrar os seus serviços de RBX1 cuja modernização está prevista para este ano, o período de migração dos servidores foi alargado até 30 de junho de 2025. Para mais informações, consulte o e-mail recebido e o nosso <a href=\"{{guideLink}}\" target=\"_blank\">guia de migração</a>."
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default {
goToTrafficOrder: '<',
goToTrafficCancel: '<',
serverType: '<?',
displayRbxEolBanner: '<?',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
</span>
</oui-message>

<ovh-manager-bm-server-components-rbx1-eol-banner
data-ng-if="$ctrl.displayRbxEolBanner"
></ovh-manager-bm-server-components-rbx1-eol-banner>

<ovh-manager-bm-server-components-vmac-unavailable-banner
data-ng-if="$ctrl.isVmacUnavailableBannerAvailable"
data-service-id="$ctrl.serviceInfos.serviceId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import '@ovh-ux/ui-kit';
import 'angular-translate';

import vmacUnavailableBanner from '../vmac-unavailable-banner';
import rbx1EolBanner from '../rbx1-eol-banner';
import service from '../server/server.service';
import bandwidthVrackOrderService from '../server/server.bandwidth-vrack-order.service';
import featureAvailability from '../server/server.feature-availability';
Expand All @@ -12,7 +13,12 @@ import component from './dashboard.component';
const moduleName = 'ovhManagerBmServerComponentsServerDashboard';

angular
.module(moduleName, ['oui', 'pascalprecht.translate', vmacUnavailableBanner])
.module(moduleName, [
'oui',
'pascalprecht.translate',
vmacUnavailableBanner,
rbx1EolBanner,
])
.component('serverDashboard', component)
.service('Server', service)
.service('BandwidthVrackOrderService', bandwidthVrackOrderService)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default class RbxEolBannerController {
export default class VmacUnavailableBannerController {
/* @ngInject */
constructor(VmacUnavailableBannerService) {
this.VmacUnavailableBannerService = VmacUnavailableBannerService;
Expand Down

0 comments on commit f674d47

Please sign in to comment.