add ddm activities to the UI (#17864)
relates to #17409 adds the ddm activities to the UI. - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. - [x] Manual QA for all new/changed functionality
This commit is contained in:
@@ -0,0 +1 @@
|
||||
- add ddm activities to the fleet UI
|
||||
@@ -67,6 +67,9 @@ export enum ActivityType {
|
||||
LockedHost = "locked_host",
|
||||
UnlockedHost = "unlocked_host",
|
||||
WipedHost = "wiped_host",
|
||||
CreatedDeclarationProfile = "created_declaration_profile",
|
||||
DeletedDeclarationProfile = "deleted_declaration_profile",
|
||||
EditedDeclarationProfile = "edited_declaration_profile",
|
||||
}
|
||||
|
||||
// This is a subset of ActivityType that are shown only for the host past activities
|
||||
|
||||
@@ -763,6 +763,55 @@ const TAGGED_TEMPLATES = {
|
||||
</>
|
||||
);
|
||||
},
|
||||
createdDeclarationProfile: (activity: IActivity, isPremiumTier: boolean) => {
|
||||
return (
|
||||
<>
|
||||
{" "}
|
||||
added declaration (DDM) profile <b>
|
||||
{activity.details?.profile_name}
|
||||
</b>{" "}
|
||||
to{" "}
|
||||
{getProfileMessageSuffix(
|
||||
isPremiumTier,
|
||||
"darwin",
|
||||
activity.details?.team_name
|
||||
)}
|
||||
.
|
||||
</>
|
||||
);
|
||||
},
|
||||
deletedDeclarationProfile: (activity: IActivity, isPremiumTier: boolean) => {
|
||||
return (
|
||||
<>
|
||||
{" "}
|
||||
removed declaration (DDM) profile{" "}
|
||||
<b>{activity.details?.profile_name}</b> from{" "}
|
||||
{getProfileMessageSuffix(
|
||||
isPremiumTier,
|
||||
"darwin",
|
||||
activity.details?.team_name
|
||||
)}
|
||||
.
|
||||
</>
|
||||
);
|
||||
},
|
||||
editedDeclarationProfile: (activity: IActivity, isPremiumTier: boolean) => {
|
||||
return (
|
||||
<>
|
||||
{" "}
|
||||
edited declaration (DDM) profile <b>
|
||||
{activity.details?.profile_name}
|
||||
</b>{" "}
|
||||
for{" "}
|
||||
{getProfileMessageSuffix(
|
||||
isPremiumTier,
|
||||
"darwin",
|
||||
activity.details?.team_name
|
||||
)}{" "}
|
||||
via fleetctl.
|
||||
</>
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
const getDetail = (
|
||||
@@ -918,6 +967,22 @@ const getDetail = (
|
||||
case ActivityType.WipedHost: {
|
||||
return TAGGED_TEMPLATES.wipedHost(activity);
|
||||
}
|
||||
case ActivityType.CreatedDeclarationProfile: {
|
||||
return TAGGED_TEMPLATES.createdDeclarationProfile(
|
||||
activity,
|
||||
isPremiumTier
|
||||
);
|
||||
}
|
||||
case ActivityType.DeletedDeclarationProfile: {
|
||||
return TAGGED_TEMPLATES.deletedDeclarationProfile(
|
||||
activity,
|
||||
isPremiumTier
|
||||
);
|
||||
}
|
||||
case ActivityType.EditedDeclarationProfile: {
|
||||
return TAGGED_TEMPLATES.editedDeclarationProfile(activity, isPremiumTier);
|
||||
}
|
||||
|
||||
default: {
|
||||
return TAGGED_TEMPLATES.defaultActivityTemplate(activity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user