Skip to content
Open
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
6 changes: 6 additions & 0 deletions packages/manager/apps/container/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import { OsdsIcon, OsdsLink, OsdsText } from '@ovhcloud/ods-components/react';
import { ContainerProvider } from '@/core/container';
import { setupDevApplication } from '@/core/dev';
import { setupZendeskConfig } from '@/container/zendesk';
import { ApplicationProvider } from '@/context';
import Container from '@/container';
import { ApiError } from './types/error.type';
Expand Down Expand Up @@ -78,6 +79,7 @@ const App = () => {
const shellObj = initShell(data || responseError.environment);
const environmentObj = shellObj.getPlugin('environment').getEnvironment();
setupI18n(environmentObj.getUserLocale());

const config = () => import(`./config-${environmentObj.getRegion()}.js`);
setupDevApplication(shellObj);
config()
Expand All @@ -86,6 +88,10 @@ const App = () => {
setShell(shellObj);
setEnvironment(environmentObj);
});

if (environmentObj.getRegion() === 'US') {
setupZendeskConfig();
}
}
// reload the page when API services are back after maintenance
// this hack is implemented to avoid reinitialising the shell
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const setupZendeskConfig = (): void => {
console.log(window.zESettings);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const SUPPORT_CHAT_TOKEN_ENDPOINT = '/engine/apiv6/support/chat/token';
11 changes: 10 additions & 1 deletion packages/manager/apps/container/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ declare global {
interface Window {
elqwebtrigger: any;
surveyLanguage: string;
zESettings: {
webWidget: {
authenticate: {
chat: {
jwtFn: (callback: (jwt: string) => void) => void;
};
};
};
};
}
const __REGION__: string;
const __VERSION__: string;
}

export {}
export {}
Loading