Skip to content

Commit ed87255

Browse files
committed
feat: add deployment chart uploaded by devtron in service
1 parent af7524c commit ed87255

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/Pages/GlobalConfigurations/DeploymentCharts/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface DeploymentChartVersionsType
1414
description: string
1515
}
1616

17-
export interface DeploymentChartType extends Pick<DeploymentChartInfo, 'name' | 'isUserUploaded'> {
17+
export interface DeploymentChartType extends Pick<DeploymentChartInfo, 'name'> {
1818
versions: DeploymentChartVersionsType[]
1919
}
2020

src/Pages/GlobalConfigurations/DeploymentCharts/utils.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@ export const convertDeploymentChartListToChartType = (data: DeploymentChartListD
1717
id,
1818
version,
1919
description,
20-
uploadedBy,
20+
uploadedBy: isUserUploaded ? uploadedBy : 'Devtron',
2121
isUserUploaded,
2222
})
2323
} else {
2424
acc[name] = {
2525
name,
26-
isUserUploaded,
27-
versions: [{ id, version, description, uploadedBy, isUserUploaded }],
26+
versions: [
27+
{
28+
id,
29+
version,
30+
description,
31+
uploadedBy: isUserUploaded ? uploadedBy : 'Devtron',
32+
isUserUploaded,
33+
},
34+
],
2835
}
2936
}
3037
return acc

0 commit comments

Comments
 (0)