This commit is contained in:
Michele Artini 2024-01-22 16:01:07 +01:00
parent b4d997efd4
commit d4fce0efeb
5 changed files with 12 additions and 7 deletions

View File

@ -128,7 +128,7 @@ public class ApiController extends DnetRestController {
if (StringUtils.isNotBlank(conf.getDsId())) { return this.wfManagerService.recentHistoryForDsId(conf.getDsId()); }
if (StringUtils.isNotBlank(conf.getId())) { return this.wfManagerService.recentHistoryForConfiguration(conf.getId()); }
return this.wfManagerService.recentHistory();
return this.wfManagerService.recentHistoryForConfiguration(id);
}
@GetMapping("/conf/{id}/destroy")

View File

@ -233,6 +233,7 @@ export interface WfParam {
export interface WfHistoryEntry {
processId: string,
name: string,
wfConfId: string,
family: string,
status: string,
startDate: string,

View File

@ -239,13 +239,13 @@ export class WfConfLauncherDialog {
});
}
this.client.startWfConfiguration(this.conf.id, wfs, (data: WfHistoryEntry) => {
this.client.startWfConfiguration(this.conf.id, wfs, (data: WfHistoryEntry[]) => {
const wfDialogRef = this.dialog.open(WfHistoryDialog, {
data: {
'confId': this.conf.id,
'dsId': this.conf.dsId,
'apiId': this.conf.apiId,
'processId': data.processId,
'confId': undefined
'processId': (data.length > 0) ? data[0].processId : undefined
}
});
});

View File

@ -43,11 +43,11 @@ export class WfConfsClient extends ISClient {
let url = '/proxy/byType/wf_manager/api/conf/' + encodeURIComponent(id) + '/start';
if (opts) url += '?' + opts;
this.httpGet<WfHistoryEntry>(url, onSuccess);
this.httpGet<WfHistoryEntry[]>(url, onSuccess);
}
startDestroyWfConfiguration(id: string, onSuccess: Function): void {
this.httpGet<WfHistoryEntry>('/proxy/byType/wf_manager/api/conf/' + encodeURIComponent(id) + '/destroy', onSuccess);
this.httpGet<WfHistoryEntry[]>('/proxy/byType/wf_manager/api/conf/' + encodeURIComponent(id) + '/destroy', onSuccess);
}
findProcess(id: string, onSuccess: Function): void {

View File

@ -133,8 +133,12 @@ export class WfConfSingle implements OnInit, OnChanges {
}
openWfHistoryDialog(wf: WfHistoryEntry): void {
alert(1);
const wfDialogRef = this.dialog.open(WfHistoryDialog, {
data: wf
data: {
'confId': wf.wfConfId,
'processId': wf.processId
}
});
}