Skip to content

Commit 23cf3f9

Browse files
author
Amrit Kashyap Borah
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into feat/rb-table
2 parents fbb3975 + 5628b6e commit 23cf3f9

18 files changed

Lines changed: 97 additions & 41 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.16.0-beta-6",
3+
"version": "1.16.0-pre-6",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,10 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
659659

660660
export enum DeploymentAppTypes {
661661
HELM = 'helm',
662-
GITOPS = 'argo_cd',
662+
ARGO = 'argo_cd',
663663
MANIFEST_DOWNLOAD = 'manifest_download',
664664
MANIFEST_PUSH = 'manifest_push',
665-
FLUX = 'flux',
665+
FLUX = 'flux_cd',
666666
}
667667

668668
export interface VulnerabilityType {

src/Shared/Components/AppStatusModal/AppStatusBody.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export const AppStatusBody = ({
192192
isVirtualEnvironment={appDetails.isVirtualEnvironment}
193193
appDetails={appDetails}
194194
rootClassName="pb-20"
195+
deploymentAppType={appDetails.deploymentAppType}
195196
/>
196197
)}
197198
</div>

src/Shared/Components/AppStatusModal/AppStatusModal.component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const AppStatusModal = ({
9999
}
100100
: null,
101101
isHelmApp: appDetails.appType === AppType.DEVTRON_HELM_CHART,
102+
deploymentAppType: appDetails.deploymentAppType,
102103
}),
103104
deploymentStatusAbortControllerRef,
104105
)

src/Shared/Components/AppStatusModal/service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const getDeploymentStatusWithTimeline = async ({
5151
showTimeline,
5252
virtualEnvironmentConfig,
5353
isHelmApp,
54+
deploymentAppType,
5455
}: GetDeploymentStatusWithTimelineParamsType): Promise<DeploymentStatusDetailsBreakdownDataType> => {
5556
const baseURL = isHelmApp ? ROUTES.HELM_DEPLOYMENT_STATUS_TIMELINE_INSTALLED_APP : ROUTES.DEPLOYMENT_STATUS
5657

@@ -68,5 +69,8 @@ export const getDeploymentStatusWithTimeline = async ({
6869

6970
return virtualEnvironmentConfig
7071
? virtualEnvironmentConfig.processVirtualEnvironmentDeploymentData(deploymentStatusDetailsResponse.result)
71-
: processDeploymentStatusDetailsData(deploymentStatusDetailsResponse.result)
72+
: processDeploymentStatusDetailsData(
73+
deploymentStatusDetailsResponse.result.deploymentAppType ?? deploymentAppType,
74+
deploymentStatusDetailsResponse.result,
75+
)
7276
}

src/Shared/Components/AppStatusModal/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FunctionComponent, PropsWithChildren, ReactNode } from 'react'
22

3-
import { APIOptions } from '@Common/Types'
3+
import { APIOptions, DeploymentAppTypes } from '@Common/Types'
44
import {
55
AppDetails,
66
ConfigDriftModalProps,
@@ -85,6 +85,7 @@ export type GetDeploymentStatusWithTimelineParamsType = Pick<APIOptions, 'abortC
8585
wfrId: AppDetails['resourceTree']['wfrId']
8686
}
8787
isHelmApp?: boolean
88+
deploymentAppType: DeploymentAppTypes
8889
}
8990

9091
export interface AppStatusModalTabListProps extends Pick<AppStatusModalProps, 'appDetails' | 'type'> {

src/Shared/Components/CICDHistory/DeploymentDetailSteps.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const DeploymentDetailSteps = ({
6161
const processedData =
6262
isVirtualEnv.current && processVirtualEnvironmentDeploymentData
6363
? processVirtualEnvironmentDeploymentData()
64-
: processDeploymentStatusDetailsData()
64+
: processDeploymentStatusDetailsData(deploymentAppType ?? appDetails?.deploymentAppType)
6565
const [deploymentStatusDetailsBreakdownData, setDeploymentStatusDetailsBreakdownData] =
6666
useState<DeploymentStatusDetailsBreakdownDataType>(processedData)
6767

@@ -115,7 +115,10 @@ const DeploymentDetailSteps = ({
115115
const processedDeploymentStatusDetailsData =
116116
isVirtualEnv.current && processVirtualEnvironmentDeploymentData
117117
? processVirtualEnvironmentDeploymentData(deploymentStatusDetailRes)
118-
: processDeploymentStatusDetailsData(deploymentStatusDetailRes)
118+
: processDeploymentStatusDetailsData(
119+
deploymentStatusDetailRes.deploymentAppType,
120+
deploymentStatusDetailRes,
121+
)
119122
clearDeploymentStatusTimer()
120123
// If deployment status is in progress then fetch data in every 10 seconds
121124

@@ -171,6 +174,7 @@ const DeploymentDetailSteps = ({
171174
isVirtualEnvironment={isVirtualEnv.current}
172175
appDetails={appDetails}
173176
rootClassName="p-20"
177+
deploymentAppType={deploymentStatusDetailsBreakdownData.deploymentAppType}
174178
/>
175179
</div>
176180
)

src/Shared/Components/CICDHistory/DeploymentStatusBreakdown.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { Fragment } from 'react'
1818

19+
import { DeploymentAppTypes } from '@Common/Types'
1920
import { TIMELINE_STATUS } from '@Shared/types'
2021

2122
import { InfoBlock } from '../InfoBlock'
@@ -29,6 +30,7 @@ const DeploymentStatusDetailBreakdown = ({
2930
isVirtualEnvironment,
3031
appDetails,
3132
rootClassName = '',
33+
deploymentAppType,
3234
}: DeploymentStatusDetailBreakdownType) => {
3335
const isHelmManifestPushed =
3436
deploymentStatusDetailsBreakdownData.deploymentStatusBreakdown[
@@ -58,8 +60,9 @@ const DeploymentStatusDetailBreakdown = ({
5860
{(
5961
[
6062
TIMELINE_STATUS.GIT_COMMIT,
61-
TIMELINE_STATUS.ARGOCD_SYNC,
62-
TIMELINE_STATUS.KUBECTL_APPLY,
63+
...(deploymentAppType === DeploymentAppTypes.ARGO
64+
? [TIMELINE_STATUS.ARGOCD_SYNC, TIMELINE_STATUS.KUBECTL_APPLY]
65+
: []),
6366
] as DeploymentStatusDetailRowType['type'][]
6467
).map((timelineStatus) => (
6568
<Fragment key={timelineStatus}>

src/Shared/Components/CICDHistory/TriggerOutput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ const HistoryLogs: React.FC<HistoryLogsProps> = ({
128128
deploymentAppType={deploymentAppType}
129129
userApprovalMetadata={userApprovalMetadata}
130130
isGitops={
131-
deploymentAppType === DeploymentAppTypes.GITOPS ||
131+
deploymentAppType === DeploymentAppTypes.ARGO ||
132+
deploymentAppType === DeploymentAppTypes.FLUX ||
132133
deploymentAppType === DeploymentAppTypes.MANIFEST_DOWNLOAD ||
133134
deploymentAppType === DeploymentAppTypes.MANIFEST_PUSH
134135
}

0 commit comments

Comments
 (0)