Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Has the give up the previous idea of sharing the errorList
天舟d22f04c89664
diff --git a/frontend/src/components/TaskCheckRunPanel.vue b/frontend/src/components/TaskCheckRunPanel.vueindex 710dcae0d0..e544744eb6 100644--- a/frontend/src/components/TaskCheckRunPanel.vue+++ b/frontend/src/components/TaskCheckRunPanel.vue@@ -95,6 +95,7 @@ import {TaskCheckResult,ErrorMeta,ErrorCode,+ ERROR_LIST,} from "../types";import errorJson from "../types/errorList.json";@@ -120,8 +121,6 @@ export default {},},setup(props, ctx) {- const errorList: ErrorMeta[] = errorJson as ErrorMeta[];-const statusIconClass = (status: TaskCheckStatus) => {switch (status) {case "SUCCESS":@@ -160,7 +159,7 @@ export default {});const errorCodeLink = (code: ErrorCode): string => {- const error = errorList.find((item) => item.code == code);+ const error = ERROR_LIST.find((item) => item.code == code);return error ? `https://bytebase.com/doc/error#${error.hash}` : "";};diff --git a/frontend/src/types/error.ts b/frontend/src/types/error.tsindex 368eeeb69f..0d313ba43a 100644--- a/frontend/src/types/error.ts+++ b/frontend/src/types/error.ts@@ -43,12 +43,7 @@ export type ErrorCode =export type ErrorTag = "General" | "Compatibility";-// error.json stores the corresponding data, this will be used by Bytebase to construct the link and our doc website to generate-// the contentexport type ErrorMeta = {code: ErrorCode;hash: string;- name: string;- description: string;- tagList: ErrorTag[];};diff --git a/frontend/src/types/errorList.json b/frontend/src/types/errorList.jsondeleted file mode 100644index 4ea1f74f80..0000000000--- a/frontend/src/types/errorList.json+++ /dev/null@@ -1,23 +0,0 @@-[- {- "code": 0,- "hash": "ok-0",- "name": "Ok",- "description": "Code indicating success",- "tagList": ["General"]- },- {- "code": 101,- "hash": "db-connection-101",- "name": "Failed to connect database",- "description": "Unable to connect database.",- "tagList": ["General"]- },- {- "code": 10001,- "hash": "drop-database-10001",- "name": "DROP DATABASE (backward incompatible migration)",- "description": "DROP DATABASE is a backward incompatible migration.",- "tagList": ["Compatibility"]- }-]diff --git a/frontend/src/types/errorList.ts b/frontend/src/types/errorList.tsnew file mode 100644index 0000000000..b9f0867345--- /dev/null+++ b/frontend/src/types/errorList.ts@@ -0,0 +1,16 @@+import { ErrorMeta } from ".";++export const ERROR_LIST: ErrorMeta[] = [+ {+ code: 0,+ hash: "ok-0",+ },+ {+ code: 101,+ hash: "db-connection-101",+ },+ {+ code: 10001,+ hash: "drop-database-10001",+ },+];diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.tsindex ba1a302282..fff6075b58 100644--- a/frontend/src/types/index.ts+++ b/frontend/src/types/index.ts@@ -10,6 +10,7 @@ export * from "./database";export * from "./dataSource";export * from "./environment";export * from "./error";+export * from "./errorList";export * from "./id";export * from "./inbox";export * from "./instance";diff --git a/frontend/tsconfig.json b/frontend/tsconfig.jsonindex 8cbbf4e7af..1d34bdf022 100644--- a/frontend/tsconfig.json+++ b/frontend/tsconfig.json@@ -61,8 +61,6 @@// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. *//* Advanced Options */- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,- /* Import json file */- "resolveJsonModule": true+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */}}