Skip to content

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

chore: remove anomaly center (#15805)

boojackfb540bd67bec
diff --git a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
deleted file mode 100644
index 3f1dfb45fb..0000000000
--- a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
+++ /dev/null
@@ -1,206 +0,0 @@
-<template>
- <div v-if="!loading" class="flex flex-col space-y-4">
- <FeatureAttentionForInstanceLicense
- v-if="hasSchemaDriftFeature"
- feature="bb.feature.schema-drift"
- />
- <FeatureAttention v-else feature="bb.feature.schema-drift" />
-
- <div class="textinfolabel">
- {{ $t("anomaly.attention-desc") }}
- <a
- href="https://www.bytebase.com/docs/change-database/drift-detection?source=console"
- target="_blank"
- class="normal-link inline-flex flex-row items-center"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </div>
-
- <div class="space-y-4">
- <div class="space-y-2">
- <h3 class="text-lg leading-6 font-medium text-main">
- {{ $t("common.database") }}
- </h3>
- <dl
- class="grid grid-cols-1 gap-4 sm:grid-cols-2"
- :class="`lg:grid-cols-${databaseAnomalySummaryList.length}`"
- >
- <div
- v-for="(summary, index) in databaseAnomalySummaryList"
- :key="index"
- class="px-4 py-2 border"
- >
- <div class="flex justify-between items-center">
- <dt class="textlabel">
- {{ summary.environmentName }}
- </dt>
- <dd class="flex flex-row text-main space-x-2">
- <span class="flex flex-row items-center">
- <heroicons-outline:exclamation-circle
- class="w-4 h-4 mr-1 text-error"
- />
- {{ summary.criticalCount }}
- </span>
- <span class="flex flex-row items-center">
- <heroicons-outline:exclamation
- class="w-4 h-4 mr-1 text-warning"
- />
- {{ summary.highCount }}
- </span>
- <span class="flex flex-row items-center">
- <heroicons-outline:information-circle
- class="w-4 h-4 mr-1 text-info"
- />
- {{ summary.mediumCount }}
- </span>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
-
- <AnomalyTable
- v-if="databaseAnomalySectionList.length > 0"
- :anomaly-section-list="databaseAnomalySectionList"
- :compact-section="false"
- />
- <div v-else class="text-left text-control-light my-4">
- {{
- $t("anomaly.table-placeholder", {
- type: $t("common.database").toLocaleLowerCase(),
- })
- }}
- </div>
- </div>
- <div v-else class="flex justify-center items-center py-10">
- <BBSpin />
- </div>
-</template>
-
-<script lang="ts" setup>
-import { computed, onMounted, ref } from "vue";
-import { BBSpin } from "@/bbkit";
-import type { BBTableSectionDataSource } from "@/bbkit/types";
-import {
- featureToRef,
- useAnomalyV1Store,
- useDatabaseV1Store,
- useEnvironmentV1List,
- batchGetOrFetchDatabases,
-} from "@/store";
-import type { ComposedDatabase, ComposedProject } from "@/types";
-import { isValidDatabaseName } from "@/types";
-import type { Anomaly } from "@/types/proto/v1/anomaly_service";
-import { Anomaly_AnomalySeverity } from "@/types/proto/v1/anomaly_service";
-import { databaseV1Url } from "@/utils";
-import {
- FeatureAttention,
- FeatureAttentionForInstanceLicense,
-} from "../FeatureGuard";
-import AnomalyTable from "./AnomalyTable.vue";
-
-type Summary = {
- environmentName: string;
- criticalCount: number;
- highCount: number;
- mediumCount: number;
-};
-
-interface LocalDataSource extends BBTableSectionDataSource<Anomaly> {
- database: ComposedDatabase;
-}
-
-const props = defineProps<{
- project: ComposedProject;
-}>();
-
-const databaseStore = useDatabaseV1Store();
-const environmentList = useEnvironmentV1List(false /* !showDeleted */);
-const allAnomalyList = ref<Anomaly[]>([]);
-const loading = ref(true);
-
-onMounted(async () => {
- // Prepare all anomaly list.
- allAnomalyList.value = await useAnomalyV1Store().fetchAnomalyList(
- props.project?.name,
- {}
- );
- await batchGetOrFetchDatabases(
- allAnomalyList.value.map((anomaly) => anomaly.resource)
- );
- loading.value = false;
-});
-
-const databaseAnomalySectionList = computed((): LocalDataSource[] => {
- const sectionMap: Map<string, LocalDataSource> = new Map();
-
- for (const anomaly of allAnomalyList.value) {
- const database = databaseStore.getDatabaseByName(anomaly.resource);
- if (isValidDatabaseName(database.name)) {
- if (!sectionMap.has(database.name)) {
- sectionMap.set(database.name, {
- database,
- title: `${database.databaseName} (${database.effectiveEnvironmentEntity.title})`,
- link: databaseV1Url(database),
- list: [],
- });
- }
- sectionMap.get(database.name)!.list.push(anomaly);
- }
- }
-
- return [...sectionMap.values()];
-});
-
-const databaseAnomalySummaryList = computed((): Summary[] => {
- const envMap: Map<string, Summary> = new Map();
- for (const item of databaseAnomalySectionList.value) {
- const { database, list } = item;
- let criticalCount = 0;
- let highCount = 0;
- let mediumCount = 0;
-
- for (const anomaly of list) {
- switch (anomaly.severity) {
- case Anomaly_AnomalySeverity.CRITICAL:
- criticalCount++;
- break;
- case Anomaly_AnomalySeverity.HIGH:
- highCount++;
- break;
- case Anomaly_AnomalySeverity.MEDIUM:
- mediumCount++;
- break;
- }
- }
- const summary = envMap.get(database.effectiveEnvironment);
- if (summary) {
- summary.criticalCount += criticalCount;
- summary.highCount += highCount;
- summary.mediumCount += mediumCount;
- } else {
- envMap.set(database.effectiveEnvironment, {
- environmentName: database.effectiveEnvironmentEntity.title,
- criticalCount,
- highCount,
- mediumCount,
- });
- }
- }
-
- const list: Summary[] = [];
- for (const environment of environmentList.value) {
- const summary = envMap.get(environment.name);
- if (summary) {
- list.push(summary);
- }
- }
-
- return list.reverse();
-});
-
-const hasSchemaDriftFeature = featureToRef("bb.feature.schema-drift");
-</script>
diff --git a/frontend/src/components/AnomalyCenter/AnomalyTable.vue b/frontend/src/components/AnomalyCenter/AnomalyTable.vue
deleted file mode 100644
index 7ea70f5022..0000000000
--- a/frontend/src/components/AnomalyCenter/AnomalyTable.vue
+++ /dev/null
@@ -1,181 +0,0 @@
-<template>
- <BBTable
- :column-list="columnList"
- :section-data-source="anomalySectionList"
- :compact-section="compactSection"
- :show-header="true"
- :left-bordered="true"
- :right-bordered="true"
- >
- <template #header>
- <BBTableHeaderCell
- :left-padding="4"
- class="w-4"
- :title="columnList[0].title"
- />
- <BBTableHeaderCell :title="columnList[1].title" />
- <BBTableHeaderCell :title="columnList[2].title" />
- <BBTableHeaderCell :title="columnList[3].title" />
- <BBTableHeaderCell :title="columnList[4].title" />
- </template>
- <template #body="{ rowData: anomaly }">
- <BBTableCell :left-padding="4">
- <heroicons-outline:information-circle
- v-if="anomaly.severity == Anomaly_AnomalySeverity.MEDIUM"
- class="w-6 h-6 text-info"
- />
- <heroicons-outline:exclamation
- v-else-if="anomaly.severity == Anomaly_AnomalySeverity.HIGH"
- class="w-6 h-6 text-warning"
- />
- <heroicons-outline:exclamation-circle
- v-else-if="anomaly.severity == Anomaly_AnomalySeverity.CRITICAL"
- class="w-6 h-6 text-error"
- />
- </BBTableCell>
- <BBTableCell>
- {{ typeName(anomaly.type) }}
- </BBTableCell>
- <BBTableCell>
- {{ detail(anomaly) }}
- <span class="normal-link" @click.prevent="action(anomaly).onClick">
- {{ action(anomaly).title }}
- </span>
- </BBTableCell>
- <BBTableCell>
- {{ humanizeTs(getTimeForPbTimestamp(anomaly.updateTime, 0) / 1000) }}
- </BBTableCell>
- <BBTableCell>
- {{ humanizeTs(getTimeForPbTimestamp(anomaly.createTime, 0) / 1000) }}
- </BBTableCell>
- </template>
- </BBTable>
-
- <DatabaseSchemaDriftAnomalyModal
- v-if="state.selectedAnomaly"
- :anomaly="state.selectedAnomaly"
- @close="state.selectedAnomaly = undefined"
- />
-</template>
-
-<script lang="ts" setup>
-import type { PropType } from "vue";
-import { computed, reactive } from "vue";
-import { useI18n } from "vue-i18n";
-import { useRouter } from "vue-router";
-import { BBTable, BBTableCell, BBTableHeaderCell } from "@/bbkit";
-import type { BBTableSectionDataSource } from "@/bbkit/types";
-import { INSTANCE_ROUTE_DETAIL } from "@/router/dashboard/instance";
-import { getTimeForPbTimestamp } from "@/types";
-import type { Anomaly } from "@/types/proto/v1/anomaly_service";
-import {
- Anomaly_AnomalyType,
- Anomaly_AnomalySeverity,
-} from "@/types/proto/v1/anomaly_service";
-import {
- humanizeTs,
- extractDatabaseResourceName,
- extractInstanceResourceName,
-} from "@/utils";
-import DatabaseSchemaDriftAnomalyModal from "./DatabaseSchemaDriftAnomalyModal.vue";
-
-type Action = {
- onClick: () => void;
- title: string;
-};
-
-interface LocalState {
- selectedAnomaly?: Anomaly;
-}
-
-defineProps({
- anomalySectionList: {
- required: true,
- type: Object as PropType<BBTableSectionDataSource<Anomaly>[]>,
- },
- compactSection: {
- default: true,
- type: Boolean,
- },
-});
-
-const router = useRouter();
-const { t } = useI18n();
-
-const state = reactive<LocalState>({});
-
-const columnList = computed(() => [
- {
- title: "",
- },
- {
- title: t("common.type"),
- },
- {
- title: t("common.detail"),
- },
- {
- title: t("anomaly.last-seen"),
- },
- {
- title: t("anomaly.first-seen"),
- },
-]);
-
-const typeName = (type: Anomaly_AnomalyType): string => {
- switch (type) {
- case Anomaly_AnomalyType.DATABASE_CONNECTION:
- return t("anomaly.types.connection-failure");
- case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT:
- return t("anomaly.types.schema-drift");
- default:
- return "";
- }
-};
-
-const detail = (anomaly: Anomaly): string => {
- switch (anomaly.type) {
- case Anomaly_AnomalyType.DATABASE_CONNECTION: {
- return `Failed to connect to the database.`;
- }
- case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT: {
- return `Latest recorded schema is different from the actual schema.`;
- }
- default:
- // Should not reach here.
- return "UNKOWN ANOMALY DETAIL";
- }
-};
-
-const action = (anomaly: Anomaly): Action => {
- switch (anomaly.type) {
- case Anomaly_AnomalyType.DATABASE_CONNECTION: {
- return {
- onClick: () => {
- router.push({
- name: INSTANCE_ROUTE_DETAIL,
- params: {
- instanceId: extractInstanceResourceName(
- extractDatabaseResourceName(anomaly.resource).instance
- ),
- },
- });
- },
- title: t("anomaly.action.check-instance"),
- };
- }
- case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT:
- return {
- onClick: () => {
- state.selectedAnomaly = anomaly;
- },
- title: t("anomaly.action.view-diff"),
- };
- default:
- return {
- onClick: () => {},
- title: "",
- };
- }
-};
-</script>
diff --git a/frontend/src/components/AnomalyCenter/DatabaseSchemaDriftAnomalyModal.vue b/frontend/src/components/AnomalyCenter/DatabaseSchemaDriftAnomalyModal.vue
deleted file mode 100644
index 39331c112b..0000000000
--- a/frontend/src/components/AnomalyCenter/DatabaseSchemaDriftAnomalyModal.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <BBModal
- class="overflow-auto"
- :title="`'${database.databaseName}' schema drift - Latest recorded schema vs Actual`"
- @close="emit('close')"
- >
- <div
- class="space-y-4 flex flex-col overflow-hidden relative"
- style="width: calc(100vw - 10rem); height: calc(100vh - 12rem)"
- >
- <DiffEditor
- v-if="!isLoading"
- class="flex-1 w-full border rounded-md overflow-clip"
- :original="originalSchema"
- :modified="modifiedSchema"
- :readonly="true"
- />
- <div v-else class="flex justify-center items-center py-10">
- <BBSpin />
- </div>
- </div>
- </BBModal>
-</template>
-
-<script lang="ts" setup>
-import { onMounted, ref, computed } from "vue";
-import { BBModal, BBSpin } from "@/bbkit";
-import {
- useChangelogStore,
- useDatabaseV1Store,
- useDatabaseV1ByName,
-} from "@/store";
-import { Anomaly } from "@/types/proto/v1/anomaly_service";
-import { ChangelogView } from "@/types/proto/v1/database_service";
-import { wrapRefAsPromise } from "@/utils";
-import { DiffEditor } from "../MonacoEditor";
-
-const props = defineProps<{
- anomaly: Anomaly;
-}>();
-
-const emit = defineEmits(["close"]);
-
-const databaseStore = useDatabaseV1Store();
-const changelogStore = useChangelogStore();
-const isLoading = ref(true);
-const originalSchema = ref<string>("");
-const modifiedSchema = ref<string>("");
-
-const { database, ready } = useDatabaseV1ByName(
- computed(() => props.anomaly.resource)
-);
-
-onMounted(async () => {
- await wrapRefAsPromise(ready, true);
- const changelogs = await changelogStore.getOrFetchChangelogListOfDatabase(
- database.value.name,
- 1, // Only fetch the latest changelog.
- ChangelogView.CHANGELOG_VIEW_FULL, // Needs to fetch the full schema.
- `type = "BASELINE | MIGRATE | MIGRATE_SDL"` // Only fetch the schema related changelog.
- );
- if (changelogs.length > 0) {
- const latestChangelog = changelogs[0];
- originalSchema.value = latestChangelog.schema;
- }
- const schema = await databaseStore.fetchDatabaseSchema(
- `${database.value.name}/schema`
- );
- modifiedSchema.value = schema.schema;
- isLoading.value = false;
-});
-</script>
diff --git a/frontend/src/components/Database/DatabaseOverviewPanel.vue b/frontend/src/components/Database/DatabaseOverviewPanel.vue
index 0e677b02c2..a3f0a68ea9 100644
--- a/frontend/src/components/Database/DatabaseOverviewPanel.vue
+++ b/frontend/src/components/Database/DatabaseOverviewPanel.vue
@@ -1,30 +1,5 @@
<template>
<div class="space-y-6 divide-y divide-block-border">
- <div v-if="anomalySectionList.length > 0">
- <div class="text-lg leading-6 font-medium text-main mb-4 flex flex-row">
- {{ $t("common.anomalies") }}
- <span class="ml-2 textinfolabel items-center flex">
- {{ $t("anomaly.attention-desc") }}
- <a
- href="https://www.bytebase.com/docs/change-database/drift-detection?source=console"
- target="_blank"
- class="ml-1 normal-link inline-flex flex-row items-center"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </span>
- </div>
- <AnomalyTable :anomaly-section-list="anomalySectionList" />
- </div>
- <div
- v-else
- class="text-lg leading-6 font-medium text-main mb-4 flex flex-row"
- >
- {{ $t("database.no-anomalies-detected") }}
- <heroicons-outline:check-circle class="ml-1 w-6 h-6 text-success" />
- </div>
-
<!-- Description list -->
<DatabaseOverviewInfo :database="database" class="pt-4" />
@@ -173,8 +148,6 @@ import { NSelect } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
-import type { BBTableSectionDataSource } from "@/bbkit/types";
-import AnomalyTable from "@/components/AnomalyCenter/AnomalyTable.vue";
import DBExtensionDataTable from "@/components/DBExtensionDataTable.vue";
import { useDatabaseDetailContext } from "@/components/Database/context";
import ExternalTableDataTable from "@/components/ExternalTableDataTable.vue";
@@ -258,17 +231,6 @@ watch(
{ immediate: true }
);
-const anomalySectionList = computed((): BBTableSectionDataSource<Anomaly>[] => {
- const list: BBTableSectionDataSource<Anomaly>[] = [];
- if (props.anomalyList.length > 0) {
- list.push({
- title: props.database.name,
- list: props.anomalyList,
- });
- }
- return list;
-});
-
const schemaList = computed(() => {
return dbSchemaStore.getSchemaList(props.database.name);
});
diff --git a/frontend/src/components/Project/useProjectSidebar.ts b/frontend/src/components/Project/useProjectSidebar.ts
index d383f36ba6..c70bbb618a 100644
--- a/frontend/src/components/Project/useProjectSidebar.ts
+++ b/frontend/src/components/Project/useProjectSidebar.ts
@@ -20,7 +20,6 @@ import projectV1Routes, {
PROJECT_V1_ROUTE_DATABASES,
PROJECT_V1_ROUTE_ISSUES,
PROJECT_V1_ROUTE_SYNC_SCHEMA,
- PROJECT_V1_ROUTE_ANOMALIES,
PROJECT_V1_ROUTE_MEMBERS,
PROJECT_V1_ROUTE_SETTINGS,
PROJECT_V1_ROUTE_WEBHOOKS,
@@ -104,11 +103,6 @@ export const useProjectSidebar = (
type: "div",
hide: databaseChangeMode.value === DatabaseChangeMode.EDITOR,
},
- {
- title: t("common.anomalies"),
- path: PROJECT_V1_ROUTE_ANOMALIES,
- type: "div",
- },
],
},
{
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 7197da4e8b..7db690ba82 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -94,7 +94,6 @@
"query": "Query",
"transfer": "Transfer",
"schema": "Schema",
- "anomalies": "Anomalies",
"detail": "Detail",
"type": "Type",
"language": "Language",
@@ -1359,7 +1358,6 @@
"database": {
"sync-database": "Sync database",
"select": "Select database",
- "no-anomalies-detected": "No anomalies detected",
"sync-status": "Sync status",
"last-successful-sync": "Last successful sync",
"filter-database": "Filter database",
@@ -1496,18 +1494,10 @@
"not-found": "Cannot found the database"
},
"anomaly": {
- "attention-desc": "Bytebase periodically detects anomalies based on the instance scan interval, and surfaces the findings here.",
- "table-placeholder": "Hooray, no {type} anomaly detected!",
"types": {
- "connection-failure": "Connection failure",
- "schema-drift": "Schema drift"
},
"action": {
- "check-instance": "Check instance",
- "view-diff": "View diff"
- },
- "last-seen": "Last seen",
- "first-seen": "First seen"
+ }
},
"project": {
"table": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 7435c39018..009ae64833 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -94,7 +94,6 @@
"query": "Consulta",
"transfer": "Transferir",
"schema": "Esquema",
- "anomalies": "Anomalías",
"detail": "Detalle",
"type": "Tipo",
"language": "Idioma",
@@ -1359,7 +1358,6 @@
"database": {
"sync-database": "Sincronizar base de datos",
"select": "Seleccionar base de datos",
- "no-anomalies-detected": "No se detectaron anomalías",
"sync-status": "Estado de sincronización",
"last-successful-sync": "Última sincronización exitosa",
"filter-database": "Filtrar base de datos",
@@ -1496,18 +1494,10 @@
"not-found": "No se puede encontrar la base de datos"
},
"anomaly": {
- "attention-desc": "Bytebase detecta periódicamente anomalías según el intervalo de escaneo de la instancia y muestra los hallazgos aquí.",
- "table-placeholder": "¡Hurra, no se detectaron anomalías de {type}!",
"types": {
- "connection-failure": "Fallo de conexión",
- "schema-drift": "Variación de esquema"
},
"action": {
- "check-instance": "Ver instancia",
- "view-diff": "Ver diferencia"
- },
- "last-seen": "Último visto",
- "first-seen": "Primero visto"
+ }
},
"project": {
"table": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index f77bdba721..99cadd1259 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -94,7 +94,6 @@
"query": "お問い合わせ",
"transfer": "移行",
"schema": "スキーマ",
- "anomalies": "異常",
"detail": "詳細",
"type": "タイプ",
"language": "言語",
@@ -1359,7 +1358,6 @@
"database": {
"sync-database": "データベースを同期",
"select": "データベースの選択",
- "no-anomalies-detected": "例外は検出されませんでした",
"sync-status": "同期ステータス",
"last-successful-sync": "最後に成功した同期",
"filter-database": "フィルターデータベース",
@@ -1496,18 +1494,10 @@
"not-found": "データベースが見つかりません"
},
"anomaly": {
- "attention-desc": "Bytebase は、インスタンスに設定されたスキャン間隔に基づいて異常を検出し、ここに表示します。",
- "table-placeholder": "すばらしいです。{type} 例外は検出されませんでした。",
"types": {
- "connection-failure": "接続に失敗しました",
- "schema-drift": "スキーマの逸脱"
},
"action": {
- "check-instance": "インスタンスをチェックする",
- "view-diff": "違いを表示する"
- },
- "last-seen": "最後に見たのは",
- "first-seen": "第一印象"
+ }
},
"project": {
"table": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index cbd112a1e8..67b83f3194 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -94,7 +94,6 @@
"query": "Truy vấn",
"transfer": "Chuyển",
"schema": "Lược đồ",
- "anomalies": "Bất thường",
"detail": "Chi tiết",
"type": "Loại",
"language": "Ngôn ngữ",
@@ -1359,7 +1358,6 @@
"database": {
"sync-database": "Đồng bộ cơ sở dữ liệu",
"select": "Chọn cơ sở dữ liệu",
- "no-anomalies-detected": "Không phát hiện thấy bất thường",
"sync-status": "Trạng thái đồng bộ",
"last-successful-sync": "Lần đồng bộ thành công cuối cùng",
"filter-database": "Lọc cơ sở dữ liệu",
@@ -1496,18 +1494,10 @@
"not-found": "Không tìm thấy cơ sở dữ liệu"
},
"anomaly": {
- "attention-desc": "Bytebase định kỳ phát hiện các bất thường dựa trên khoảng thời gian quét phiên bản và hiển thị các phát hiện ở đây.",
- "table-placeholder": "Hoan hô, không phát hiện thấy bất thường {type} nào!",
"types": {
- "connection-failure": "Lỗi kết nối",
- "schema-drift": "Độ lệch lược đồ"
},
"action": {
- "check-instance": "Kiểm tra phiên bản",
- "view-diff": "Xem khác biệt"
- },
- "last-seen": "Lần cuối thấy",
- "first-seen": "Lần đầu thấy"
+ }
},
"project": {
"table": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 63b40e5a1a..dade763917 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -94,7 +94,6 @@
"query": "查询",
"transfer": "转移",
"schema": "Schema",
- "anomalies": "异常",
"detail": "详情",
"type": "类型",
"language": "语言",
@@ -1359,7 +1358,6 @@
"database": {
"sync-database": "同步数据库",
"select": "选择数据库",
- "no-anomalies-detected": "没有检测到异常",
"sync-status": "同步状态",
"last-successful-sync": "最后一次成功的同步",
"filter-database": "过滤数据库",
@@ -1496,18 +1494,10 @@
"not-found": "找不到数据库"
},
"anomaly": {
- "attention-desc": "Bytebase 会根据实例配置的扫描间隔检测异常,并且展示在这里。",
- "table-placeholder": "很棒,没有检测到{type}异常!",
"types": {
- "connection-failure": "连接失败",
- "schema-drift": "Schema 偏差"
},
"action": {
- "check-instance": "检查实例",
- "view-diff": "查看差异"
- },
- "last-seen": "上次出现",
- "first-seen": "首次出现"
+ }
},
"project": {
"table": {
diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.ts
index 820beb2e0d..235d44832f 100644
--- a/frontend/src/router/dashboard/projectV1.ts
+++ b/frontend/src/router/dashboard/projectV1.ts
@@ -20,7 +20,6 @@ export const PROJECT_V1_ROUTE_PLAN_DETAIL = `${PROJECT_V1_ROUTE_DASHBOARD}.plan.
export const PROJECT_V1_ROUTE_CHANGELISTS = `${PROJECT_V1_ROUTE_DASHBOARD}.changelist`;
export const PROJECT_V1_ROUTE_CHANGELIST_DETAIL = `${PROJECT_V1_ROUTE_DASHBOARD}.changelist.detail`;
export const PROJECT_V1_ROUTE_SYNC_SCHEMA = `${PROJECT_V1_ROUTE_DASHBOARD}.sync-schema`;
-export const PROJECT_V1_ROUTE_ANOMALIES = `${PROJECT_V1_ROUTE_DASHBOARD}.anomalies`;
export const PROJECT_V1_ROUTE_AUDIT_LOGS = `${PROJECT_V1_ROUTE_DASHBOARD}.audit-logs`;
export const PROJECT_V1_ROUTE_WEBHOOKS = `${PROJECT_V1_ROUTE_DASHBOARD}.webhook`;
export const PROJECT_V1_ROUTE_WEBHOOK_CREATE = `${PROJECT_V1_ROUTE_DASHBOARD}.webhook.create`;
@@ -204,16 +203,6 @@ const projectV1Routes: RouteRecordRaw[] = [
import("@/views/project/ProjectSyncDatabasePanelV1.vue"),
props: true,
},
- {
- path: "anomalies",
- name: PROJECT_V1_ROUTE_ANOMALIES,
- meta: {
- overrideTitle: true,
- },
- component: () =>
- import("@/views/project/ProjectAnomalyCenterDashboard.vue"),
- props: true,
- },
{
path: "audit-logs",
name: PROJECT_V1_ROUTE_AUDIT_LOGS,
diff --git a/frontend/src/views/project/ProjectAnomalyCenterDashboard.vue b/frontend/src/views/project/ProjectAnomalyCenterDashboard.vue
deleted file mode 100644
index 855e96abe4..0000000000
--- a/frontend/src/views/project/ProjectAnomalyCenterDashboard.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-<template>
- <AnomalyCenterDashboard :project="project" :selected-tab="'database'" />
-</template>
-
-<script setup lang="ts">
-import { computed } from "vue";
-import AnomalyCenterDashboard from "@/components/AnomalyCenter/AnomalyCenterDashboard.vue";
-import { useProjectByName } from "@/store";
-import { projectNamePrefix } from "@/store/modules/v1/common";
-
-const props = defineProps<{
- projectId: string;
- allowEdit: boolean;
-}>();
-
-const { project } = useProjectByName(
- computed(() => `${projectNamePrefix}${props.projectId}`)
-);
-</script>