diff --git a/changes/25306-add-windows-linux-hosts-radios b/changes/25306-add-windows-linux-hosts-radios new file mode 100644 index 0000000000..8354a181a4 --- /dev/null +++ b/changes/25306-add-windows-linux-hosts-radios @@ -0,0 +1,2 @@ +* Replace "Include Fleet desktop" with host type radio selection buttons when adding Windows or +Linux hosts. \ No newline at end of file diff --git a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx index b3d53eb434..9a71ef3280 100644 --- a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx +++ b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx @@ -12,11 +12,11 @@ import Icon from "components/Icon/Icon"; import RevealButton from "components/buttons/RevealButton"; // @ts-ignore import InputField from "components/forms/fields/InputField"; -import Checkbox from "components/forms/fields/Checkbox"; import TooltipWrapper from "components/TooltipWrapper"; import TabsWrapper from "components/TabsWrapper"; import InfoBanner from "components/InfoBanner/InfoBanner"; import CustomLink from "components/CustomLink/CustomLink"; +import Radio from "components/forms/fields/Radio"; import { isValidPemCertificate } from "../../../pages/hosts/ManageHostsPage/helpers"; import IosIpadosPanel from "./IosIpadosPanel"; @@ -75,7 +75,9 @@ const PlatformWrapper = ({ const { renderFlash } = useContext(NotificationContext); const [copyMessage, setCopyMessage] = useState>({}); - const [includeFleetDesktop, setIncludeFleetDesktop] = useState(true); + const [hostType, setHostType] = useState<"workstation" | "server">( + "workstation" + ); const [showPlainOsquery, setShowPlainOsquery] = useState(false); const [selectedTabIndex, setSelectedTabIndex] = useState(0); // External link requires control in state @@ -224,7 +226,7 @@ const PlatformWrapper = ({ config && !config.server_settings.scripts_disabled ? "--enable-scripts " : "" - }${includeFleetDesktop ? "--fleet-desktop " : ""}--fleet-url=${ + }${hostType === "workstation" ? "--fleet-desktop " : ""}--fleet-url=${ config?.server_settings.server_url } --enroll-secret=${enrollSecret}`; }; @@ -530,24 +532,31 @@ const PlatformWrapper = ({ } return ( - <> + // "form" className applies the global form styling +
{packageType !== "pkg" && ( - setIncludeFleetDesktop(value)} - value={includeFleetDesktop} - > - <> - Include  - - Fleet Desktop - - - + // Windows & Linux +
+
Type
+ setHostType("workstation")} + /> + setHostType("server")} + /> +
)} - +
); };