[alter,webapp]fix 告警定义关联监控问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.usthe.alert.controller;
|
||||
|
||||
import com.usthe.common.entity.alerter.AlertDefine;
|
||||
import com.usthe.common.entity.alerter.AlertDefineBind;
|
||||
import com.usthe.common.entity.alerter.AlertDefineMonitorBind;
|
||||
import com.usthe.alert.service.AlertDefineService;
|
||||
import com.usthe.common.entity.dto.Message;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -84,16 +84,16 @@ public class AlertDefineController {
|
||||
@ApiOperation(value = "应用告警定义与监控关联", notes = "应用指定告警定义与监控关联关系")
|
||||
public ResponseEntity<Message<Void>> applyAlertDefineMonitorsBind(
|
||||
@ApiParam(value = "告警定义ID", example = "6565463543") @PathVariable("alertDefineId") long alertDefineId,
|
||||
@RequestBody List<AlertDefineBind> alertDefineBinds) {
|
||||
alertDefineService.applyBindAlertDefineMonitors(alertDefineId, alertDefineBinds);
|
||||
@RequestBody List<AlertDefineMonitorBind> alertDefineMonitorBinds) {
|
||||
alertDefineService.applyBindAlertDefineMonitors(alertDefineId, alertDefineMonitorBinds);
|
||||
return ResponseEntity.ok(new Message<>("Apply success"));
|
||||
}
|
||||
|
||||
@GetMapping(path = "/{alertDefineId}/monitors")
|
||||
@ApiOperation(value = "应用告警定义与监控关联", notes = "应用指定告警定义与监控关联关系")
|
||||
public ResponseEntity<Message<List<AlertDefineBind>>> getAlertDefineMonitorsBind(
|
||||
public ResponseEntity<Message<List<AlertDefineMonitorBind>>> getAlertDefineMonitorsBind(
|
||||
@ApiParam(value = "告警定义ID", example = "6565463543") @PathVariable("alertDefineId") long alertDefineId) {
|
||||
List<AlertDefineBind> defineBinds = alertDefineService.getBindAlertDefineMonitors(alertDefineId);
|
||||
List<AlertDefineMonitorBind> defineBinds = alertDefineService.getBindAlertDefineMonitors(alertDefineId);
|
||||
return ResponseEntity.ok(new Message<>(defineBinds));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user