|
|
@@ -1,13 +1,17 @@
|
|
|
package cn.reghao.autodop.dmaster.machine.controller;
|
|
|
|
|
|
import cn.reghao.autodop.dmaster.machine.service.MachineService;
|
|
|
+import cn.reghao.autodop.dmaster.notification.entity.NotifyGroup;
|
|
|
import cn.reghao.autodop.dmaster.utils.WebBody;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author reghao
|
|
|
* @date 2019-08-30 18:49:15
|
|
|
@@ -23,8 +27,29 @@ public class MachineController {
|
|
|
this.machineService = machineService;
|
|
|
}
|
|
|
|
|
|
+ @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) {
|
|
|
+ //notifyGroups.forEach(notifyGroup -> monitorService.setNotify(jobId, notifyGroup));
|
|
|
+ return ResponseEntity.ok().body(WebBody.success());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "编辑 SSH 认证信息")
|
|
|
+ @PostMapping(value = "/sshauth", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public ResponseEntity<String> editSshAuth() {
|
|
|
+ return ResponseEntity.ok().body(WebBody.success());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "编辑机器额外信息")
|
|
|
+ @PostMapping(value = "/host", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public ResponseEntity<String> editExtraMachineInfo() {
|
|
|
+ return ResponseEntity.ok().body(WebBody.success());
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "删除机器")
|
|
|
- @DeleteMapping("/host")
|
|
|
+ @DeleteMapping(value = "/host", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public ResponseEntity<String> machine() {
|
|
|
return ResponseEntity.ok().body(WebBody.success());
|
|
|
}
|