Update log ui

This commit is contained in:
Fang-Pen Lin
2025-12-09 18:48:27 -08:00
parent 2d9716fbc3
commit ce3ef7229d
3 changed files with 28 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ export enum ActorType {
USER = "user",
SERVICE = "service",
IDENTITY = "identity",
ACME_PROFILE = "acmeProfile",
ACME_ACCOUNT = "acmeAccount",
UNKNOWN_USER = "unknownUser"
}

View File

@@ -38,6 +38,13 @@ interface KmipClientActorMetadata {
name: string;
}
interface AcmeAccountActorMetadata {
profileId: string;
accountId: string;
}
interface AcmeProfileActorMetadata {
profileId: string;
}
interface UserActor {
type: ActorType.USER;
metadata: UserActorMetadata;
@@ -67,13 +74,25 @@ export interface UnknownUserActor {
type: ActorType.UNKNOWN_USER;
}
export interface AcmeProfileActor {
type: ActorType.ACME_PROFILE;
metadata: AcmeProfileActorMetadata;
}
export interface AcmeAccountActor {
type: ActorType.ACME_ACCOUNT;
metadata: AcmeAccountActorMetadata;
}
export type Actor =
| UserActor
| ServiceActor
| IdentityActor
| PlatformActor
| UnknownUserActor
| KmipClientActor;
| KmipClientActor
| AcmeProfileActor
| AcmeAccountActor;
interface GetSecretsEvent {
type: EventType.GET_SECRETS;

View File

@@ -68,6 +68,12 @@ export const LogsTableRow = ({ auditLog, rowNumber, timezone }: Props) => {
{auditLog.actor.type === ActorType.IDENTITY && (
<Tag label="identity_name" value={auditLog.actor.metadata.name} />
)}
{auditLog.actor.type === ActorType.ACME_PROFILE && (
<Tag label="acme_profile_id" value={auditLog.actor.metadata.profileId} />
)}
{auditLog.actor.type === ActorType.ACME_ACCOUNT && (
<Tag label="acme_account_id" value={auditLog.actor.metadata.accountId} />
)}
</div>
</Td>
</Tr>