Skip to content

Commit d9a5859

Browse files
committed
Merge branch 'main' into vite_exploration
2 parents 5fbd374 + 65860b6 commit d9a5859

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1189
-373
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ src/components/app/list/appStatus/AppStatus.tsx
231231
src/components/app/list/emptyView/Empty.tsx
232232
src/components/app/list/expandedRow/ExpandedRow.tsx
233233
src/components/app/list/types.tsx
234+
src/components/app/list-new/ExternalArgoList.tsx
235+
src/components/externalArgoApps/ExternalArgoApp.tsx
236+
src/components/externalArgoApps/ExternalArgoAppDetail.tsx
234237
src/components/app/service.ts
235238
src/components/app/types.ts
236239
src/components/bulkEdits/BulkEdits.tsx

src/components/ApplicationGroup/Details/EnvironmentOverview/EnvironmentOverview.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
} from '../../AppGroup.types'
2626
import './envOverview.scss'
2727
import { Moment12HourFormat } from '../../../../config'
28-
import { EditDescRequest } from '../../../app/types'
2928
import { ReactComponent as ActivityIcon } from '../../../../assets/icons/ic-activity.svg'
3029
import { ReactComponent as DockerIcon } from '../../../../assets/icons/git/docker.svg'
3130
import { ReactComponent as HibernateIcon } from '../../../../assets/icons/ic-hibernate-3.svg'

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

Lines changed: 211 additions & 181 deletions
Large diffs are not rendered by default.

src/components/app/list-new/AppListService.ts

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { get, ResponseType } from '@devtron-labs/devtron-fe-common-lib'
1+
import { get } from '@devtron-labs/devtron-fe-common-lib'
22
import { getNamespaceListMin as getNamespaceList, getAppFilters } from '../../../services/service'
33
import { Routes, SERVER_MODE } from '../../../config'
44
import {
@@ -10,40 +10,7 @@ import {
1010
import { APP_STATUS } from '../config'
1111
import { getProjectList } from '../../project/service'
1212
import { getClusterList } from '../../cluster/cluster.service'
13-
14-
export interface AppListResponse extends ResponseType {
15-
result?: AppsListResult
16-
}
17-
18-
interface AppsListResult {
19-
clusterIds: number[]
20-
applicationType: string // DEVTRON-CHART-STORE, DEVTRON-APP ,HELM-APP
21-
errored: boolean
22-
errorMsg: string
23-
helmApps: HelmApp[]
24-
}
25-
26-
export interface HelmApp {
27-
appName: string
28-
appId: string
29-
isExternal: boolean
30-
chartName: string
31-
chartVersion: string
32-
chartAvatar: string
33-
projectId: number
34-
lastDeployedAt: string
35-
environmentDetail: AppEnvironmentDetail
36-
appStatus: string
37-
}
38-
39-
export interface AppEnvironmentDetail {
40-
environmentName: string
41-
environmentId: number
42-
namespace: string
43-
clusterName: string
44-
clusterId: number
45-
isVirtualEnvironment?: boolean
46-
}
13+
import { AppListResponse } from './AppListType';
4714

4815
async function commonAppFilters(serverMode) {
4916
if (serverMode === SERVER_MODE.FULL) {
@@ -210,8 +177,19 @@ export const getNamespaces = (
210177
})
211178
}
212179

213-
export const getDevtronInstalledHelmApps = (clusterIdsCsv: string, appStatuses?: string): Promise<AppListResponse> => {
214-
let url = `${Routes.CHART_INSTALLED}`
180+
export const getDevtronInstalledHelmApps = (clusterIdsCsv: string, appStatuses?: string) : Promise<AppListResponse> => {
181+
let url = Routes.CHART_INSTALLED
182+
if (clusterIdsCsv) {
183+
url = `${url}?clusterIds=${clusterIdsCsv}`
184+
}
185+
if (appStatuses) {
186+
url = `${url}${clusterIdsCsv ? '&' : '?'}appStatuses=${appStatuses}`
187+
}
188+
return get(url)
189+
}
190+
191+
export const getArgoInstalledExternalApps = (clusterIdsCsv: string, appStatuses?: string) => {
192+
let url = Routes.ARGO_APPS
215193
if (clusterIdsCsv) {
216194
url = `${url}?clusterIds=${clusterIdsCsv}`
217195
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { ResponseType } from '@devtron-labs/devtron-fe-common-lib'
2+
3+
export interface ArgoAppListResult {
4+
appName: string
5+
clusterName: string
6+
namespace: string
7+
appStatus: string
8+
syncStatus?: string
9+
clusterId?: string
10+
}
11+
export interface ArgoAppListResponse extends ArgoAppListResult {
12+
result?: ArgoAppListResult
13+
}
14+
15+
export interface AppEnvironmentDetail {
16+
environmentName: string
17+
environmentId: number
18+
namespace: string
19+
clusterName: string
20+
clusterId: number
21+
isVirtualEnvironment?: boolean
22+
}
23+
24+
export interface HelmApp {
25+
appName: string
26+
appId: string
27+
isExternal: boolean
28+
chartName: string
29+
chartVersion: string
30+
chartAvatar: string
31+
projectId: number
32+
lastDeployedAt: string
33+
environmentDetail: AppEnvironmentDetail
34+
appStatus: string
35+
}
36+
37+
interface AppsListResult {
38+
clusterIds: number[]
39+
applicationType: string // DEVTRON-CHART-STORE, DEVTRON-APP ,HELM-APP
40+
errored: boolean
41+
errorMsg: string
42+
helmApps: HelmApp[]
43+
}
44+
45+
export interface AppListResponse extends ResponseType {
46+
result?: AppsListResult
47+
}

0 commit comments

Comments
 (0)