diff --git a/ui/src/layout/AssetScans/AssetScanDetails.js b/ui/src/layout/AssetScans/AssetScanDetails.js index b0ecbf0eb..8e0e8d153 100644 --- a/ui/src/layout/AssetScans/AssetScanDetails.js +++ b/ui/src/layout/AssetScans/AssetScanDetails.js @@ -56,7 +56,7 @@ const AssetScanDetails = () => ( return ({ title: target?.targetInfo?.instanceID, - subTitle: `scanned by ${scanConfigSnapshot?.name} on ${formatDate(startTime)}` + subTitle: `scanned by '${scanConfigSnapshot?.name}' on ${formatDate(startTime)}` }) }} detailsContent={props => } diff --git a/ui/src/layout/AssetScans/TabAssetScanDetails.js b/ui/src/layout/AssetScans/TabAssetScanDetails.js index c793e0d33..0af2afd52 100644 --- a/ui/src/layout/AssetScans/TabAssetScanDetails.js +++ b/ui/src/layout/AssetScans/TabAssetScanDetails.js @@ -10,6 +10,8 @@ import { formatDate, calculateDuration } from 'utils/utils'; import { SCANS_PATHS } from 'layout/Scans'; import StatusIndicator from './StatusIndicator'; +import COLORS from 'utils/scss_variables.module.scss'; + const STATUS_DISPLAY_ITEMS = [ VULNERABIITY_FINDINGS_ITEM, ...Object.values(FINDINGS_MAPPING).filter(({value}) => value !== FINDINGS_MAPPING.PACKAGES.value) @@ -59,7 +61,10 @@ const TabAssetScanDetails = ({data}) => { rightPlaneDisplay={() => ( <> Asset scan status - + + + +
{ STATUS_DISPLAY_ITEMS.map(({dataKey, title}) => { const {state, errors} = (status || {})[dataKey] || {}; diff --git a/ui/src/layout/Findings/Exploits/ExploitDetails.js b/ui/src/layout/Findings/Exploits/ExploitDetails.js index 114a680c4..a09cfa961 100644 --- a/ui/src/layout/Findings/Exploits/ExploitDetails.js +++ b/ui/src/layout/Findings/Exploits/ExploitDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: EXPLOIT_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: EXPLOIT_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Malware/MalwareDetails.js b/ui/src/layout/Findings/Malware/MalwareDetails.js index 3f1971069..fdfcb6b30 100644 --- a/ui/src/layout/Findings/Malware/MalwareDetails.js +++ b/ui/src/layout/Findings/Malware/MalwareDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: MALWARE_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: MALWARE_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Misconfigurations/MisconfigurationDetails.js b/ui/src/layout/Findings/Misconfigurations/MisconfigurationDetails.js index 3a38afca3..242ac62c7 100644 --- a/ui/src/layout/Findings/Misconfigurations/MisconfigurationDetails.js +++ b/ui/src/layout/Findings/Misconfigurations/MisconfigurationDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: MISCONFIGURATION_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: MISCONFIGURATION_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Packages/PackageDetails.js b/ui/src/layout/Findings/Packages/PackageDetails.js index 03a02b211..711caa362 100644 --- a/ui/src/layout/Findings/Packages/PackageDetails.js +++ b/ui/src/layout/Findings/Packages/PackageDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: PACKAGE_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: PACKAGE_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Rootkits/RootkitDetails.js b/ui/src/layout/Findings/Rootkits/RootkitDetails.js index 4d7c28aa1..9db62e309 100644 --- a/ui/src/layout/Findings/Rootkits/RootkitDetails.js +++ b/ui/src/layout/Findings/Rootkits/RootkitDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: ROOTKIT_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: ROOTKIT_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Secrets/SecretDetails.js b/ui/src/layout/Findings/Secrets/SecretDetails.js index 00fe1378e..3f9514a49 100644 --- a/ui/src/layout/Findings/Secrets/SecretDetails.js +++ b/ui/src/layout/Findings/Secrets/SecretDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: SECRET_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: SECRET_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/Findings/Vulnerabilities/VulnerabilityDetails.js b/ui/src/layout/Findings/Vulnerabilities/VulnerabilityDetails.js index 67cb897fa..e4216cf9b 100644 --- a/ui/src/layout/Findings/Vulnerabilities/VulnerabilityDetails.js +++ b/ui/src/layout/Findings/Vulnerabilities/VulnerabilityDetails.js @@ -31,13 +31,13 @@ const DetailsContent = ({data}) => { id: "asset", title: "Asset details", path: VULNERABILITY_DETAILS_PATHS.ASSET_DETAILS, - component: () => + component: () => }, { id: "scan", title: "Scan details", path: VULNERABILITY_DETAILS_PATHS.SCAN_DETAILS, - component: () => + component: () => } ]} withInnerPadding={false} diff --git a/ui/src/layout/detail-displays/AssetDetails/index.js b/ui/src/layout/detail-displays/AssetDetails/index.js index d6d77ad85..1ceea8da7 100644 --- a/ui/src/layout/detail-displays/AssetDetails/index.js +++ b/ui/src/layout/detail-displays/AssetDetails/index.js @@ -47,15 +47,17 @@ const AssetScansDisplay = ({assetName, targetId}) => { ) } -const AssetDetails = ({assetData, withAssetScansLink=false}) => { +const AssetDetails = ({assetData, withAssetLink=false, withAssetScansLink=false}) => { + const navigate = useNavigate(); + const {id, targetInfo} = assetData; const {instanceID, objectType, location} = targetInfo || {}; - + return ( ( <> - Asset + navigate(`${ROUTES.ASSETS}/${id}`) : undefined}>Asset {instanceID} {objectType} diff --git a/ui/src/layout/detail-displays/ScanDetails/index.js b/ui/src/layout/detail-displays/ScanDetails/index.js index 0c8c8efea..12a959639 100644 --- a/ui/src/layout/detail-displays/ScanDetails/index.js +++ b/ui/src/layout/detail-displays/ScanDetails/index.js @@ -5,13 +5,14 @@ import DoublePaneDisplay from 'components/DoublePaneDisplay'; import Title from 'components/Title'; import ScanProgressBar from 'components/ScanProgressBar'; import Button from 'components/Button'; +import { SCANS_PATHS } from 'layout/Scans'; import ConfigurationReadOnlyDisplay from 'layout/Scans/ConfigurationReadOnlyDisplay'; import { formatDate, calculateDuration, formatNumber } from 'utils/utils'; import { ROUTES } from 'utils/systemConsts'; import { useFilterDispatch, setFilters, FILTER_TYPES } from 'context/FiltersProvider'; import ConfigurationAlertLink from './ConfigurationAlertLink'; -const ScanDetails = ({scanData, withAssetScansLink=false}) => { +const ScanDetails = ({scanData, withScanLink=false, withAssetScansLink=false}) => { const {pathname} = useLocation(); const navigate = useNavigate(); const filtersDispatch = useFilterDispatch(); @@ -46,7 +47,7 @@ const ScanDetails = ({scanData, withAssetScansLink=false}) => { )} rightPlaneDisplay={() => ( <> - Status + navigate(`${ROUTES.SCANS}/${SCANS_PATHS.SCANS}/${id}`) : undefined}>Scan