feat(23-02): add USER_AWARENESS badge variant + acknowledge_user label to ClassificationCard
- Add USER_AWARENESS to ClassificationCardData verdict union - Add emerald VERDICT_VARIANT_CLASS entry for USER_AWARENESS (distinct from UNWANTED amber and THREAT destructive) - Add acknowledge_user: 'Acknowledge user' to ACTION_LABEL
This commit is contained in:
parent
7048bf693a
commit
af8a5bd438
1 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ import { hasPermission } from '@/lib/permissions';
|
||||||
|
|
||||||
export interface ClassificationCardData {
|
export interface ClassificationCardData {
|
||||||
id: string;
|
id: string;
|
||||||
verdict: 'SPAM' | 'UNWANTED' | 'THREAT';
|
verdict: 'SPAM' | 'UNWANTED' | 'THREAT' | 'USER_AWARENESS';
|
||||||
confidence: string | null;
|
confidence: string | null;
|
||||||
summary: string | null;
|
summary: string | null;
|
||||||
reasons: string[];
|
reasons: string[];
|
||||||
|
|
@ -31,6 +31,7 @@ const VERDICT_VARIANT_CLASS: Record<ClassificationCardData['verdict'], string> =
|
||||||
SPAM: 'bg-slate-500/15 text-slate-600',
|
SPAM: 'bg-slate-500/15 text-slate-600',
|
||||||
UNWANTED: 'bg-amber-500/15 text-amber-600',
|
UNWANTED: 'bg-amber-500/15 text-amber-600',
|
||||||
THREAT: 'bg-destructive/15 text-destructive',
|
THREAT: 'bg-destructive/15 text-destructive',
|
||||||
|
USER_AWARENESS: 'bg-emerald-500/15 text-emerald-600',
|
||||||
};
|
};
|
||||||
|
|
||||||
const ACTION_LABEL: Record<string, string> = {
|
const ACTION_LABEL: Record<string, string> = {
|
||||||
|
|
@ -41,6 +42,7 @@ const ACTION_LABEL: Record<string, string> = {
|
||||||
reset_password: 'Reset password',
|
reset_password: 'Reset password',
|
||||||
isolate_endpoint: 'Isolate endpoint',
|
isolate_endpoint: 'Isolate endpoint',
|
||||||
disable_forwarding_rule: 'Disable forwarding rule',
|
disable_forwarding_rule: 'Disable forwarding rule',
|
||||||
|
acknowledge_user: 'Acknowledge user',
|
||||||
};
|
};
|
||||||
|
|
||||||
function humanizeAction(actionType: string): string {
|
function humanizeAction(actionType: string): string {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue