<>
This will remove the record of {hostText()} and associated data
- (e.g. unlock PINs).{largeVolumeText()}
+ such as unlock PINs and disk encryption keys.
+ {hasManyHosts && (
+
+ When deleting a large volume of hosts, it may take some time for
+ this change to be reflected in the UI.
+
+ )}
-
macOS, Windows, or Linux hosts will re-appear unless Fleet's
diff --git a/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tests.tsx b/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tests.tsx
new file mode 100644
index 0000000000..81cdd5485c
--- /dev/null
+++ b/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tests.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import { noop } from "lodash";
+import { render, screen } from "@testing-library/react";
+
+import TransferHostModal from "./TransferHostModal";
+
+describe("TransferHostModal", () => {
+ it("renders the correct message when more than one host is being transfered", () => {
+ render(
+
+ );
+
+ expect(
+ screen.getByText(
+ "The hosts' disk encryption keys are deleted if they're transferred to a team with disk encryption turned off."
+ )
+ ).toBeVisible();
+ });
+
+ it("render the correct message when one host is being transfered", () => {
+ render(
+
+ );
+
+ expect(
+ screen.getByText(
+ "The host's disk encryption key is deleted if it's transferred to a team with disk encryption turned off."
+ )
+ ).toBeVisible();
+ });
+});
diff --git a/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tsx b/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tsx
index 5993415e4c..c75e160cfd 100644
--- a/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tsx
+++ b/frontend/pages/hosts/components/TransferHostModal/TransferHostModal.tsx
@@ -65,43 +65,58 @@ const TransferHostModal = ({
return [NO_TEAM_OPTION, ...teamOptions];
};
+ const diskEncryptionMsg = (
+ <>
+ The {multipleHosts ? "hosts'" : "host's"} disk encryption{" "}
+ {multipleHosts ? "keys are" : "key is"} deleted if{" "}
+ {multipleHosts ? "they're" : "it's"} transferred to a team with disk
+ encryption turned off.
+ >
+ );
+
return (
-
+ <>
+
{diskEncryptionMsg}
+
+ >
);
};