From 010bc54677082198b3a9bf9f44818f6177904e5b Mon Sep 17 00:00:00 2001
From: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Date: Wed, 24 Jul 2024 15:27:34 -0400
Subject: [PATCH] Fleet UI: Update profile activities to not include host
platform (#20696)
---
.../ActivityItem/ActivityItem.tsx | 59 ++++---------------
1 file changed, 10 insertions(+), 49 deletions(-)
diff --git a/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx b/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx
index 9889bf98a5..387fc30dde 100644
--- a/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx
+++ b/frontend/pages/DashboardPage/cards/ActivityFeed/ActivityItem/ActivityItem.tsx
@@ -36,19 +36,16 @@ const PREMIUM_ACTIVITIES = new Set([
const getProfileMessageSuffix = (
isPremiumTier: boolean,
- platform: "apple" | "windows",
teamName?: string | null
) => {
- const platformDisplayName =
- platform === "apple" ? "macOS, iOS, and iPadOS" : "Windows";
- let messageSuffix = <>all {platformDisplayName} hosts>;
+ let messageSuffix = <>hosts>;
if (isPremiumTier) {
messageSuffix = teamName ? (
<>
- {platformDisplayName} hosts assigned to the {teamName} team
+ the {teamName} team
>
) : (
- <>{platformDisplayName} hosts with no team>
+ <>hosts with no team>
);
}
return messageSuffix;
@@ -359,12 +356,7 @@ const TAGGED_TEMPLATES = {
) : (
<>a configuration profile>
)}{" "}
- to{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "apple",
- activity.details?.team_name
- )}
+ to {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}
.
>
);
@@ -383,12 +375,7 @@ const TAGGED_TEMPLATES = {
<>a configuration profile>
)}{" "}
from{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "apple",
- activity.details?.team_name
- )}
- .
+ {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}.
>
);
},
@@ -399,7 +386,6 @@ const TAGGED_TEMPLATES = {
edited configuration profiles for{" "}
{getProfileMessageSuffix(
isPremiumTier,
- "apple",
activity.details?.team_name
)}{" "}
via fleetctl.
@@ -419,12 +405,7 @@ const TAGGED_TEMPLATES = {
) : (
<>a configuration profile>
)}{" "}
- to{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "windows",
- activity.details?.team_name
- )}
+ to {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}
.
>
);
@@ -443,12 +424,7 @@ const TAGGED_TEMPLATES = {
<>a configuration profile>
)}{" "}
from{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "windows",
- activity.details?.team_name
- )}
- .
+ {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}.
>
);
},
@@ -459,7 +435,6 @@ const TAGGED_TEMPLATES = {
edited configuration profiles for{" "}
{getProfileMessageSuffix(
isPremiumTier,
- "windows",
activity.details?.team_name
)}{" "}
via fleetctl.
@@ -779,12 +754,7 @@ const TAGGED_TEMPLATES = {
added declaration (DDM) profile
{activity.details?.profile_name}
{" "}
- to{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "apple",
- activity.details?.team_name
- )}
+ to {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}
.
>
);
@@ -795,12 +765,7 @@ const TAGGED_TEMPLATES = {
{" "}
removed declaration (DDM) profile{" "}
{activity.details?.profile_name} from{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "apple",
- activity.details?.team_name
- )}
- .
+ {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}.
>
);
},
@@ -810,11 +775,7 @@ const TAGGED_TEMPLATES = {
{" "}
edited declaration (DDM) profiles{" "}
{activity.details?.profile_name} for{" "}
- {getProfileMessageSuffix(
- isPremiumTier,
- "apple",
- activity.details?.team_name
- )}{" "}
+ {getProfileMessageSuffix(isPremiumTier, activity.details?.team_name)}{" "}
via fleetctl.
>
);