Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: remove unused code (#12301)
boojack399827435e9c
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vueindex ae1343a387..a84caaecc4 100644--- a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue@@ -50,12 +50,12 @@ import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto/v1/plan_service";import { Task_Type } from "@/types/proto/v1/rollout_service";import { CheckRequest_ChangeType } from "@/types/proto/v1/sql_service";import type { Defer } from "@/utils/util";-import { useEditSheet } from "../StatementSection/useEditSheet";+import { useTaskSheet } from "../StatementSection/useTaskSheet";import OnlineMigrationAdviceExtra from "./OnlineMigrationAdviceExtra.vue";import SQLCheckBadge from "./SQLCheckBadge.vue";const { issue, selectedTask, selectedSpec, events } = useIssueContext();-const { sheetStatement } = useEditSheet();+const { sheetStatement } = useTaskSheet();const rolloutMode = computed(() => !!issue.value.rollout);diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/useTempEditState.ts b/frontend/src/components/IssueV1/components/StatementSection/EditorView/useTempEditState.tsindex e95e9e54e2..4f15d56a88 100644--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/useTempEditState.ts+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/useTempEditState.ts@@ -1,7 +1,7 @@import { computed, nextTick, ref, watch } from "vue";import { UNKNOWN_ID } from "@/types";import { useIssueContext } from "../../../logic";-import { useEditSheet } from "../useEditSheet";+import { useTaskSheet } from "../useTaskSheet";export type EditState = {isEditing: boolean;@@ -10,7 +10,7 @@ export type EditState = {export const useTempEditState = (state: EditState) => {const { isCreating, issue, selectedTask } = useIssueContext();- const { sheet, sheetName, sheetReady, sheetStatement } = useEditSheet();+ const { sheet, sheetName, sheetReady, sheetStatement } = useTaskSheet();const rolloutMode = computed(() => !!issue.value.rollout);let stopWatching = () => {diff --git a/frontend/src/components/IssueV1/components/StatementSection/useEditSheet.ts b/frontend/src/components/IssueV1/components/StatementSection/useEditSheet.tsdeleted file mode 100644index 56bf8528f1..0000000000--- a/frontend/src/components/IssueV1/components/StatementSection/useEditSheet.ts+++ /dev/null@@ -1,11 +0,0 @@-import { useIssueContext } from "../../logic";-import { useSpecSheet } from "./useSpecSheet";-import { useTaskSheet } from "./useTaskSheet";--export const useEditSheet = () => {- const { issue } = useIssueContext();- const taskSheet = useTaskSheet();- const specSheet = useSpecSheet();-- return issue.value.rollout ? taskSheet : specSheet;-};diff --git a/frontend/src/components/IssueV1/components/StatementSection/useSpecSheet.ts b/frontend/src/components/IssueV1/components/StatementSection/useSpecSheet.tsdeleted file mode 100644index 33a3031673..0000000000--- a/frontend/src/components/IssueV1/components/StatementSection/useSpecSheet.ts+++ /dev/null@@ -1,55 +0,0 @@-import { computedAsync } from "@vueuse/core";-import { computed, ref } from "vue";-import { useSheetV1Store } from "@/store";-import {- extractSheetUID,- getSheetStatement,- setSheetStatement,- sheetNameOfSpec,-} from "@/utils";-import { getLocalSheetByName, useIssueContext } from "../../logic";--export const useSpecSheet = () => {- const sheetStore = useSheetV1Store();- const { selectedSpec } = useIssueContext();-- const sheetName = computed(() => {- return sheetNameOfSpec(selectedSpec.value);- });- const isFetchingSheet = ref(false);- const sheetReady = computed(() => {- return !isFetchingSheet.value;- });- const sheet = computedAsync(- async () => {- const name = sheetName.value;- const uid = extractSheetUID(name);- if (uid.startsWith("-")) {- return getLocalSheetByName(name);- }-- return sheetStore.getOrFetchSheetByName(name);- },- undefined,- {- evaluating: isFetchingSheet,- }- );- const sheetStatement = computed({- get() {- if (!sheetReady.value || !sheet.value) return "";- return getSheetStatement(sheet.value);- },- set(statement) {- if (!sheetReady.value || !sheet.value) return;- setSheetStatement(sheet.value, statement);- },- });-- return {- sheet,- sheetName,- sheetReady,- sheetStatement,- };-};