diff --git a/frontend/pages/hosts/details/cards/HostSummary/HostSummary.tsx b/frontend/pages/hosts/details/cards/HostSummary/HostSummary.tsx
index a39ad9a23b..6c3cb957ca 100644
--- a/frontend/pages/hosts/details/cards/HostSummary/HostSummary.tsx
+++ b/frontend/pages/hosts/details/cards/HostSummary/HostSummary.tsx
@@ -15,11 +15,7 @@ import Icon from "components/Icon/Icon";
import DiskSpaceGraph from "components/DiskSpaceGraph";
import { HumanTimeDiffWithFleetLaunchCutoff } from "components/HumanTimeDiffWithDateTip";
import PremiumFeatureIconWithTooltip from "components/PremiumFeatureIconWithTooltip";
-import {
- getHostDiskEncryptionTooltipMessage,
- humanHostMemory,
- wrapFleetHelper,
-} from "utilities/helpers";
+import { humanHostMemory, wrapFleetHelper } from "utilities/helpers";
import { DEFAULT_EMPTY_CELL_VALUE } from "utilities/constants";
import StatusIndicator from "components/StatusIndicator";
@@ -54,6 +50,48 @@ interface IHostSummaryProps {
osSettings?: IOSSettings;
}
+const MAC_WINDOWS_DISK_ENCRYPTION_MESSAGES = {
+ darwin: {
+ enabled: (
+ <>
+ The disk is encrypted. The user must enter their
+
password when they start their computer.
+ >
+ ),
+ disabled: (
+ <>
+ The disk might be encrypted, but FileVault is off. The
+
disk can be accessed without entering a password.
+ >
+ ),
+ },
+ windows: {
+ enabled: (
+ <>
+ The disk is encrypted. If recently turned on,
+
encryption could take awhile.
+ >
+ ),
+ disabled: "The disk is unencrypted.",
+ },
+};
+
+const getHostDiskEncryptionTooltipMessage = (
+ platform: "darwin" | "windows" | "chrome", // TODO: improve this type
+ diskEncryptionEnabled = false
+) => {
+ if (platform === "chrome") {
+ return "Fleet does not check for disk encryption on Chromebooks, as they are encrypted by default.";
+ }
+
+ if (!["windows", "darwin"].includes(platform)) {
+ return "Disk encryption is enabled.";
+ }
+ return MAC_WINDOWS_DISK_ENCRYPTION_MESSAGES[platform][
+ diskEncryptionEnabled ? "enabled" : "disabled"
+ ];
+};
+
const HostSummary = ({
titleData,
bootstrapPackageData,
diff --git a/frontend/utilities/helpers.tsx b/frontend/utilities/helpers.tsx
index 42d46eb6f4..11243d7e8a 100644
--- a/frontend/utilities/helpers.tsx
+++ b/frontend/utilities/helpers.tsx
@@ -642,36 +642,6 @@ export const internationalTimeFormat = (date: number | Date): string => {
);
};
-const MAC_WINDOWS_DISK_ENCRYPTION_MESSAGES = {
- darwin: {
- enabled:
- "The disk is encrypted. The user must enter their
password when they start their computer.",
- disabled:
- "The disk might be encrypted, but FileVault is off. The
disk can be accessed without entering a password.",
- },
- windows: {
- enabled:
- "The disk is encrypted. If recently turned on,
encryption could take awhile.",
- disabled: "The disk is unencrypted.",
- },
-};
-
-export const getHostDiskEncryptionTooltipMessage = (
- platform: "darwin" | "windows" | "chrome", // TODO: improve this type
- diskEncryptionEnabled = false
-) => {
- if (platform === "chrome") {
- return "Fleet does not check for disk encryption on Chromebooks, as they are encrypted by default.";
- }
-
- if (!["windows", "darwin"].includes(platform)) {
- return "Disk encryption is enabled.";
- }
- return MAC_WINDOWS_DISK_ENCRYPTION_MESSAGES[platform][
- diskEncryptionEnabled ? "enabled" : "disabled"
- ];
-};
-
export const hostTeamName = (teamName: string | null): string => {
if (!teamName) {
return "No team";
@@ -915,7 +885,6 @@ export default {
humanLastSeen,
internationalTimeFormat,
internallyTruncateText,
- getHostDiskEncryptionTooltipMessage,
hostTeamName,
humanQueryLastRun,
inMilliseconds,