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: admin mode (#16837)
Danny Xu12b42cd00495
diff --git a/frontend/package.json b/frontend/package.jsonindex c0fd75ed41..75058bf61f 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -68,7 +68,7 @@"scrollparent": "^2.1.0","semver": "7.7.2","slug": "9.1.0",- "splitpanes": "4.0.4",+ "splitpanes": "3.2.0","sql-formatter": "15.6.2","string-width": "^7.2.0","tailwind-merge": "^3.3.0",diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex 60e0354090..80595bd490 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -167,8 +167,8 @@ importers:specifier: 9.1.0version: 9.1.0splitpanes:- specifier: 4.0.4- version: 4.0.4([email protected]([email protected]))+ specifier: 3.2.0+ version: 3.2.0([email protected]([email protected]))sql-formatter:specifier: 15.6.2version: 15.6.2@@ -4702,11 +4702,6 @@ packages:peerDependencies:vue: ^3.2.0- resolution: {integrity: sha512-RbysugZhjbCw5fgplvk3hOXr41stahQDtZhHVkhnnJI6H4wlGDhM2kIpbehy7v92duy9GnMa8zIhHigIV1TWtg==}- peerDependencies:- vue: ^3.2.0-resolution: {integrity: sha512-ZjqOfJGuB97UeHzTJoTbadlM0h9ynehtSTHNUbGfXR4HZ4rCIoD2oIW91W+A5oE76k8hl0Uz5GD8Sx3Pt9Xa3w==}hasBin: true@@ -11007,10 +11002,6 @@ snapshots:dependencies:vue: 3.5.16([email protected])- dependencies:- vue: 3.5.16([email protected])-dependencies:argparse: 2.0.1diff --git a/frontend/src/store/modules/sqlEditor/webTerminal.ts b/frontend/src/store/modules/sqlEditor/webTerminal.tsindex b6fe0464be..4d008bc6db 100644--- a/frontend/src/store/modules/sqlEditor/webTerminal.ts+++ b/frontend/src/store/modules/sqlEditor/webTerminal.ts@@ -1,5 +1,4 @@-import { create, fromJson } from "@bufbuild/protobuf";-import { type Duration, DurationSchema } from "@bufbuild/protobuf/wkt";+import { create, fromJson, toJson } from "@bufbuild/protobuf";import { Code, ConnectError } from "@connectrpc/connect";import Emittery from "emittery";import { uniqueId } from "lodash-es";@@ -121,9 +120,7 @@ const createStreamingQueryController = () => {status.value = "CONNECTED";const send = (request: AdminExecuteRequest) => {- const payload: any = {- ...request,- };+ const payload = toJson(AdminExecuteRequestSchema, request);console.debug("will send", JSON.stringify(payload));ws.send(JSON.stringify(payload));};@@ -146,12 +143,6 @@ const createStreamingQueryController = () => {try {const data = JSON.parse(event.data);if (data.result) {- const { results } = data.result;- if (Array.isArray(results)) {- results.forEach((result) => {- result.latency = parseDuration(result.latency);- });- }const response = fromJson(AdminExecuteResponseSchema, data.result);subscriber.next(response);} else if (data.error) {@@ -310,18 +301,3 @@ const mapRequest = (params: SQLEditorQueryParams): AdminExecuteRequest => {});return request;};--export const parseDuration = (str: string): Duration | undefined => {- if (typeof str !== "string") return undefined;-- const matches = str.match(/^([0-9.]+)s$/);- if (!matches) return undefined;- const totalSeconds = parseFloat(matches[0]);- if (Number.isNaN(totalSeconds) || totalSeconds < 0) return undefined;- const seconds = Math.floor(totalSeconds);- const nanos = (totalSeconds - seconds) * 1e9;- return create(DurationSchema, {- seconds: BigInt(seconds),- nanos,- });-};