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

New release #14989

Merged
merged 4 commits into from
Jan 20, 2025
Merged
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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CSV_DATA_ENCODING,
CSV_DATA_SCHEME,
CSV_SEPARATOR,
FETCH_PAGE_SIZE,
} from './ip-ip-export.constants';
import { TRACKING_PREFIX } from '../list.constant';

Expand All @@ -14,6 +15,7 @@ export default /* @ngInject */ (
Alerter,
atInternet,
Ip,
$q,
) => {
let cancelFetch = null;

Expand All @@ -23,15 +25,45 @@ export default /* @ngInject */ (

function fetchIps() {
const { serviceType, otherParams } = $scope.currentActionData;
const { cancel, request } = Ip.fetchIps({
serviceType,
otherParams,
pageNumber: 1,
pageSize: 5000,
});
let pageNumber = 1;
const defered = $q.defer();
let allIps = [];

const cancel = () => {
defered.resolve(allIps);
};

try {
const { request: firstRequest } = Ip.fetchIps({
serviceType,
otherParams,
pageNumber,
pageSize: FETCH_PAGE_SIZE,
});

firstRequest.then(async ({ ips: firstIps }) => {
let ips = firstIps;
while (ips.length > 0) {
allIps = allIps.concat(ips);
pageNumber += 1;
const { request } = Ip.fetchIps({
serviceType,
otherParams,
pageNumber,
pageSize: FETCH_PAGE_SIZE,
});
/* eslint-disable no-await-in-loop */
({ ips } = await request);
}
defered.resolve(allIps);
});
} catch (error) {
defered.reject(error);
}

return {
cancel,
request: request.then(({ ips }) => ips),
request: defered.promise,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const CSV_HEADERS = [
},
];

export const FETCH_PAGE_SIZE = 100;
export const CSV_FILENAME = 'export_ips.csv';
export const CSV_DATA_ENCODING = 'base64';
export const CSV_DATA_SCHEME = `data:text/csv;charset=ISO-8859-1;${CSV_DATA_ENCODING}`;
Expand All @@ -36,4 +37,5 @@ export default {
CSV_DATA_ENCODING,
CSV_DATA_SCHEME,
CSV_SEPARATOR,
FETCH_PAGE_SIZE,
};
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
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default class NutanixGeneralInfoRedeployCtrl {
erasureCoding,
prismCentral,
prismElementVip,
infraVlanNumber,
gatewayCidr,
version,
nodes,
Expand All @@ -133,6 +134,7 @@ export default class NutanixGeneralInfoRedeployCtrl {
erasureCoding,
prismCentral,
prismElementVip,
infraVlanNumber,
gatewayCidr,
version,
nodes: this.getNodesWithDisplayName(nodes),
Expand All @@ -150,6 +152,7 @@ export default class NutanixGeneralInfoRedeployCtrl {
erasureCoding,
prismCentral,
prismElementVip,
infraVlanNumber,
gatewayCidr,
version,
nodes,
Expand All @@ -166,6 +169,7 @@ export default class NutanixGeneralInfoRedeployCtrl {
}),
...(redundancyFactor && { redundancyFactor }),
...(prismElementVip && { prismElementVip }),
...(infraVlanNumber && { infraVlanNumber }),
...(gatewayCidr && { gatewayCidr }),
...(version && { version }),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h2 data-translate="nutanix_redeploy_title"></h2>
>
<strong data-ng-bind="node.displayName"></strong>
<oui-field
data-error-messages="{
data-error-messages="{
ipSubnetValidator: ('nutanix_redeploy_custom_config_ip_not_in_cidr_subnet_error' | translate),
uniqueIpValidator: ('nutanix_redeploy_custom_config_ip_unique_error' | translate),
pattern: ('nutanix_redeploy_custom_config_ip_format_error' | translate)
Expand All @@ -210,7 +210,7 @@ <h2 data-translate="nutanix_redeploy_title"></h2>
/>
</oui-field>
<oui-field
data-error-messages="{
data-error-messages="{
ipSubnetValidator: ('nutanix_redeploy_custom_config_ip_not_in_cidr_subnet_error' | translate),
uniqueIpValidator: ('nutanix_redeploy_custom_config_ip_unique_error' | translate),
pattern: ('nutanix_redeploy_custom_config_ip_format_error' | translate)
Expand Down Expand Up @@ -287,7 +287,7 @@ <h5 data-translate="nutanix_redeploy_erasure_coding"></h5>
<oui-field
data-label="{{:: 'nutanix_redeploy_prism_central_vip' | translate}}"
data-label-popover="{{:: 'nutanix_redeploy_prism_central_virtual_ip_description' | translate}}"
data-error-messages="{
data-error-messages="{
ipSubnetValidator: ('nutanix_redeploy_custom_config_ip_not_in_cidr_subnet_error' | translate),
uniqueIpValidator: ('nutanix_redeploy_custom_config_ip_unique_error' | translate),
pattern: ('nutanix_redeploy_custom_config_ip_format_error' | translate)
Expand Down Expand Up @@ -359,7 +359,7 @@ <h5 data-translate="nutanix_redeploy_erasure_coding"></h5>
data-translate="nutanix_redeploy_prism_element_vip_description"
></p>
<oui-field
data-error-messages="{
data-error-messages="{
ipSubnetValidator: ('nutanix_redeploy_custom_config_ip_not_in_cidr_subnet_error' | translate),
uniqueIpValidator: ('nutanix_redeploy_custom_config_ip_unique_error' | translate),
pattern: ('nutanix_redeploy_custom_config_ip_format_error' | translate)
Expand All @@ -377,6 +377,35 @@ <h5 data-translate="nutanix_redeploy_erasure_coding"></h5>
/>
</oui-field>
</div>
<div class="mb-3">
<h5 data-translate="nutanix_redeploy_vlan_id"></h5>
<p
data-translate="nutanix_redeploy_vlan_id_description"
></p>
<oui-field
data-error-messages="{
min: ('nutanix_redeploy_vlan_id_helper' | translate),
max: ('nutanix_redeploy_vlan_id_helper' | translate),
}"
>
<input
class="oui-input w-50"
maxlength="4"
name="vlanId"
required
type="number"
data-ng-model="$ctrl.config.infraVlanNumber"
data-ng-model-options="{ debounce: 500 }"
data-ng-min="1"
data-ng-max="4000"
/>
<p
class="oui-field__helper"
data-ng-if="!customConfig.vlanId.$error.max && !customConfig.vlanId.$error.min"
data-translate="nutanix_redeploy_vlan_id_helper"
></p>
</oui-field>
</div>
<div class="mb-3">
<h5 data-translate="nutanix_redeploy_gateway_CIDR"></h5>
<p
Expand Down
Loading
Loading