fuchanghai commented on code in PR #14261:
URL:
https://github.com/apache/dolphinscheduler/pull/14261#discussion_r1309705110
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java:
##########
@@ -425,4 +434,43 @@ public Result
queryProcessInstancesByTriggerCode(@RequestAttribute(value = Const
Map<String, Object> result =
processInstanceService.queryByTriggerCode(loginUser, projectCode, triggerCode);
return returnDataList(result);
}
+
+ @Operation(summary = "queryWorkflowInstanceLog", description =
"QUERY_WORKFLOW_INSTANCE_LOG")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE",
required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "workflowInstanceId", description =
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation =
int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM",
required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true,
schema = @Schema(implementation = int.class, example = "100"))
+ })
+ @GetMapping(value = "/log/view")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_TASK_INSTANCE_LOG_ERROR)
Review Comment:
should we use ```QUERY_WORKFLOW_INSTANCE_LOG_ERROR``` instead of ```
QUERY_TASK_INSTANCE_LOG_ERROR ```
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java:
##########
@@ -425,4 +434,43 @@ public Result
queryProcessInstancesByTriggerCode(@RequestAttribute(value = Const
Map<String, Object> result =
processInstanceService.queryByTriggerCode(loginUser, projectCode, triggerCode);
return returnDataList(result);
}
+
+ @Operation(summary = "queryWorkflowInstanceLog", description =
"QUERY_WORKFLOW_INSTANCE_LOG")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE",
required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "workflowInstanceId", description =
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation =
int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM",
required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true,
schema = @Schema(implementation = int.class, example = "100"))
+ })
+ @GetMapping(value = "/log/view")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_TASK_INSTANCE_LOG_ERROR)
+ @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+ public Result<RollViewLogDTO> queryLog(@Parameter(hidden = true)
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @RequestParam(value =
"workflowInstanceId") int workflowInstanceId,
+ @RequestParam(value =
"skipLineNum") int skipNum,
+ @RequestParam(value = "limit") int
limit) {
+ RollViewLogDTO rollViewLogResponse =
+ workflowInstanceLogService.queryWorkflowInstanceLog(loginUser,
workflowInstanceId, skipNum, limit);
+ return Result.success(rollViewLogResponse);
+ }
+
+ @Operation(summary = "downloadWorkflowInstanceLog", description =
"DOWNLOAD_WORKFLOW_INSTANCE_LOG")
+ @Parameters({
+ @Parameter(name = "workflowInstanceId", description =
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation =
int.class, example = "100"))
+ })
+ @GetMapping(value = "/log/download")
+ @ResponseBody
+ @ApiException(DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR)
Review Comment:
As Above
--
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]