35 lines
1.0 KiB
Java
35 lines
1.0 KiB
Java
package eu.dnetlib.manager.wf;
|
|
|
|
import java.util.List;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import eu.dnetlib.manager.wf.model.WfProcessExecution;
|
|
|
|
@RestController
|
|
@RequestMapping("/ajax/wfs")
|
|
public class WfHistoryAjaxController {
|
|
|
|
@Autowired
|
|
private WorkflowLogger logger;
|
|
|
|
@GetMapping("/")
|
|
public List<WfProcessExecution> history(
|
|
@RequestParam(required = true) final int total,
|
|
@RequestParam(required = false) final Long from,
|
|
@RequestParam(required = false) final Long to) {
|
|
return logger.history(total, from, to);
|
|
}
|
|
|
|
@GetMapping("/{processId}")
|
|
public WfProcessExecution getProcessExecution(@PathVariable final String processId) {
|
|
return logger.getProcessExecution(processId);
|
|
}
|
|
|
|
}
|