Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: fetch sheet statement (#13847)
boojackfa9e7215b47d
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vueindex b42df6c64c..4e8df66fd6 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue@@ -23,7 +23,7 @@ import {IssueComment_TaskUpdate_Status,IssueStatus,} from "@/types/proto/v1/issue_service";-import { findStageByName, findTaskByName, extractSheetUID } from "@/utils";+import { findStageByName, findTaskByName } from "@/utils";import { extractUserResourceName } from "@/utils";import StageName from "./StageName.vue";import StatementUpdate from "./StatementUpdate.vue";@@ -160,10 +160,7 @@ const renderActionSentence = () => {{{name: () => "SQL",link: () => (- <StatementUpdate- oldSheetId={extractSheetUID(fromSheet)}- newSheetId={extractSheetUID(toSheet)}- />+ <StatementUpdate oldSheet={fromSheet} newSheet={toSheet} />),}}</Translation>diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/StatementUpdate.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/StatementUpdate.vueindex 6d4380e6d4..305941db52 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/StatementUpdate.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/StatementUpdate.vue@@ -39,28 +39,31 @@ import { BBModal, BBSpin } from "@/bbkit";import { DiffEditor } from "@/components/MonacoEditor";import { useSheetV1Store } from "@/store";import { UNKNOWN_ID } from "@/types";-import { getSheetStatement } from "@/utils";+import { extractSheetUID, getSheetStatement } from "@/utils";const props = defineProps<{- oldSheetId: string;- newSheetId: string;+ // Format: projects/{project}/sheets/{sheet}+ oldSheet: string;+ // Format: projects/{project}/sheets/{sheet}+ newSheet: string;}>();const showPanel = ref(false);-const prepareStatement = async (uid: string) => {- if (uid === String(UNKNOWN_ID)) return "";+const prepareStatement = async (sheetName: string) => {+ if (extractSheetUID(sheetName) === String(UNKNOWN_ID)) return "";// Use any (basic or full) view of sheets here to save data size- const sheet = await useSheetV1Store().getOrFetchSheetByUID(uid);+ const sheet = await useSheetV1Store().getOrFetchSheetByName(sheetName);if (!sheet) return "";return getSheetStatement(sheet);};+const isPreparingOldStatement = ref(false);const isPreparingNewStatement = ref(false);const oldStatement = asyncComputed(() => {- return prepareStatement(props.oldSheetId);+ return prepareStatement(props.oldSheet);},"",{@@ -68,9 +71,10 @@ const oldStatement = asyncComputed(lazy: true,});+const newStatement = asyncComputed(() => {- return prepareStatement(props.newSheetId);+ return prepareStatement(props.newSheet);},"",{