From a343d4328cdca9ba045ea81d5c7df528565ecf36 Mon Sep 17 00:00:00 2001 From: actiontech-zihan Date: Fri, 10 Apr 2026 05:47:33 +0000 Subject: [PATCH] feat(locale): add i18n keys for DM slow log scan task Add locale entries for DM slow log audit plan type name, slow SQL threshold parameter, and collection time range parameter. Fixes: S8-BUG-1 --- sqle/locale/active.en.toml | 3 +++ sqle/locale/active.zh.toml | 3 +++ sqle/locale/message_zh.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sqle/locale/active.en.toml b/sqle/locale/active.en.toml index 43d8dbba5f..17c4f32a98 100644 --- a/sqle/locale/active.en.toml +++ b/sqle/locale/active.en.toml @@ -21,6 +21,7 @@ ApMetaCollectTime = "collect time" ApMetaCustom = "Custom" ApMetaDB2TopSQL = "DB2 Top SQL" ApMetaDistributedLock = "Distributed Lock" +ApMetaDmSlowLog = "DM Slow Log" ApMetaDmTopSQL = "DM TOP SQL" ApMetaGoldenDBTopSQL = "GoldenDB TOP SQL" ApMetaHuaweiRdsMySQLSlowLog = "Huawei Cloud RDS MySQL slow log" @@ -313,8 +314,10 @@ ParamCollectIntervalMinuteOracle = "Collect Interval (Minute)" ParamCollectIntervalSecond = "Collect Interval (Second)" ParamCollectView = "Collect View Info" ParamDBInstanceId = "DB Instance ID" +ParamDmSlowSqlThresholdSecond = "Slow SQL threshold (seconds)" ParamFirstCollectDurationWithMaxDays = "Log collection time range when starting task (unit: hour, max %d days)" ParamFirstSqlsScrappedHours = "Slow log collection time range when starting task (unit: hour, only for mysql.slow_log)" +ParamFirstSqlsScrappedHoursDM = "Slow log collection time range when starting task (unit: hour)" ParamIndicator = "Indicator" ParamInstance = "Node address(0 means all nodes)" ParamOrderByColumn = "Sort Column in V$SQLAREA" diff --git a/sqle/locale/active.zh.toml b/sqle/locale/active.zh.toml index 59c94f11e5..51cb2402eb 100644 --- a/sqle/locale/active.zh.toml +++ b/sqle/locale/active.zh.toml @@ -21,6 +21,7 @@ ApMetaCollectTime = "采集时间" ApMetaCustom = "自定义" ApMetaDB2TopSQL = "DB2 Top SQL" ApMetaDistributedLock = "分布式锁" +ApMetaDmSlowLog = "DM 慢SQL日志" ApMetaDmTopSQL = "DM TOP SQL" ApMetaGoldenDBTopSQL = "GoldenDB TOP SQL" ApMetaHuaweiRdsMySQLSlowLog = "华为云RDS MySQL慢日志" @@ -313,8 +314,10 @@ ParamCollectIntervalMinuteOracle = "采集周期(分钟)" ParamCollectIntervalSecond = "采集周期(秒)" ParamCollectView = "是否采集视图信息" ParamDBInstanceId = "实例ID" +ParamDmSlowSqlThresholdSecond = "慢SQL阈值(秒)" ParamFirstCollectDurationWithMaxDays = "启动任务时拉取日志时间范围(单位:小时,最大%d天)" ParamFirstSqlsScrappedHours = "启动任务时拉取慢日志时间范围(单位:小时,仅对 mysql.slow_log 有效)" +ParamFirstSqlsScrappedHoursDM = "启动任务时拉取慢日志时间范围(单位:小时)" ParamIndicator = "关注指标" ParamInstance = "节点地址(0 代表所有节点)" ParamOrderByColumn = "V$SQLAREA中的排序字段" diff --git a/sqle/locale/message_zh.go b/sqle/locale/message_zh.go index fdcad22c83..83a08da763 100644 --- a/sqle/locale/message_zh.go +++ b/sqle/locale/message_zh.go @@ -414,6 +414,7 @@ var ( ApMetaSchemaMeta = &i18n.Message{ID: "ApMetaSchemaMeta", Other: "库表元数据"} ApMetaDistributedLock = &i18n.Message{ID: "ApMetaDistributedLock", Other: "分布式锁"} ApMetaDmTopSQL = &i18n.Message{ID: "ApMetaDmTopSQL", Other: "DM TOP SQL"} + ApMetaDmSlowLog = &i18n.Message{ID: "ApMetaDmSlowLog", Other: "DM 慢SQL日志"} ApMetaObForOracleTopSQL = &i18n.Message{ID: "ApMetaObForOracleTopSQL", Other: "OceanBase For Oracle TOP SQL"} ApMetaOceanBaseForMySQLFullCollect = &i18n.Message{ID: "ApMetaOceanBaseForMySQLFullCollect", Other: "全量采集"} ApMetaPostgreSQLTopSQL = &i18n.Message{ID: "ApMetaPostgreSQLTopSQL", Other: "TOP SQL"} @@ -437,7 +438,9 @@ var ( ParamCollectIntervalMinuteMySQL = &i18n.Message{ID: "ParamCollectIntervalMinuteMySQL", Other: "采集周期(分钟,仅对 mysql.slow_log 有效)"} ParamSlowLogCollectInput = &i18n.Message{ID: "ParamSlowLogCollectInput", Other: "采集来源"} ParamFirstSqlsScrappedHours = &i18n.Message{ID: "ParamFirstSqlsScrappedHours", Other: "启动任务时拉取慢日志时间范围(单位:小时,仅对 mysql.slow_log 有效)"} + ParamFirstSqlsScrappedHoursDM = &i18n.Message{ID: "ParamFirstSqlsScrappedHoursDM", Other: "启动任务时拉取慢日志时间范围(单位:小时)"} ParamCollectIntervalMinuteOracle = &i18n.Message{ID: "ParamCollectIntervalMinuteOracle", Other: "采集周期(分钟)"} + ParamDmSlowSqlThresholdSecond = &i18n.Message{ID: "ParamDmSlowSqlThresholdSecond", Other: "慢SQL阈值(秒)"} ParamOrderByColumn = &i18n.Message{ID: "ParamOrderByColumn", Other: "V$SQLAREA中的排序字段"} ParamOrderByColumnGeneric = &i18n.Message{ID: "ParamOrderByColumnGeneric", Other: "排序字段"} ParamCollectIntervalSecond = &i18n.Message{ID: "ParamCollectIntervalSecond", Other: "采集周期(秒)"}