diff --git a/assets/images/macos-updates-preview.png b/assets/images/macos-updates-preview.png new file mode 100644 index 0000000000..9bf81c8882 Binary files /dev/null and b/assets/images/macos-updates-preview.png differ diff --git a/assets/images/nudge-screenshot.png b/assets/images/nudge-screenshot.png deleted file mode 100644 index 0db917cf91..0000000000 Binary files a/assets/images/nudge-screenshot.png and /dev/null differ diff --git a/changes/issue-17417-ui-os-updates-ddm b/changes/issue-17417-ui-os-updates-ddm new file mode 100644 index 0000000000..06386f9dc6 --- /dev/null +++ b/changes/issue-17417-ui-os-updates-ddm @@ -0,0 +1 @@ +- change UI on OS Updates page to show new nudge for macos DDM diff --git a/frontend/pages/ManageControlsPage/OSUpdates/OSUpdates.tsx b/frontend/pages/ManageControlsPage/OSUpdates/OSUpdates.tsx index a9d1576406..4e6d7ae311 100644 --- a/frontend/pages/ManageControlsPage/OSUpdates/OSUpdates.tsx +++ b/frontend/pages/ManageControlsPage/OSUpdates/OSUpdates.tsx @@ -17,7 +17,6 @@ import NudgePreview from "./components/NudgePreview"; import TurnOnMdmMessage from "../components/TurnOnMdmMessage/TurnOnMdmMessage"; import CurrentVersionSection from "./components/CurrentVersionSection"; import TargetSection from "./components/TargetSection"; -import { generateKey } from "./components/TargetSection/TargetSection"; export type OSUpdatesSupportedPlatform = "darwin" | "windows"; @@ -38,28 +37,26 @@ const getSelectedPlatform = ( interface IOSUpdates { router: InjectedRouter; - teamIdForApi?: number; + teamIdForApi: number; } const OSUpdates = ({ router, teamIdForApi }: IOSUpdates) => { - const { isPremiumTier, setConfig } = useContext(AppContext); + const { isPremiumTier, config, setConfig } = useContext(AppContext); const [ selectedPlatformTab, setSelectedPlatformTab, ] = useState(null); - // FIXME: We're calling this endpoint twice on mount because it also gets called in App.tsx - // whenever the pathname changes. We should find a way to avoid this. const { - data: config, isError: isErrorConfig, isFetching: isFetchingConfig, isLoading: isLoadingConfig, refetch: refetchAppConfig, } = useQuery(["config"], () => configAPI.loadAll(), { refetchOnWindowFocus: false, - onSuccess: (data) => setConfig(data), // update the app context with the fetched config + onSuccess: (data) => setConfig(data), // update the app context with the refetched config + enabled: false, // this is disabled as the config is already fetched in App.tsx }); const { @@ -87,9 +84,6 @@ const OSUpdates = ({ router, teamIdForApi }: IOSUpdates) => { ); } - // FIXME: Are these checks still necessary? - if (config === null || teamIdForApi === undefined) return null; - if (isLoadingConfig || isLoadingTeam) return ; // FIXME: Handle error states for app config and team config (need specifications for this). @@ -118,11 +112,7 @@ const OSUpdates = ({ router, teamIdForApi }: IOSUpdates) => {
{ <>

End user experience on macOS

- When a minimum version is saved, the end user sees the below window - until their macOS version is at or above the minimum version. + For macOS 14 and above, end users will see native macOS notifications + (DDM).

-

As the deadline gets closer, Fleet provides stronger encouragement.

+

Everyone else will see the Nudge window.

@@ -33,8 +33,8 @@ const NudgeDescription = ({ platform }: INudgeDescriptionProps) => {

When a Windows host becomes aware of a new update, end users are able to defer restarts. Automatic restarts happen before 8am and after 5pm (end - user’s local time). After the deadline, restarts are forced regardless - of active hours. + user's local time). After the deadline, restarts are forced + regardless of active hours.

{ - return ( - `${args.currentTeamId}-` + - `${getDefaultMacOSDeadline(args)}-` + - `${getDefaultMacOSVersion(args)}-` + - `${getDefaultWindowsDeadlineDays(args)}-` + - `${getDefaultWindowsGracePeriodDays(args)}` - ); -}; - interface ITargetSectionProps { appConfig: IConfig; currentTeamId: number;