Skip to content

Commit 8984250

Browse files
authored
Merge pull request #2084 from devtron-labs/feat/security-policy
feat: add column for security policy in security modal
2 parents c74193d + bbc34b3 commit 8984250

File tree

14 files changed

+38
-42
lines changed

14 files changed

+38
-42
lines changed

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.16",
7+
"@devtron-labs/devtron-fe-common-lib": "0.3.17",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/components/ApplicationGroup/AppGroup.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export const getEnvAppList = (
197197
signal?: AbortSignal,
198198
): Promise<EnvAppType> => {
199199
const options = signal ? { signal } : null
200-
const { searchKey = '', cluster = [], offset = 0, pageSize = 20 } = filterConfig ?? {}
200+
const { searchKey = '', cluster = [], offset, pageSize } = filterConfig ?? {}
201201
const params: GetEnvAppListParamsType = {
202202
envName: searchKey,
203203
clusterIds: cluster?.join(),

src/components/ClusterNodes/ClusterOverview.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ function ClusterOverview({ isSuperAdmin, selectedCluster }: ClusterOverviewProps
205205
errorType: _nodeError,
206206
filterText: clusterCapacityResponse.value.result.nodeErrors[_nodeError],
207207
})
208-
setClusterErrorList(_errorList)
209208
}
210209
}
210+
if (_errorList.length > 0) {
211+
setClusterErrorList(_errorList)
212+
}
211213
} else {
212214
setErrorCode(clusterCapacityResponse.reason['code'])
213215
}
@@ -259,7 +261,7 @@ function ClusterOverview({ isSuperAdmin, selectedCluster }: ClusterOverviewProps
259261
return
260262
}
261263
return (
262-
<div className="mb-16 dc__border br-4 pt-12">
264+
<div className="mb-16 dc__border br-4 pt-12 bcn-0">
263265
<div className="flexbox pointer mb-12 pl-16 pr-16">
264266
<Error className="mt-2 mb-2 mr-8 icon-dim-20" />
265267
<span className="fw-6 fs-13 cn-9 mr-16">

src/components/ResourceBrowser/ResourceList/ResourceBrowserActionMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ const ResourceBrowserActionMenu: React.FC<ResourceBrowserActionMenuType> = ({
195195
isLoading={resourceScanLoading}
196196
error={resourceScanError}
197197
responseData={resourceScanResponse?.result}
198+
hidePolicy
198199
/>
199200
)}
200201
</>

src/components/app/details/appDetails/AppSecurity.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ export const useGetAppSecurityDetails = ({
3636
)
3737

3838
const [executionDetailsLoading, executionDetailsResponse, executionDetailsError, reloadExecutionDetails] = useAsync(
39-
() =>
40-
getExecutionDetails(appId && artifactId ? { appId, artifactId } : { appId, envId, imageScanDeployInfoId }),
39+
() => getExecutionDetails(artifactId ? { appId, envId, artifactId } : { appId, envId, imageScanDeployInfoId }),
4140
[appId, envId, imageScanDeployInfoId, artifactId],
4241
!isSecurityScanV2Enabled && !!appId,
4342
)

src/components/app/details/appDetails/SecurityVulnerabilityCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export const SecurityVulnerabilityCard = ({
197197
isLoading={scanDetailsLoading}
198198
error={scanDetailsError}
199199
responseData={scanDetailsResponse?.result}
200+
hidePolicy
200201
/>
201202
)}
202203
</button>

src/components/app/details/cIDetails/CIDetails.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ const SecurityTab = ({ ciPipelineId, artifactId, status, appIdFromParent }: Secu
744744
SecurityModalSidebar={SecurityModalSidebar}
745745
isSecurityScanV2Enabled={isSecurityScanV2Enabled}
746746
responseData={isSecurityScanV2Enabled ? scanResultResponse?.result : parseExecutionDetailResponse(executionDetailsResponse?.result)}
747+
hidePolicy
747748
/>
748749
</div>
749750
)

src/components/app/details/triggerView/cdMaterial.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ const CDMaterial = ({
15771577
isSecurityModuleInstalled={state.isSecurityModuleInstalled}
15781578
artifactId={+mat.id}
15791579
applicationId={appId}
1580+
environmentId={envId}
15801581
changesCard={renderGitMaterialInfo(mat)}
15811582
isScanned={mat.scanned}
15821583
isScanEnabled={mat.scanEnabled}

src/components/v2/appDetails/k8Resource/nodeType/NodeDelete.component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ const NodeDeleteComponent = ({ nodeDetails, appDetails, isDeploymentBlocked }: N
221221
isLoading={resourceScanLoading}
222222
error={resourceScanError}
223223
responseData={resourceScanResponse?.result}
224+
hidePolicy
224225
/>
225226
)}
226227
{renderDeleteResourcePopup()}

src/components/v2/appDetails/sourceInfo/environmentStatus/EnvironmentStatus.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const EnvironmentStatusComponent = ({
202202
{renderLastUpdatedBlock()}
203203
{renderChartUsedBlock()}
204204
{renderUpgraderChartBlock()}
205-
{isScanV2Enabled && <SecurityVulnerabilityCard cardLoading={cardLoading} installedAppId={appDetails?.installedAppId} />}
205+
{isScanV2Enabled && appDetails?.appType === AppType.DEVTRON_HELM_CHART && <SecurityVulnerabilityCard cardLoading={cardLoading} installedAppId={appDetails?.installedAppId} />}
206206
</div>
207207
)}
208208
{showAppStatusDetail && (

0 commit comments

Comments
 (0)