Skip to content

Commit 4a70284

Browse files
authored
Merge branch 'develop' into chore/revamp-manifest-component-header
2 parents 041c682 + a53c4c8 commit 4a70284

File tree

101 files changed

+3217
-5138
lines changed

Some content is hidden

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

101 files changed

+3217
-5138
lines changed

.eslintignore

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.eslintrc.js
66
vite.config.mts
77

8-
# The following files have eslint errors/warningssrc/App.tsx
8+
# The following files have eslint errors/warnings
99
src/App.tsx
1010
src/Pages/GlobalConfigurations/Authorization/APITokens/__tests__/ApiTokens.test.tsx
1111
src/components/AppSelector/AppSelector.tsx
@@ -82,9 +82,7 @@ src/components/ClusterNodes/constants.ts
8282
src/components/Hotjar/Hotjar.tsx
8383
src/components/Jobs/ExpandedRow/ExpandedRow.tsx
8484
src/components/Jobs/JobDetails/JobDetails.tsx
85-
src/components/Jobs/JobList/JobListContainer.tsx
8685
src/components/Jobs/JobList/JobListView.tsx
87-
src/components/Jobs/JobList/JobsList.tsx
8886
src/components/Jobs/Jobs.tsx
8987
src/components/Jobs/JobsEmptyState.tsx
9088
src/components/Jobs/Service.ts
@@ -159,16 +157,12 @@ src/components/app/details/triggerView/workflow/nodes/triggerCINode.tsx
159157
src/components/app/details/triggerView/workflow/nodes/triggerPrePostCDNode.tsx
160158
src/components/app/details/triggerView/workflow/nodes/workflow.utils.tsx
161159
src/components/app/grepSSEworker.ts
162-
src/components/app/list-new/AppList.tsx
163160
src/components/app/list-new/AppListService.ts
164161
src/components/app/list-new/GenericAppList.tsx
165162
src/components/app/list-new/HelmAppList.tsx
166-
src/components/app/list/AppListView.tsx
167-
src/components/app/list/DevtronAppListContainer.tsx
168163
src/components/app/list/TriggerUrl.tsx
169164
src/components/app/list/__tests__/AppListView.test.tsx
170165
src/components/app/list/appList.modal.ts
171-
src/components/app/list/appStatus/AppStatus.tsx
172166
src/components/app/list/emptyView/Empty.tsx
173167
src/components/app/list/expandedRow/ExpandedRow.tsx
174168
src/components/app/service.ts
@@ -286,7 +280,6 @@ src/components/common/eaEmptyState/EAEmptyState.tsx
286280
src/components/common/edge/rectangularEdge.tsx
287281
src/components/common/edge/straightEdge.tsx
288282
src/components/common/errorBoundary.tsx
289-
src/components/common/filter/filters.tsx
290283
src/components/common/formFields/CopyButton.tsx
291284
src/components/common/formFields/CustomPassword.tsx
292285
src/components/common/formFields/DevtronSwitch.tsx
@@ -417,7 +410,6 @@ src/components/v2/appDetails/appDetails.store.ts
417410
src/components/v2/appDetails/appDetails.type.ts
418411
src/components/v2/appDetails/ea/EAAppDetail.component.tsx
419412
src/components/v2/appDetails/k8Resource/FilterResource.tsx
420-
src/components/v2/appDetails/k8Resource/K8Resource.component.tsx
421413
src/components/v2/appDetails/k8Resource/NodeTreeTabList.tsx
422414
src/components/v2/appDetails/k8Resource/nodeDetail/EphemeralContainerDrawer.tsx
423415
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetail.component.tsx
@@ -440,7 +432,6 @@ src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.util.ts
440432
src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx
441433
src/components/v2/appDetails/k8Resource/nodeType/NodeDelete.component.tsx
442434
src/components/v2/appDetails/k8Resource/nodeType/NodeTree.component.tsx
443-
src/components/v2/appDetails/k8Resource/nodeType/PodHeader.component.tsx
444435
src/components/v2/appDetails/k8Resource/nodeType/PodTabSection.tsx
445436
src/components/v2/appDetails/k8Resource/nodeType/__tests__/NodeTree.component.test.ts
446437
src/components/v2/appDetails/k8Resource/nodeType/nodeType.util.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.3.6",
7+
"@devtron-labs/devtron-fe-common-lib": "0.3.7",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export default function App() {
9898
}
9999
} else {
100100
didMountRef.current = true
101+
// Removing any toast explicitly due to race condition of offline toast for some users
102+
ToastManager.dismissToast(onlineToastRef.current)
101103
}
102104
}, [isOnline])
103105

