Skip to content

Commit 25a2f7a

Browse files
committed
feat(*): skip labeu url update
Signed-off-by: Anoop N <[email protected]>
1 parent 6f2b3e4 commit 25a2f7a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/manager/apps/container/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@emotion/styled": "^11.10.0",
2626
"@ovh-ux/manager-config": "^8.7.2",
2727
"@ovh-ux/manager-core-api": "^0.19.3",
28+
"@ovh-ux/manager-core-sso": "^0.4.9",
2829
"@ovh-ux/manager-react-components": "^1.47.1",
2930
"@ovh-ux/manager-react-shell-client": "^0.11.2",
3031
"@ovh-ux/manager-vite-config": "^0.15.1",

packages/manager/apps/container/src/hooks/useUniverses.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useQuery } from '@tanstack/react-query';
2+
import { getLogoutUrl } from '@ovh-ux/manager-core-sso';
23

34
export type Universe = {
45
isPrimary: boolean;
@@ -27,7 +28,7 @@ export async function fetchUniverses(): Promise<Universe[]> {
2728
universes.map((universe: Universe) => ({
2829
isPrimary: true, //! SECONDARY_UNIVERSES.includes(universe.universe),
2930
universe: universe.universe,
30-
url: universe.universe === 'sunrise' ? universe.url : universe.url.replace(oldDomains.EU, 'manager.eu.ovhcloud.com').replace(oldDomains.CA, 'manager.ca.ovhcloud.com').replace(oldDomains.US, 'manager.us.ovhcloud.com').replace(oldDomains.TELECOM, 'manager.eu.ovhcloud.com'),
31+
url: universe.universe === 'sunrise' || getLogoutUrl() === '/auth/' ? universe.url : universe.url.replace(oldDomains.EU, 'manager.eu.ovhcloud.com').replace(oldDomains.CA, 'manager.ca.ovhcloud.com').replace(oldDomains.US, 'manager.us.ovhcloud.com').replace(oldDomains.TELECOM, 'manager.eu.ovhcloud.com'),
3132
})),
3233
);
3334
}

packages/manager/modules/config/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ const getNewUrl = (appName = '', currentValue = '', region: 'EU' | 'CA' | 'US')
143143

144144
// TODO: Temporarily update the domains of µ-app URLs as they are still pointing to the old ones from BFF. To clean this method after BFF deployment
145145
const updateDomain = (configObj: Environment) => {
146+
if (getLogoutUrl() === '/auth/') {
147+
// fix to skip updating URLs for LABEU
148+
return;
149+
}
146150
const { region } = configObj;
147151
Object.entries(configObj.applicationURLs).forEach(([key, value]) => {
148152
configObj.applicationURLs[key] = getNewUrl(key, value, region);

0 commit comments

Comments
 (0)