Skip to content

Commit

Permalink
Update activity descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
heisbrot committed Apr 19, 2024
1 parent 0aa0000 commit 21cd660
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 9 deletions.
49 changes: 40 additions & 9 deletions src/modules/activity/ActivityDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -477,15 +477,46 @@ export default function ActivityDescription({ event }: Props) {
</div>
);

// TODO add activity texts
// rule.add
// rule.update
// rule.delete
// setupkey.update
// setupkey.overuse
// group.update
// group.delete
// user.peer.login
if (event.activity_code == "transferred.owner.role")
return <div className={"inline"}>Owner role was transferred</div>;

/**
* EDR
*/
if (event.activity_code == "integrated-validator.api.created")
return (
<div className={"inline"}>
<Value>{m?.platform}</Value> integration created
</div>
);

if (event.activity_code == "integrated-validator.api.updated")
return (
<div className={"inline"}>
<Value>{m?.platform}</Value> integration updated
</div>
);

if (event.activity_code == "integrated-validator.api.deleted")
return (
<div className={"inline"}>
<Value>{m?.platform}</Value> integration deleted
</div>
);

if (event.activity_code == "integrated-validator.host-check.approved")
return (
<div className={"inline"}>
Peer approved by <Value>{m?.platform}</Value> integration
</div>
);

if (event.activity_code == "integrated-validator.host-check.denied")
return (
<div className={"inline"}>
Peer rejected by <Value>{m?.platform}</Value> integration
</div>
);

return (
<div className={"flex gap-2.5 items-center"}>
Expand Down
14 changes: 14 additions & 0 deletions src/modules/activity/ActivityTypeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import {
ArrowLeftRight,
Blocks,
Cog,
CreditCardIcon,
FolderGit2,
Globe,
HelpCircleIcon,
KeyRound,
LogIn,
MonitorSmartphoneIcon,
NetworkIcon,
RefreshCcw,
Server,
Shield,
ShieldCheck,
Expand Down Expand Up @@ -71,10 +73,22 @@ export default function ActivityTypeIcon({
return <User size={size} className={cn(DEFAULT_CLASSES, className)} />;
} else if (code.startsWith("service")) {
return <Cog size={size} className={cn(DEFAULT_CLASSES, className)} />;
} else if (code.startsWith("billing")) {
return (
<CreditCardIcon size={size} className={cn(DEFAULT_CLASSES, className)} />
);
} else if (code.startsWith("integrated")) {
return (
<ShieldCheck size={size} className={cn(DEFAULT_CLASSES, className)} />
);
} else if (code.startsWith("posture")) {
return (
<ShieldCheck size={size} className={cn(DEFAULT_CLASSES, className)} />
);
} else if (code.startsWith("transferred")) {
return (
<RefreshCcw size={size} className={cn(DEFAULT_CLASSES, className)} />
);
} else {
return (
<HelpCircleIcon size={size} className={cn(DEFAULT_CLASSES, className)} />
Expand Down

0 comments on commit 21cd660

Please sign in to comment.