File tree Expand file tree Collapse file tree 8 files changed +21
-19
lines changed
components/app/details/appDetails Expand file tree Collapse file tree 8 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ VITE_HIDE_DEPLOYMENT_GROUPS=true
23
23
VITE_HIDE_GITOPS_OR_HELM_OPTION = true
24
24
VITE_CONFIGURABLE_TIMEOUT =
25
25
VITE_HIDE_APPLICATION_GROUPS = true
26
- VITE_REACT_APP_K8S_CLIENT = false
26
+ VITE_K8S_CLIENT = false
27
27
VITE_USE_V2 = false
28
28
VITE_CLUSTER_TERMINAL_CONNECTION_POLLING_INTERVAL = 7000
29
29
VITE_CLUSTER_TERMINAL_CONNECTION_RETRY_COUNT = 7
Original file line number Diff line number Diff line change 1
- VITE_REACT_APP_ORCHESTRATOR_ROOT = " /orchestrator"
2
- VITE_REACT_APP_GRAFANA_ORG_ID = 2
3
- VITE_REACT_APP_K8S_CLIENT = false
4
- VITE_NODE_ENV = " development"
1
+ VITE_ORCHESTRATOR_ROOT = " /orchestrator"
2
+ VITE_GRAFANA_ORG_ID = 2
3
+ VITE_K8S_CLIENT = false
4
+ VITE_NODE_ENV = " development"
5
+ BASE_URL = " /dashboard"
Original file line number Diff line number Diff line change 1
- VITE_REACT_APP_ORCHESTRATOR_ROOT = " /orchestrator"
2
- VITE_REACT_APP_GRAFANA_ORG_ID = 2
3
- VITE_NODE_ENV = " production"
1
+ VITE_ORCHESTRATOR_ROOT = " /orchestrator"
2
+ VITE_GRAFANA_ORG_ID = 2
3
+ VITE_NODE_ENV = " production"
4
+ BASE_URL = " /dashboard"
Original file line number Diff line number Diff line change @@ -148,9 +148,9 @@ module.exports = function (app) {
148
148
#### ** ` .env.development ` **
149
149
150
150
``` console
151
- GRAFANA_ORG_ID =2
151
+ VITE_GRAFANA_ORG_ID =2
152
152
REACT_APP_EDITOR=code
153
- VITE_REACT_APP_ORCHESTRATOR_ROOT =/orchestrator
153
+ VITE_ORCHESTRATOR_ROOT =/orchestrator
154
154
REACT_APP_PASSWORD=argocd-server-74b7b94945-nxxnh
155
155
```
156
156
@@ -159,9 +159,9 @@ REACT_APP_PASSWORD=argocd-server-74b7b94945-nxxnh
159
159
#### ** ` .env.development ` **
160
160
161
161
``` console
162
- GRAFANA_ORG_ID =2
162
+ VITE_GRAFANA_ORG_ID =2
163
163
REACT_APP_EDITOR=code
164
- VITE_REACT_APP_ORCHESTRATOR_ROOT =http://demo.devtron.info:32080/orchestrator
164
+ VITE_ORCHESTRATOR_ROOT =http://demo.devtron.info:32080/orchestrator
165
165
REACT_APP_PASSWORD=argocd-server-74b7b94945-nxxnh
166
166
```
167
167
Original file line number Diff line number Diff line change 65
65
"build" : " NODE_OPTIONS=--max_old_space_size=8192 vite build" ,
66
66
"serve" : " vite preview" ,
67
67
"build-light" : " GENERATE_SOURCEMAP=false NODE_OPTIONS=--max_old_space_size=8192 vite build" ,
68
- "build-k8s-app" : " GENERATE_SOURCEMAP=false NODE_OPTIONS=--max_old_space_size=8192 VITE_REACT_APP_K8S_CLIENT =true vite build" ,
68
+ "build-k8s-app" : " GENERATE_SOURCEMAP=false NODE_OPTIONS=--max_old_space_size=8192 VITE_K8S_CLIENT =true vite build" ,
69
69
"test" : " vitest test" ,
70
70
"test-coverage:watch" : " npm run test -- --coverage" ,
71
71
"test-coverage" : " npm run test -- --coverage --watchAll=false" ,
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ export function addQueryParamToGrafanaURL(
402
402
) : string {
403
403
const startTime : string = calendarInputs . startDate
404
404
const endTime : string = calendarInputs . endDate
405
- url += `?orgId=${ import . meta . env . VITE_REACT_APP_GRAFANA_ORG_ID } `
405
+ url += `?orgId=${ window . __VITE_GRAFANA_ORG_ID__ } `
406
406
url += `&refresh=10s`
407
407
url += `&var-app=${ appId } `
408
408
url += `&var-env=${ envId } `
Original file line number Diff line number Diff line change @@ -64,12 +64,14 @@ declare global {
64
64
Worker : any
65
65
__BASE_URL__ : string
66
66
__REACT_APP_ORCHESTRATOR_ROOT__ : string
67
+ __VITE_GRAFANA_ORG_ID__ : number
67
68
}
68
69
}
69
70
70
71
if ( ! window . __BASE_URL__ || ! window . __REACT_APP_ORCHESTRATOR_ROOT__ ) {
71
- window . __BASE_URL__ = '/dashboard'
72
- window . __REACT_APP_ORCHESTRATOR_ROOT__ = 'orchestrator'
72
+ window . __BASE_URL__ = import . meta. env . BASE_URL || '/dashboard'
73
+ window . __REACT_APP_ORCHESTRATOR_ROOT__ = import . meta. env . VITE_ORCHESTRATOR_ROOT || 'orchestrator'
74
+ window . __VITE_GRAFANA_ORG_ID__ = import . meta. env . VITE_GRAFANA_ORG_ID || 2
73
75
}
74
76
75
77
const root = document . getElementById ( 'root' )
@@ -150,7 +152,7 @@ if (!window || !window._env_) {
150
152
VITE_HIDE_DEPLOYMENT_GROUPS : true ,
151
153
VITE_HIDE_GITOPS_OR_HELM_OPTION : false ,
152
154
VITE_HIDE_APPLICATION_GROUPS : false ,
153
- K8S_CLIENT : import . meta. env . VITE_REACT_APP_K8S_CLIENT === 'true' ,
155
+ K8S_CLIENT : import . meta. env . VITE_K8S_CLIENT === 'true' ,
154
156
VITE_USE_V2 : true ,
155
157
VITE_CLUSTER_TERMINAL_CONNECTION_POLLING_INTERVAL : 7000 ,
156
158
VITE_CLUSTER_TERMINAL_CONNECTION_RETRY_COUNT : 7 ,
Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ export default defineConfig(({ mode }) => {
94
94
console . log ( mode )
95
95
// Global override for node environment
96
96
baseConfig [ 'define' ] = {
97
- // __BASE_URL__: '/dashboard/',
98
- // __REACT_APP_ORCHESTRATOR_ROOT__: '/orchestrator',
99
97
global : 'globalThis' ,
100
98
}
101
99
// } else {
You can’t perform that action at this time.
0 commit comments