-63.1 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading

src/components/ApplicationGroup/AppGroup.service.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ import {
2424
PipelineType,
2525
CommonNodeAttr,
2626
WorkflowType,
27+
getUrlWithSearchParams,
2728
} from '@devtron-labs/devtron-fe-common-lib'
2829
import { CdPipelineResult, CiPipelineResult, WorkflowResult, CiPipeline } from '../app/details/triggerView/types'
2930
import { WebhookListResponse } from '../ciPipeline/Webhook/types'
3031
import { processWorkflow } from '../app/details/triggerView/workflow.service'
3132
import { WorkflowTrigger } from '../app/details/triggerView/config'
3233
import { ModuleNameMap, Routes, URLS } from '../../config'
3334
import {
35+
AppGroupFilterConfig,
3436
AppGroupList,
3537
CIConfigListType,
3638
CheckPermissionResponse,
@@ -41,6 +43,7 @@ import {
4143
EnvDeploymentStatusType,
4244
EnvGroupListResponse,
4345
EnvGroupResponse,
46+
GetEnvAppListParamsType,
4447
WorkflowsResponseType,
4548
} from './AppGroup.types'
4649
import { getModuleConfigured } from '../app/details/appDetails/appDetails.service'
@@ -190,26 +193,20 @@ export const getConfigAppList = (envId: number, appIds: string): Promise<ConfigA
190193
}
191194

192195
export const getEnvAppList = (
193-
params?: {
194-
envName?: string
195-
clusterIds?: string
196-
offset?: string
197-
size?: string
198-
},
196+
filterConfig?: Partial<AppGroupFilterConfig>,
199197
signal?: AbortSignal,
200198
): Promise<EnvAppType> => {
201199
const options = signal ? { signal } : null
202-
203-
if (params) {
204-
const urlParams = Object.entries(params).map(([key, value]) => {
205-
if (!value) {
206-
return
207-
}
208-
return `${key}=${value}`
209-
})
210-
return get(`${Routes.ENVIRONMENT_APPS}?${urlParams.filter((s) => s).join('&')}`, options)
200+
const { searchKey = '', cluster = [], offset = 0, pageSize = 20 } = filterConfig ?? {}
201+
const params: GetEnvAppListParamsType = {
202+
envName: searchKey,
203+
clusterIds: cluster?.join(),
204+
offset,
205+
size: pageSize,
211206
}
212-
return get(Routes.ENVIRONMENT_APPS, options)
207+
208+
const url = getUrlWithSearchParams(Routes.ENVIRONMENT_APPS, params)
209+
return get(url, options)
213210
}
214211

215212
export const getDeploymentStatus = (envId: number, appIds: string): Promise<EnvDeploymentStatusType> => {

src/components/ApplicationGroup/AppGroup.types.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
AppInfoListType,
2828
GVKType,
2929
RuntimeParamsListItemType,
30+
UseUrlFiltersReturnType,
3031
} from '@devtron-labs/devtron-fe-common-lib'
3132
import { MultiValue } from 'react-select'
3233
import { WebhookPayloads } from '../app/details/triggerView/types'
@@ -254,9 +255,21 @@ export interface ApplicationRouteType {
254255
fetchEnvConfig: () => void
255256
}
256257

257-
export interface EnvironmentsListViewType {
258-
removeAllFilters: () => void
258+
export interface AppGroupFilterConfig
259+
extends Pick<UseUrlFiltersReturnType<never>, 'searchKey' | 'offset' | 'pageSize'> {
260+
cluster: string[]
261+
}
262+
263+
export interface GetEnvAppListParamsType extends Pick<AppGroupFilterConfig, 'offset'> {
264+
size: number
265+
envName: string
266+
clusterIds: string
267+
}
268+
269+
export interface EnvironmentsListViewType
270+
extends Pick<UseUrlFiltersReturnType<never>, 'changePage' | 'changePageSize' | 'clearFilters'> {
259271
isSuperAdmin: boolean
272+
filterConfig: AppGroupFilterConfig
260273
}
261274

262275
export interface EnvironmentLinkProps {
@@ -591,3 +604,9 @@ export interface ManageAppsResponseType {
591604
id: string
592605
error: string
593606
}
607+
608+
export enum AppGroupUrlFilters {
609+
cluster = 'cluster',
610+
}
611+
612+
export interface AppGroupUrlFiltersType extends Record<AppGroupUrlFilters, string[]> {}

0 commit comments

Comments
 (0)