Skip to content

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

chore: only keep single attention box for anomaly center (#7528)

Tianzhou (天舟)c2319b1837aa
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 507585fcda..4f3cbc6dc9 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2108,7 +2108,7 @@
},
"bb-feature-schema-drift": {
"title": "Schema drift",
- "desc": "@:{'subscription.upgrade'} to unlock schema drift auto-detection."
+ "desc": "Detect out-of-band schema changes and report schema drift."
},
"bb-feature-branding": {
"title": "Branding",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 38dd7b03ce..6ab636294b 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2105,7 +2105,7 @@
},
"bb-feature-schema-drift": {
"title": "Desviación de esquema",
- "desc": "@:{'subscription.upgrade'} para desbloquear la detección automática de desviación de esquema."
+ "desc": "Detecte cambios de esquema fuera de banda e informe la desviación del esquema."
},
"bb-feature-branding": {
"title": "Personalización",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 896f4e582c..ea7548b049 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1979,7 +1979,7 @@
"successfully-start-trial": "成功开启 {days} 天的免费试用",
"successfully-upgrade-trial": "成功升级为{plan}试用",
"require-subscription": "这个功能需要{requiredPlan}订阅,请购买 Bytebase 证书来解锁该功能。",
- "required-plan-with-trial": "这个功能需要{requiredPlan}订阅,但是{startTrial}。",
+ "required-plan-with-trial": "这个功能需要{requiredPlan}订阅,{startTrial}。",
"trial-for-plan": "您可以开启{plan}的 {days} 天免费试用 - 无需任何信用卡或预付费",
"trial-for-days": "您可以开启 {days} 天的免费试用 - 无需任何信用卡或预付费",
"upgrade-trial": "您可以直接将现有的试用升级到这个版本",
@@ -2102,7 +2102,7 @@
},
"bb-feature-schema-drift": {
"title": "Schema 偏差",
- "desc": "@:{'subscription.upgrade'}来解锁 schema 偏差异常的自动检测。"
+ "desc": "检测非预期的 schema 变更并且报告 schema 偏差。"
},
"bb-feature-branding": {
"title": "自定义品牌信息",
diff --git a/frontend/src/views/AnomalyCenterDashboard.vue b/frontend/src/views/AnomalyCenterDashboard.vue
index c65ef3f623..2072763a34 100644
--- a/frontend/src/views/AnomalyCenterDashboard.vue
+++ b/frontend/src/views/AnomalyCenterDashboard.vue
@@ -1,22 +1,28 @@
<template>
<div class="flex flex-col px-4 pb-4">
- <BBAttention
- :style="'INFO'"
- :title="$t('anomaly.attention-title')"
- :description="$t('anomaly.attention-desc')"
- />
-
<FeatureAttentionForInstanceLicense
v-if="hasSchemaDriftFeature"
- custom-class="mt-5"
+ custom-class="my-4"
feature="bb.feature.schema-drift"
/>
<FeatureAttention
v-else
- custom-class="mt-5"
+ custom-class="my-4"
feature="bb.feature.schema-drift"
/>
+ <div class="textinfolabel">
+ {{ $t("anomaly.attention-desc") }}
+ <a
+ href="https://www.bytebase.com/docs/administration/anomaly-center/"
+ 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="mt-4 space-y-4">
<div
v-for="(item, i) in [
@@ -34,7 +40,7 @@
:class="`lg:grid-cols-${item.length}`"
>
<template v-for="(summary, index) in item" :key="index">
- <div class="p-4 shadow rounded-lg tooltip-wrapper">
+ <div class="px-4 py-2 border tooltip-wrapper">
<span class="text-sm tooltip">
{{
$t("anomaly.tooltip", {
@@ -45,29 +51,31 @@
})
}}
</span>
- <dt class="textlabel">
- {{ summary.environmentName }}
- </dt>
- <dd class="flex flex-row mt-1 text-xl text-main space-x-2">
- <span class="flex flex-row items-center">
- <heroicons-outline:exclamation-circle
- class="w-5 h-5 mr-1 text-error"
- />
- {{ summary.criticalCount }}
- </span>
- <span class="flex flex-row items-center">
- <heroicons-outline:exclamation
- class="w-5 h-5 mr-1 text-warning"
- />
- {{ summary.highCount }}
- </span>
- <span class="flex flex-row items-center">
- <heroicons-outline:information-circle
- class="w-5 h-5 mr-1 text-info"
- />
- {{ summary.mediumCount }}
- </span>
- </dd>
+ <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>
</template>
</dl>