Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(frontend): reorder audit log table columns and detail fields (#3978)

ZhengX6297a246765e
diff --git a/frontend/src/components/AuditLog/AuditLogTable.vue b/frontend/src/components/AuditLog/AuditLogTable.vue
index 6d9bad6d15..12d4f5c4ef 100644
--- a/frontend/src/components/AuditLog/AuditLogTable.vue
+++ b/frontend/src/components/AuditLog/AuditLogTable.vue
@@ -12,8 +12,8 @@
{{ dayjs.unix(auditLog.createdTs).format("YYYY-MM-DD HH:mm:ss Z") }}
</div>
</BBTableCell>
- <BBTableCell class="table-cell w-20">
- {{ auditLog.creator }}
+ <BBTableCell class="table-cell w-24">
+ <div>{{ auditLog.level }}</div>
</BBTableCell>
<BBTableCell class="table-cell w-28">
<span
@@ -24,8 +24,8 @@
}}
</span>
</BBTableCell>
- <BBTableCell class="table-cell w-24">
- <div>{{ auditLog.level }}</div>
+ <BBTableCell class="table-cell w-20">
+ {{ auditLog.creator }}
</BBTableCell>
<BBTableCell class="table-cell w-36">
<div v-if="auditLog.comment">
@@ -86,13 +86,13 @@ const columnList = computed(() => [
title: t("audit-log.table.created-ts"),
},
{
- title: t("audit-log.table.creator"),
+ title: t("audit-log.table.level"),
},
{
title: t("audit-log.table.type"),
},
{
- title: t("audit-log.table.level"),
+ title: t("audit-log.table.creator"),
},
{
title: t("audit-log.table.comment"),
diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vue
index dca5a63dba..e50da63b47 100644
--- a/frontend/src/views/SettingWorkspaceAuditLog.vue
+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue
@@ -72,10 +72,9 @@ const { t } = useI18n();
const logKeyMap = {
createdTs: t("audit-log.table.created-time"),
- updatedTs: t("audit-log.table.updated-time"),
- creator: t("audit-log.table.creator"),
- type: t("audit-log.table.type"),
level: t("audit-log.table.level"),
+ type: t("audit-log.table.type"),
+ creator: t("audit-log.table.creator"),
comment: t("audit-log.table.comment"),
payload: t("audit-log.table.payload"),
};
@@ -85,9 +84,9 @@ const typePrefixList = (
).map((key) => AuditActivityType[key]);
const handleViewDetail = (log: any) => {
- // filter properties we don't need
+ // Display detail fields in the same order as logKeyMap.
state.modalContent = Object.fromEntries(
- Object.entries(log).filter(([key, _]) => key in logKeyMap)
+ Object.keys(logKeyMap).map((logKey) => [logKey, log[logKey]])
);
state.showModal = true;
dialog.value!.open();