Fleet UI: Suface SHA256 in software details modal (#29408)
This commit is contained in:
@@ -196,6 +196,14 @@ const DEFAULT_HOST_SOFTWARE_MOCK: IHostSoftware = {
|
||||
last_opened_at: "2022-01-01T12:00:00Z",
|
||||
vulnerabilities: ["CVE-2020-0001"],
|
||||
installed_paths: ["/Applications/mock.app"],
|
||||
bundle_identifier: "com.mock.software",
|
||||
signature_information: [
|
||||
{
|
||||
installed_path: "/Applications/mock.app",
|
||||
team_identifier: "12345TEAMIDENT",
|
||||
hash_sha256: "mockhashhere",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -362,11 +362,19 @@ export interface IAppLastInstall {
|
||||
installed_at: string;
|
||||
}
|
||||
|
||||
interface SignatureInformation {
|
||||
installed_path: string;
|
||||
team_identifier: string;
|
||||
hash_sha256: string | null;
|
||||
}
|
||||
|
||||
export interface ISoftwareInstallVersion {
|
||||
version: string;
|
||||
bundle_identifier: string;
|
||||
last_opened_at: string | null;
|
||||
vulnerabilities: string[] | null;
|
||||
installed_paths: string[];
|
||||
signature_information: SignatureInformation[];
|
||||
}
|
||||
|
||||
export interface IHostSoftwarePackage {
|
||||
|
||||
+20
-1
@@ -47,7 +47,13 @@ const SoftwareDetailsInfo = ({
|
||||
source,
|
||||
bundleIdentifier,
|
||||
}: ISoftwareDetailsInfoProps) => {
|
||||
const { vulnerabilities, installed_paths } = installedVersion;
|
||||
const {
|
||||
vulnerabilities,
|
||||
installed_paths,
|
||||
signature_information,
|
||||
} = installedVersion;
|
||||
|
||||
const { hash_sha256: sha256 } = signature_information[0];
|
||||
|
||||
return (
|
||||
<div className={`${baseClass}__details-info`}>
|
||||
@@ -79,6 +85,19 @@ const SoftwareDetailsInfo = ({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{sha256 && (
|
||||
<div className={`${baseClass}__row`}>
|
||||
<DataSet
|
||||
className={`${baseClass}__hash-sha256-data-set`}
|
||||
title="Hash"
|
||||
value={
|
||||
<div className={`${baseClass}__hash-sha256-value`}>
|
||||
<span>{sha256}</span>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{vulnerabilities && vulnerabilities.length !== 0 && (
|
||||
<div className={`${baseClass}__row`}>
|
||||
<DataSet
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
gap: $pad-xxlarge;
|
||||
}
|
||||
|
||||
&__file-path-data-set {
|
||||
&__file-path-data-set,
|
||||
&__hash-sha256-data-set {
|
||||
// These following 100% widths are to make sure the text does not
|
||||
// overflow from the modal. TODO: Need to look at DataSet component to see why
|
||||
// it overflows.
|
||||
@@ -33,7 +34,8 @@
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
&__file-path-values {
|
||||
&__file-path-values,
|
||||
&__hash-sha256-value {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $pad-small;
|
||||
|
||||
Reference in New Issue
Block a user