Skip to content

Commit e03fc47

Browse files
committed
Merge branch 'main' of github.com:devtron-labs/dashboard into feat/catalog-dependencies
2 parents b4fb356 + 0a9e6fb commit e03fc47

Some content is hidden

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

52 files changed

+2350
-757
lines changed
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading

src/assets/icons/ic-hibernate-3.svg

Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading

src/assets/icons/ic-secure.svg

Lines changed: 17 additions & 0 deletions
Loading

src/assets/icons/ic-unhibernate.svg

Lines changed: 5 additions & 0 deletions
Loading

src/components/ApplicationGroup/AppGroup.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
CheckPermissionResponse,
2020
CheckPermissionType,
2121
ConfigAppListType,
22+
EditDescRequestResponse,
2223
EnvAppType,
2324
EnvDeploymentStatusType,
2425
EnvGroupListResponse,
@@ -193,7 +194,7 @@ export const getAppGroupList = (envId: number): Promise<AppGroupList> => {
193194
return get(`${Routes.APP_LIST_GROUP}/${envId}`)
194195
}
195196

196-
export const getEnvGroupList = (envId: number, filterParentType?:string): Promise<EnvGroupListResponse> => {
197+
export const getEnvGroupList = (envId: number, filterParentType?:string): Promise<EnvGroupListResponse> => {
197198
let filterParentTypeQuery = ''
198199
if (filterParentType) {
199200
filterParentTypeQuery = `?groupType=${filterParentType}`
@@ -223,3 +224,7 @@ export const deleteEnvGroup = (envId: string, groupId: string, filterParentType?
223224
}
224225
return trash(`${Routes.ENVIRONMENT}/${envId}/${Routes.GROUP}/${groupId}${filterParentTypeQuery}`)
225226
}
227+
228+
export const editDescription = (payload): Promise<EditDescRequestResponse> => {
229+
return put(Routes.ENVIRONMENT, payload)
230+
}

src/components/ApplicationGroup/AppGroup.types.ts

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@devtron-labs/devtron-fe-common-lib'
88
import { MultiValue } from 'react-select'
99
import { WebhookPayloads, WorkflowNodeType, WorkflowType } from '../app/details/triggerView/types'
10-
import { OptionType } from '../app/types'
10+
import { EditDescRequest, OptionType } from '../app/types'
1111
import { AppFilterTabs, BulkResponseStatus } from './Constants'
1212

1313
interface BulkTriggerAppDetailType {
@@ -205,8 +205,11 @@ export interface AppInfoListType {
205205
appStatus: string
206206
deploymentStatus: string
207207
lastDeployed: string
208+
lastDeployedImage?: string
209+
lastDeployedBy?: string
208210
appId: number
209211
envId: number
212+
pipelineId?: number
210213
}
211214

212215
export interface AppListDataType {
@@ -267,6 +270,9 @@ export interface AppGroupDetailDefaultType {
267270
appGroupListData?: AppGroupListType
268271
isVirtualEnv?: boolean
269272
envName?: string
273+
description?: string
274+
getAppListData?: () => Promise<void>
275+
handleSaveDescription?: (description: string) => Promise<void>
270276
}
271277

272278
interface CIPipeline {
@@ -323,6 +329,8 @@ export interface ApplistEnvType {
323329
appName: string
324330
appStatus: string
325331
lastDeployedTime: string
332+
lastDeployedBy?: string
333+
lastDeployedImage?: string
326334
}
327335

328336
export interface AppGroupListType {
@@ -331,6 +339,11 @@ export interface AppGroupListType {
331339
clusterName: string
332340
environmentId: number
333341
apps: ApplistEnvType[]
342+
description?: string
343+
environmentType?: 'Non-Production' | 'Production'
344+
createdOn?: string
345+
createdBy?: string
346+
clusterId?: number
334347
}
335348
export interface ConfigAppListType extends ResponseType {
336349
result?: ConfigAppList[]
@@ -388,7 +401,57 @@ export interface SearchBarType {
388401
setSearchApplied: React.Dispatch<React.SetStateAction<boolean>>
389402
}
390403

404+
export interface EditDescRequestResponse extends ResponseType {
405+
result?: EditDescRequest
406+
}
407+
391408
export enum FilterParentType {
392409
app = 'env-group',
393410
env = 'app-group',
394-
}
411+
}
412+
413+
export interface HibernateStatusRowType {
414+
rowData: HibernateResponseRowType
415+
index: number
416+
isHibernateOperation: boolean
417+
isVirtualEnv?: boolean
418+
}
419+
420+
export interface HibernateResponseRowType {
421+
id: number
422+
appName: string
423+
success: boolean
424+
authError?: boolean
425+
error?: string
426+
skipped?: string
427+
}
428+
429+
export interface BaseModalProps {
430+
selectedAppIds: number[]
431+
envName: string
432+
envId: string
433+
setAppStatusResponseList: React.Dispatch<React.SetStateAction<any[]>>
434+
setShowHibernateStatusDrawer: React.Dispatch<React.SetStateAction<StatusDrawer>>
435+
}
436+
437+
export interface HibernateModalProps extends BaseModalProps {
438+
setOpenHiberateModal: React.Dispatch<React.SetStateAction<boolean>>
439+
}
440+
441+
export interface UnhibernateModalProps extends BaseModalProps {
442+
setOpenUnhiberateModal: React.Dispatch<React.SetStateAction<boolean>>
443+
}
444+
445+
export interface StatusDrawer {
446+
hibernationOperation: boolean
447+
showStatus: boolean
448+
}
449+
450+
export interface ManageAppsResponse {
451+
appName: string
452+
id: number
453+
success: boolean
454+
skipped?: string
455+
error?: string
456+
authError?: boolean
457+
}

src/components/ApplicationGroup/AppGroupAppFilter.components.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const Option = (props): JSX.Element => {
8282
}
8383

8484
const renderOptionIcon = (): JSX.Element => {
85+
8586
if (selectedFilterTab === AppFilterTabs.APP_FILTER) {
8687
if (props.isSelected || props.isFocused) {
8788
return (
@@ -92,7 +93,9 @@ export const Option = (props): JSX.Element => {
9293
)
9394
}
9495
} else {
95-
if (props.isFocused) {
96+
// hide edit and delete icon for predefined filter
97+
if (props.isFocused && props.data.value !== props.data.label) {
98+
// for predefined filter, value and label are same (done in fe)
9699
return (
97100
<div className="flex">
98101
<Tippy className="default-tt" arrow={false} content="Edit group">

0 commit comments

Comments
 (0)