herywang commented on a change in pull request #2589:
URL: https://github.com/apache/incubator-inlong/pull/2589#discussion_r810446868



##########
File path: 
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ClusterController.java
##########
@@ -58,6 +59,37 @@
         return Response.success(clusterInfoService.list(request));
     }
 
+    @RequestMapping(value = "/common/save", method = RequestMethod.GET)
+    @ApiOperation(value = "Add a cluster info")
+    @OperationLog(operation = OperationType.CREATE)
+    public Response<Integer> saveCluster(@RequestBody ClusterInfo clusterInfo) 
{
+        String currentUser = LoginUserUtil.getLoginUserDetail().getUserName();
+        return Response.success(clusterInfoService.save(clusterInfo, 
currentUser));
+    }
+
+    @RequestMapping(value = "/common/get/{id}")

Review comment:
       I will modify this problem in the next issue and pull request.

##########
File path: 
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ClusterController.java
##########
@@ -58,6 +59,37 @@
         return Response.success(clusterInfoService.list(request));
     }
 
+    @RequestMapping(value = "/common/save", method = RequestMethod.GET)
+    @ApiOperation(value = "Add a cluster info")
+    @OperationLog(operation = OperationType.CREATE)
+    public Response<Integer> saveCluster(@RequestBody ClusterInfo clusterInfo) 
{
+        String currentUser = LoginUserUtil.getLoginUserDetail().getUserName();
+        return Response.success(clusterInfoService.save(clusterInfo, 
currentUser));
+    }
+
+    @RequestMapping(value = "/common/get/{id}")
+    @ApiOperation(value = "Query cluster information of the common")
+    @ApiImplicitParam(name = "id", value = "common cluster ID", dataTypeClass 
= Integer.class, required = true)
+    public Response<ClusterInfo> getCluster(@PathVariable Integer id) {
+        return Response.success(clusterInfoService.get(id));
+    }
+
+    @RequestMapping(value = "/common/update", method = RequestMethod.POST)

Review comment:
       I will modify this problem in the next issue and pull request.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to