Skip to content

Commit d8f7911

Browse files
committed
fix: update resource conflict routes and payload structure for redeployment
1 parent 2bb1aed commit d8f7911

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

src/Common/Constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export const ROUTES = {
162162
LICENSE_DATA: 'license/data',
163163
ENV: 'env',
164164
APP_METADATA: 'app-metadata',
165-
RESOURCE_CONFLICTS_LIST: 'app/template/helm-ownership-conflicts',
165+
RESOURCE_CONFLICTS_LIST: 'app/:appId/cd-pipeline/:pipelineId/history/:wfrId/helm-ownership-conflicts',
166166
} as const
167167

168168
export enum KEY_VALUE {

src/Shared/Components/CICDHistory/service.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
/* eslint-disable dot-notation */
18+
import { generatePath } from 'react-router-dom'
1819
import moment from 'moment'
1920

2021
import { ToastManager, ToastVariantType } from '@Shared/Services'
@@ -39,7 +40,6 @@ import {
3940
DeploymentStatusDetailsResponse,
4041
FetchIdDataStatus,
4142
GetResourceConflictDetailsParamsType,
42-
GetResourceListItemPayloadType,
4343
ModuleConfigResponse,
4444
ResourceConflictItemType,
4545
ResourceConflictListItemDTO,
@@ -319,7 +319,7 @@ export const resourceConflictRedeploy = async ({
319319
pipelineId: +pipelineId,
320320
wfrIdForDeploymentWithSpecificTrigger: +triggerId,
321321
appId: +appId,
322-
redeployHelmReleaseWithTakeOwnership: true,
322+
helmRedeploymentRequest: true,
323323
})
324324

325325
ToastManager.showToast({
@@ -335,13 +335,12 @@ export const getResourceConflictDetails = async ({
335335
triggerId,
336336
signal,
337337
}: GetResourceConflictDetailsParamsType): Promise<ResourceConflictItemType[]> => {
338-
const { result } = await post<ResourceConflictListItemDTO, GetResourceListItemPayloadType>(
339-
ROUTES.RESOURCE_CONFLICTS_LIST,
340-
{
341-
appId: +appId,
342-
pipelineId: +pipelineId,
343-
wfrId: +triggerId,
344-
},
338+
const { result } = await get<ResourceConflictListItemDTO>(
339+
generatePath(ROUTES.RESOURCE_CONFLICTS_LIST, {
340+
appId,
341+
pipelineId,
342+
wfrId: triggerId,
343+
}),
345344
{ signal },
346345
)
347346

src/Shared/Components/CICDHistory/types.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -912,20 +912,14 @@ export interface ResourceConflictRedeployPayloadType {
912912
pipelineId: number
913913
appId: number
914914
wfrIdForDeploymentWithSpecificTrigger: number
915-
redeployHelmReleaseWithTakeOwnership: true
915+
helmRedeploymentRequest: true
916916
}
917917

918918
export interface GetResourceConflictDetailsParamsType
919919
extends Pick<ResourceConflictDeployDialogURLParamsType, 'pipelineId' | 'triggerId' | 'appId'> {
920920
signal: AbortSignal
921921
}
922922

923-
export interface GetResourceListItemPayloadType {
924-
pipelineId: number
925-
appId: number
926-
wfrId: number
927-
}
928-
929923
export interface ResourceConflictListItemDTO {
930924
clusterId: number
931925
conflictingResources: {

0 commit comments

Comments
 (0)