Skip to content

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

chore: down grade to brief in getChangeHistoryByName (#8703)

Liu Ji6d9287bea4c1
diff --git a/frontend/src/store/modules/v1/changeHistory.ts b/frontend/src/store/modules/v1/changeHistory.ts
index 46515cb452..4f1e629327 100644
--- a/frontend/src/store/modules/v1/changeHistory.ts
+++ b/frontend/src/store/modules/v1/changeHistory.ts
@@ -8,6 +8,7 @@ import {
GetChangeHistoryRequest,
ListChangeHistoriesRequest,
} from "@/types/proto/v1/database_service";
+import { extractDatabaseResourceName } from "@/utils";
export const useChangeHistoryStore = defineStore("changeHistory_v1", () => {
const changeHistoryMapByName = reactive(new Map<string, ChangeHistory>());
@@ -63,7 +64,15 @@ export const useChangeHistoryStore = defineStore("changeHistory_v1", () => {
return await fetchChangeHistory({ name });
};
const getChangeHistoryByName = (name: string) => {
- return changeHistoryMapByName.get(name);
+ const detail = changeHistoryMapByName.get(name);
+ if (detail) {
+ return detail;
+ }
+ const { full: parent } = extractDatabaseResourceName(name);
+ const brief = changeHistoryListMapByDatabase
+ .get(parent)
+ ?.find((ch) => ch.name === name);
+ return brief;
};
const exportChangeHistoryFullStatementByName = async (
name: string