From 94a78beb16921ba9bb1e363e9793233a7b6ce712 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Thu, 30 Mar 2023 14:59:57 +0200 Subject: [PATCH] ui to start wfs --- .../wf/WfConfigurationsController.java | 9 +++- .../src/app/common/is.service.ts | 7 ++-- .../src/app/wf-confs/wf-confs.component.html | 4 +- .../src/app/wf-confs/wf-confs.component.ts | 19 ++++----- .../manager/wf/WorkflowManagerService.java | 41 +++++++++---------- .../wf/cron/ScheduledWorkflowLauncher.java | 2 +- .../wf/nodes/LaunchWorkflowJobNode.java | 2 +- 7 files changed, 43 insertions(+), 41 deletions(-) diff --git a/apps/dnet-is-application/src/main/java/eu/dnetlib/manager/wf/WfConfigurationsController.java b/apps/dnet-is-application/src/main/java/eu/dnetlib/manager/wf/WfConfigurationsController.java index e8662316..b05a7e20 100644 --- a/apps/dnet-is-application/src/main/java/eu/dnetlib/manager/wf/WfConfigurationsController.java +++ b/apps/dnet-is-application/src/main/java/eu/dnetlib/manager/wf/WfConfigurationsController.java @@ -28,7 +28,7 @@ public class WfConfigurationsController extends AbstractDnetController { @GetMapping("/sections") public List listWfSections() throws Exception { - return wfManagerService.listSsections(); + return wfManagerService.listSections(); } @GetMapping("/sections/{section}") @@ -56,7 +56,12 @@ public class WfConfigurationsController extends AbstractDnetController { @GetMapping("/conf/{id}/start") public ExecutionStatus startWorkflowConfiguration(@PathVariable final String id) throws Exception { - return wfManagerService.startWorkflowConfiguration(id, null, null); + return wfManagerService.startWorkflowConfiguration(id); + } + + @GetMapping("/conf/{id}/destroy") + public ExecutionStatus destroyWorkflowConfiguration(@PathVariable final String id) throws Exception { + return wfManagerService.destroyWorkflowConfiguration(id); } @GetMapping("/process/{id}") diff --git a/frontends/dnet-is-application/src/app/common/is.service.ts b/frontends/dnet-is-application/src/app/common/is.service.ts index 8befa3a9..7ba6174e 100644 --- a/frontends/dnet-is-application/src/app/common/is.service.ts +++ b/frontends/dnet-is-application/src/app/common/is.service.ts @@ -10,16 +10,13 @@ import { firstValueFrom, Observable } from 'rxjs'; }) export class ISService { - constructor(public client: HttpClient, public snackBar: MatSnackBar) { } - loadResourceTypes(onSuccess: Function) { this.httpGet("/ajax/resourceTypes", onSuccess) } - loadResourceType(id: string, onSuccess: Function) { this.httpGet("/ajax/resourceTypes/" + encodeURIComponent(id), onSuccess); } @@ -248,6 +245,10 @@ export class ISService { this.httpGet('./ajax/wfs/conf/' + encodeURIComponent(id) + '/start', onSuccess); } + startDestroyWfConfiguration(id: string, onSuccess: Function): void { + this.httpGet('./ajax/wfs/conf/' + encodeURIComponent(id) + '/destroy', onSuccess); + } + findProcess(id: string, onSuccess: Function): void { this.httpGet('./ajax/wfs/process/' + encodeURIComponent(id), onSuccess); } diff --git a/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.html b/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.html index 746477a2..7bfa5707 100644 --- a/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.html +++ b/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.html @@ -13,8 +13,8 @@
-