Skip to content

Commit 4b9f929

Browse files
committed
enabling cm for rendering ecternal argo list
1 parent 9d094a7 commit 4b9f929

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ TRIGGER_API_TIMEOUT=60000
4242
LOGIN_DT_LOGO=
4343
SIDEBAR_DT_LOGO=
4444
USE_V2=
45+
ENABLE_EXTERNAL_ARGO_CD=false

src/components/app/list-new/AppList.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -915,17 +915,19 @@ export default function AppList({ isSuperAdmin, appListCount, isArgoInstalled }:
915915
Helm Apps
916916
</a>
917917
</li>
918-
<li className="tab-list__tab">
919-
<a
920-
className={`tab-list__tab-link ${
921-
currentTab === AppListConstants.AppTabs.ARGO_APPS ? 'active' : ''
922-
}`}
923-
onClick={() => changeAppTab(AppListConstants.AppTabs.ARGO_APPS)}
924-
data-testid="helm-app-list-button"
925-
>
926-
{AppListConstants.AppTabs.ARGO_APPS}
927-
</a>
928-
</li>
918+
{window?._env_?.ENABLE_EXTERNAL_ARGO_CD && (
919+
<li className="tab-list__tab">
920+
<a
921+
className={`tab-list__tab-link ${
922+
currentTab === AppListConstants.AppTabs.ARGO_APPS ? 'active' : ''
923+
}`}
924+
onClick={() => changeAppTab(AppListConstants.AppTabs.ARGO_APPS)}
925+
data-testid="helm-app-list-button"
926+
>
927+
{AppListConstants.AppTabs.ARGO_APPS}
928+
</a>
929+
</li>
930+
)}
929931
</ul>
930932
<div className="app-tabs-sync fs-13">
931933
{lastDataSyncTimeString &&
@@ -1048,7 +1050,7 @@ export default function AppList({ isSuperAdmin, appListCount, isArgoInstalled }:
10481050
</>
10491051
)
10501052
}
1051-
if (params.appType === AppListConstants.AppType.ARGO_APPS) {
1053+
if (params.appType === AppListConstants.AppType.ARGO_APPS && window?._env_?.ENABLE_EXTERNAL_ARGO_CD) {
10521054
return (
10531055
<>
10541056
<ExternalArgoList

src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ interface customEnv {
5454
NODE_ENV?: string
5555
LOGIN_DT_LOGO?: string
5656
SIDEBAR_DT_LOGO?: string
57+
ENABLE_EXTERNAL_ARGO_CD: boolean
5758
}
5859
declare global {
5960
interface Window {
@@ -169,6 +170,7 @@ if (!window || !window._env_) {
169170
TRIGGER_API_TIMEOUT: 60000,
170171
LOGIN_DT_LOGO: '',
171172
SIDEBAR_DT_LOGO: '',
173+
ENABLE_EXTERNAL_ARGO_CD: false,
172174
}
173175
}
174176

0 commit comments

Comments
 (0)