Skip to content

Commit b528367

Browse files
committed
chore: version bump
1 parent faf95a9 commit b528367

3 files changed

Lines changed: 18 additions & 21 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.23.3-beta-17",
3+
"version": "1.23.3-beta-18",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.tsx

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@ import { SecurityModal } from '../SecurityModal'
2626
import { DEFAULT_SECURITY_MODAL_IMAGE_STATE } from '../SecurityModal/constants'
2727
import { CATEGORIES, SecurityModalStateType, SUB_CATEGORIES } from '../SecurityModal/types'
2828
import { ScanCategories, ScanSubCategories } from '../types'
29-
import {
30-
getCompiledSecurityThreats,
31-
getSecurityConfig,
32-
getSecurityScanStatus,
33-
getStatusForScanList,
34-
getTotalSeverities,
35-
} from '../utils'
29+
import { getCompiledSecurityThreats, getSecurityConfig, getStatusForScanList, getTotalSeverities } from '../utils'
3630
import { ReportTabEmptyState } from './ReportTabEmptyState'
3731
import SecurityCard from './SecurityCard'
3832
import { SecurityCardProps, SecurityDetailsCardsProps } from './types'
@@ -46,7 +40,6 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
4640

4741
const scanThreats = getCompiledSecurityThreats(scanResult)
4842
const threatCount = getTotalSeverities(scanThreats)
49-
const securityScanStatus = getSecurityScanStatus(scanResult)
5043

5144
const getScanToolInfo = (category: string): { scanToolName: string; scanToolUrl: string } => {
5245
const image = imageScan?.vulnerability?.list?.[0]
@@ -77,9 +70,20 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
7770
</div>
7871
)
7972

80-
console.log('securityScanStatus', securityScanStatus, threatCount)
73+
if (!scanResult?.scanned) {
74+
return (
75+
<div className="flexbox-col dc__gap-12 mw-600 dc__mxw-1000">
76+
{renderHeader()}
77+
78+
<ReportTabEmptyState
79+
title={EMPTY_STATE_STATUS.CI_DETAILS_IMAGE_NOT_SCANNED.TITLE}
80+
subtitle={EMPTY_STATE_STATUS.CI_DETAILS_IMAGE_NOT_SCANNED.SUBTITLE}
81+
/>
82+
</div>
83+
)
84+
}
8185

82-
if (!threatCount && securityScanStatus === 'Completed') {
86+
if (!threatCount) {
8387
return (
8488
<div className="flexbox-col dc__gap-12 mw-600 dc__mxw-1000">
8589
{renderHeader()}
@@ -170,14 +174,7 @@ const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps
170174
return (
171175
<div className="flexbox-col dc__gap-12" key={category}>
172176
{renderHeader(category)}
173-
{!scanResult?.scanned ? (
174-
<ReportTabEmptyState
175-
title={EMPTY_STATE_STATUS.CI_DETAILS_IMAGE_NOT_SCANNED.TITLE}
176-
subtitle={EMPTY_STATE_STATUS.CI_DETAILS_IMAGE_NOT_SCANNED.SUBTITLE}
177-
/>
178-
) : (
179-
renderSecurityCards({ category, categoryFailed })
180-
)}
177+
{renderSecurityCards({ category, categoryFailed })}
181178
</div>
182179
)
183180
})}

0 commit comments

Comments
 (0)