[alerter] 告警处理指标数据,告警表达式计算,内容模版关键字替换
This commit is contained in:
@@ -21,7 +21,7 @@ import javax.validation.Valid;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static com.usthe.common.util.CommonConstants.MONITOR_NOT_EXIST;
|
||||
import static com.usthe.common.util.CommonConstants.MONITOR_NOT_EXIST_CODE;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ public class AlertDefineController {
|
||||
AlertDefine alertDefine = alertDefineService.getAlertDefine(id);
|
||||
Message.MessageBuilder<AlertDefine> messageBuilder = Message.builder();
|
||||
if (alertDefine == null) {
|
||||
messageBuilder.code(MONITOR_NOT_EXIST).msg("AlertDefine not exist.");
|
||||
messageBuilder.code(MONITOR_NOT_EXIST_CODE).msg("AlertDefine not exist.");
|
||||
} else {
|
||||
messageBuilder.data(alertDefine);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user