Update log ui

This commit is contained in:
Fang-Pen Lin
2025-12-11 14:38:05 -08:00
parent 2d9716fbc3
commit ce3ef7229d
3 changed files with 28 additions and 1 deletions
@@ -4,6 +4,8 @@ export enum ActorType {
USER = "user", USER = "user",
SERVICE = "service", SERVICE = "service",
IDENTITY = "identity", IDENTITY = "identity",
ACME_PROFILE = "acmeProfile",
ACME_ACCOUNT = "acmeAccount",
UNKNOWN_USER = "unknownUser" UNKNOWN_USER = "unknownUser"
} }
+20 -1
View File
@@ -38,6 +38,13 @@ interface KmipClientActorMetadata {
name: string; name: string;
} }
interface AcmeAccountActorMetadata {
profileId: string;
accountId: string;
}
interface AcmeProfileActorMetadata {
profileId: string;
}
interface UserActor { interface UserActor {
type: ActorType.USER; type: ActorType.USER;
metadata: UserActorMetadata; metadata: UserActorMetadata;
@@ -67,13 +74,25 @@ export interface UnknownUserActor {
type: ActorType.UNKNOWN_USER; 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 = export type Actor =
| UserActor | UserActor
| ServiceActor | ServiceActor
| IdentityActor | IdentityActor
| PlatformActor | PlatformActor
| UnknownUserActor | UnknownUserActor
| KmipClientActor; | KmipClientActor
| AcmeProfileActor
| AcmeAccountActor;
interface GetSecretsEvent { interface GetSecretsEvent {
type: EventType.GET_SECRETS; type: EventType.GET_SECRETS;
@@ -68,6 +68,12 @@ export const LogsTableRow = ({ auditLog, rowNumber, timezone }: Props) => {
{auditLog.actor.type === ActorType.IDENTITY && ( {auditLog.actor.type === ActorType.IDENTITY && (
<Tag label="identity_name" value={auditLog.actor.metadata.name} /> <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> </div>
</Td> </Td>
</Tr> </Tr>