diff --git a/.env.development b/.env.development index 777dda988c..6b59579ed4 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,5 @@ VITE_ORCHESTRATOR_ROOT="/orchestrator" +VITE_ATHENA_ROOT="athena" VITE_GRAFANA_ORG_ID=2 VITE_K8S_CLIENT=false VITE_NODE_ENV="development" diff --git a/.env.production b/.env.production index 54a362b28f..d50c70b9b8 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ VITE_ORCHESTRATOR_ROOT="/orchestrator" +VITE_ATHENA_ROOT="athena" VITE_GRAFANA_ORG_ID=2 VITE_NODE_ENV="production" BASE_URL="/dashboard" \ No newline at end of file diff --git a/package.json b/package.json index abca34b217..620801318f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "/dashboard", "dependencies": { - "@devtron-labs/devtron-fe-common-lib": "1.20.6-pre-20", + "@devtron-labs/devtron-fe-common-lib": "1.20.6-pre-27", "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@rjsf/core": "^5.13.3", "@rjsf/utils": "^5.13.3", diff --git a/src/components/Navigation/constants.ts b/src/components/Navigation/constants.ts index 60f27350de..6a9b9893e2 100644 --- a/src/components/Navigation/constants.ts +++ b/src/components/Navigation/constants.ts @@ -456,15 +456,15 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [ id: 'ai-recommendations', title: 'AI Recommendations', icon: 'ic-openai', - disabled: true, + disabled: false, items: [ { - title: 'Overview', - dataTestId: 'ai-recommendations-overview', - id: 'ai-recommendations-overview', + title: 'Notifications', + dataTestId: 'ai-recommendations-notifications', + id: 'ai-recommendations-notifications', icon: 'ic-speedometer', - disabled: true, - href: COMMON_URLS.AI_RECOMMENDATIONS_OVERVIEW, + disabled: false, + href: COMMON_URLS.AI_RECOMMENDATIONS_NOTIFICATIONS, }, ], }, diff --git a/src/index.tsx b/src/index.tsx index 5699c02c69..ab2c6981d9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -41,13 +41,15 @@ declare global { Worker: any __BASE_URL__: string __ORCHESTRATOR_ROOT__: string + __ATHENA_ROOT__: string __GRAFANA_ORG_ID__: number } } -if (!window.__BASE_URL__ || !window.__ORCHESTRATOR_ROOT__) { +if (!window.__BASE_URL__ || !window.__ORCHESTRATOR_ROOT__ || !window.__ATHENA_ROOT__) { window.__BASE_URL__ = import.meta.env.BASE_URL || '/dashboard' window.__ORCHESTRATOR_ROOT__ = import.meta.env.VITE_ORCHESTRATOR_ROOT || 'orchestrator' + window.__ATHENA_ROOT__ = import.meta.env.VITE_ATHENA_ROOT || 'athena' window.__GRAFANA_ORG_ID__ = import.meta.env.VITE_GRAFANA_ORG_ID || 2 } diff --git a/vite.config.mts b/vite.config.mts index dcb785595b..90256ff73e 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -31,7 +31,7 @@ import tsconfigPaths from 'vite-tsconfig-paths' import { compression, defineAlgorithm } from 'vite-plugin-compression2' const WRONG_CODE = `import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";` -const TARGET_URL = 'https://preview.devtron.ai/' +const TARGET_URL = 'https://preview.devtron.ai/'; function reactVirtualized(): PluginOption { return { @@ -96,7 +96,6 @@ const jsToBottomNoModule = () => { export default defineConfig(({ mode }) => { const secretsEnv = loadEnv('secrets', process.cwd(), '') const targetUrl = secretsEnv.VITE_TARGET_URL ?? TARGET_URL - process.env = { ...process.env, ...loadEnv(mode, process.cwd(), ''), ...secretsEnv } const baseConfig: UserConfig = { @@ -275,6 +274,10 @@ export default defineConfig(({ mode }) => { target: targetUrl, changeOrigin: true, }, + '/proxy': { + target: targetUrl, + changeOrigin: true, + }, '/grafana': targetUrl, }, }, diff --git a/yarn.lock b/yarn.lock index f67f258c77..7b327713da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1722,9 +1722,9 @@ __metadata: languageName: node linkType: hard -"@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-20": - version: 1.20.6-pre-20 - resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-20" +"@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-27": + version: 1.20.6-pre-27 + resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-27" dependencies: "@codemirror/autocomplete": "npm:6.18.6" "@codemirror/lang-json": "npm:6.0.1" @@ -1776,7 +1776,7 @@ __metadata: react-select: 5.8.0 rxjs: ^7.8.1 yaml: ^2.4.1 - checksum: 10c0/2516f1ac5da3ac0ae5afaa9772a3f7eb17f7ba5403088d3192dbb0c0c221bb190106525a3e208932c106ba3abffcbe7e3559a58c7b1393e9f162e1227347a025 + checksum: 10c0/849647c4187e1a880dbfb9e3cfd84971f80c00e9072778e0f215cf49b33f301e4f766ad40972d5b4a7ddf0ab166d051e46a7e39209cb9c7593ae1620c2449715 languageName: node linkType: hard @@ -5581,7 +5581,7 @@ __metadata: version: 0.0.0-use.local resolution: "dashboard@workspace:." dependencies: - "@devtron-labs/devtron-fe-common-lib": "npm:1.20.6-pre-20" + "@devtron-labs/devtron-fe-common-lib": "npm:1.20.6-pre-27" "@esbuild-plugins/node-globals-polyfill": "npm:0.2.3" "@playwright/test": "npm:^1.32.1" "@rjsf/core": "npm:^5.13.3"