From 36ca97ff2a92fa83f771d3bd7d8b90bc03a783e9 Mon Sep 17 00:00:00 2001 From: Gabriel Hernandez Date: Wed, 28 Jun 2023 17:28:17 +0100 Subject: [PATCH] Feat UI activities for windows mdm (#12552) relates to #12289 Implements enable and disable Windows mdm activity UI - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. - [x] Manual QA for all new/changed functionality --- ...289-add-enable-disable-windows-activtiy-UI | 1 + frontend/interfaces/activity.ts | 2 ++ .../ActivityItem/ActivityItem.tsx | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 changes/issue-12289-add-enable-disable-windows-activtiy-UI diff --git a/changes/issue-12289-add-enable-disable-windows-activtiy-UI b/changes/issue-12289-add-enable-disable-windows-activtiy-UI new file mode 100644 index 0000000000..c270d96a9d --- /dev/null +++ b/changes/issue-12289-add-enable-disable-windows-activtiy-UI @@ -0,0 +1 @@ +- add enable and disable windows mdm activity UI diff --git a/frontend/interfaces/activity.ts b/frontend/interfaces/activity.ts index 668436aacf..fcb6dcfd92 100644 --- a/frontend/interfaces/activity.ts +++ b/frontend/interfaces/activity.ts @@ -46,6 +46,8 @@ export enum ActivityType { EnabledMacOSSetupEndUserAuth = "enabled_macos_setup_end_user_auth", DisabledMacOSSetupEndUserAuth = "disabled_macos_setup_end_user_auth", TransferredHosts = "transferred_hosts", + EnabledWindowsMdm = "enabled_windows_mdm", + DisabledWindowsMdm = "disabled_windows_mdm", } export interface IActivity { created_at: string; diff --git a/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx b/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx index db8950535c..599dd90df5 100644 --- a/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx +++ b/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx @@ -464,6 +464,25 @@ const TAGGED_TEMPLATES = { ); }, + + enabledWindowsMdm: (activity: IActivity) => { + return ( + <> + {" "} + told Fleet to turn on MDM features for all Windows hosts (servers + excluded). + + ); + }, + disabledWindowsMdm: (activity: IActivity) => { + return ( + <> + {" "} + told Fleet to turn on MDM features for all Windows hosts (servers + excluded). + + ); + }, }; const getDetail = ( @@ -568,6 +587,12 @@ const getDetail = ( case ActivityType.TransferredHosts: { return TAGGED_TEMPLATES.transferredHosts(activity); } + case ActivityType.EnabledWindowsMdm: { + return TAGGED_TEMPLATES.enabledWindowsMdm(activity); + } + case ActivityType.DisabledWindowsMdm: { + return TAGGED_TEMPLATES.disabledWindowsMdm(activity); + } default: { return TAGGED_TEMPLATES.defaultActivityTemplate(activity); }