MasamiYui commented on code in PR #3505: URL: https://github.com/apache/hertzbeat/pull/3505#discussion_r2166365015
########## hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties: ########## @@ -32,3 +32,4 @@ alerter.notify.console = 登入控制台 alerter.priority.0 = 紧急告警 alerter.priority.1 = 严重告警 alerter.priority.2 = 警告告警 +alerter.calculate.parse.error = 表达式未完全解析,可能存在语法错误或输入不完整 Review Comment: Make supplementary modifications in alerter_zh_TW.properties ########## hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/service/impl/AlertDefineServiceImpl.java: ########## @@ -218,4 +224,18 @@ public List<AlertDefine> getRealTimeAlertDefines() { } return alertDefines; } + + @Override + public List<Map<String, Object>> getDefinePreview(String datasource, String type, String expr) { + if (!StringUtils.hasText(expr) || !StringUtils.hasText(datasource) || !StringUtils.hasText(type)) { + return Collections.emptyList(); + } + switch (type) { + case ALERT_THRESHOLD_TYPE_PERIODIC: Review Comment: Enum suggest using CommonConstants.xxx -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org