From b8d5d1f0e45639a40fc356f5fbe426912a2a49b8 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 20 Dec 2023 10:52:09 +0800 Subject: [PATCH] feat: add a warning about using the h2 database in actuator page (#5072) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area console /kind feature /milestone 2.12.x #### What this PR does / why we need it: 在概览页面添加使用 H2 数据库的警告。 图片 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/5047 #### Special notes for your reviewer: 需要测试使用 H2 数据库运行 Halo,进入概览页面,观察是否有提示。 #### Does this PR introduce a user-facing change? ```release-note 在 Console 的概览页面添加使用 H2 数据库的警告。 ``` --- .../modules/system/actuator/Actuator.vue | 20 +++++++++++++++---- console/src/locales/en.yaml | 5 +++++ console/src/locales/zh-CN.yaml | 1 + console/src/locales/zh-TW.yaml | 3 +++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/console/console-src/modules/system/actuator/Actuator.vue b/console/console-src/modules/system/actuator/Actuator.vue index 28415cedc..4f0b89872 100644 --- a/console/console-src/modules/system/actuator/Actuator.vue +++ b/console/console-src/modules/system/actuator/Actuator.vue @@ -369,10 +369,22 @@ const handleDownloadLogfile = () => { [info.java.runtime.name, info.java.runtime.version].join(' / ') " /> - + + + {{ [info.database.name, info.database.version].join(" / ") }} + + + + + {{ info.os.name }} {{ info.os.version }} / {{ info.os.arch }} diff --git a/console/src/locales/en.yaml b/console/src/locales/en.yaml index 44d2c4afd..da982460c 100644 --- a/console/src/locales/en.yaml +++ b/console/src/locales/en.yaml @@ -1193,6 +1193,11 @@ core: The external access url detected is inconsistent with the current access url, which may cause some links to fail to redirect properly. Please check the external access url settings. + h2_warning: >- + H2 database is only used in development and testing environments. It is + not recommended to use H2 database in production environment. + + If you must use it, please back up your data on time. backup: title: Backup and Restore tabs: diff --git a/console/src/locales/zh-CN.yaml b/console/src/locales/zh-CN.yaml index 3a0c45381..91abc09f5 100644 --- a/console/src/locales/zh-CN.yaml +++ b/console/src/locales/zh-CN.yaml @@ -1132,6 +1132,7 @@ core: os: 操作系统:{os} alert: external_url_invalid: 检测到外部访问地址与当前访问地址不一致,可能会导致部分链接无法正常跳转,请检查外部访问地址设置。 + h2_warning: H2 数据库仅用于开发环境和测试环境,不推荐在生产环境中使用 H2 数据库。如果必须要使用,请按时进行数据备份。 backup: title: 备份与恢复 tabs: diff --git a/console/src/locales/zh-TW.yaml b/console/src/locales/zh-TW.yaml index 9c54fb424..bb9f444d8 100644 --- a/console/src/locales/zh-TW.yaml +++ b/console/src/locales/zh-TW.yaml @@ -1120,6 +1120,9 @@ core: os: 操作系統:{os} alert: external_url_invalid: 檢測到外部訪問地址與當前訪問地址不一致,可能會導致部分連結無法正常跳轉,請檢查外部訪問地址設置。 + h2_warning: |- + H2 資料庫僅用於開發環境和測試環境,不建議在生產環境中使用 H2 資料庫。 + 如果必須要使用,請按時進行資料備份。 backup: title: 備份與還原 tabs: