|
@@ -1,6 +1,6 @@
|
|
|
package cn.reghao.autodop.dmaster.machine.controller;
|
|
package cn.reghao.autodop.dmaster.machine.controller;
|
|
|
|
|
|
|
|
-import cn.reghao.autodop.dmaster.machine.service.MachineService;
|
|
|
|
|
|
|
+import cn.reghao.autodop.dmaster.machine.service.MachineHostService;
|
|
|
import cn.reghao.jdkutil.result.WebBody;
|
|
import cn.reghao.jdkutil.result.WebBody;
|
|
|
import cn.reghao.autodop.dmaster.machine.model.po.SshAuth;
|
|
import cn.reghao.autodop.dmaster.machine.model.po.SshAuth;
|
|
|
import cn.reghao.autodop.dmaster.notification.model.po.NotifyGroup;
|
|
import cn.reghao.autodop.dmaster.notification.model.po.NotifyGroup;
|
|
@@ -23,9 +23,9 @@ import java.util.List;
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/api/machine/host")
|
|
@RequestMapping("/api/machine/host")
|
|
|
public class MachineHostController {
|
|
public class MachineHostController {
|
|
|
- private final MachineService machineService;
|
|
|
|
|
|
|
+ private final MachineHostService machineService;
|
|
|
|
|
|
|
|
- public MachineHostController(MachineService machineService) {
|
|
|
|
|
|
|
+ public MachineHostController(MachineHostService machineService) {
|
|
|
this.machineService = machineService;
|
|
this.machineService = machineService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -44,15 +44,6 @@ public class MachineHostController {
|
|
|
return ResponseEntity.ok().body(WebBody.success());
|
|
return ResponseEntity.ok().body(WebBody.success());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value = "设置机器通知")
|
|
|
|
|
- @PostMapping(value = "/notify/{machineId}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
- @ResponseBody
|
|
|
|
|
- public ResponseEntity<String> setMonitorNotify(@PathVariable("machineId") String machineId,
|
|
|
|
|
- @RequestParam("groupId") List<NotifyGroup> notifyGroups) {
|
|
|
|
|
- machineService.setMachineNotify(machineId, notifyGroups);
|
|
|
|
|
- return ResponseEntity.ok().body(WebBody.success());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@ApiOperation(value = "删除机器")
|
|
@ApiOperation(value = "删除机器")
|
|
|
@DeleteMapping(value = "/{machineId}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@DeleteMapping(value = "/{machineId}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public ResponseEntity<String> machine(@PathVariable("machineId") String machineId) {
|
|
public ResponseEntity<String> machine(@PathVariable("machineId") String machineId) {
|