diff --git a/dnet-app/frontends/is/src/app/dsm/dsm.component.ts b/dnet-app/frontends/is/src/app/dsm/dsm.component.ts
index b02dca2..58d4be1 100644
--- a/dnet-app/frontends/is/src/app/dsm/dsm.component.ts
+++ b/dnet-app/frontends/is/src/app/dsm/dsm.component.ts
@@ -166,6 +166,17 @@ export class DsmApiComponent implements OnInit {
const wfDialogRef = this.dialog.open(WfConfLauncherDialog, {
data: conf
});
+
+ wfDialogRef.componentInstance.newHistory.subscribe((data: WfHistoryEntry[]) => {
+ const wHistoryfDialogRef = this.dialog.open(WfHistoryDialog, {
+ data: {
+ 'confId': conf.id,
+ 'dsId': conf.dsId,
+ 'apiId': conf.apiId,
+ 'processId': (data.length > 0) ? data[0].processId : undefined
+ }
+ });
+ });
}
destroyWfConf(wfConfId: string): void {
diff --git a/dnet-app/frontends/is/src/app/wf-confs/wf-common.component.ts b/dnet-app/frontends/is/src/app/wf-confs/wf-common.component.ts
index a513b77..7a1ea06 100644
--- a/dnet-app/frontends/is/src/app/wf-confs/wf-common.component.ts
+++ b/dnet-app/frontends/is/src/app/wf-confs/wf-common.component.ts
@@ -1,4 +1,4 @@
-import { Component, Inject, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
+import { Component, Inject, OnInit, ViewChild, ElementRef, AfterViewInit, Input, Output, EventEmitter } from '@angular/core';
import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
import { MatSelectChange } from '@angular/material/select';
@@ -224,6 +224,8 @@ export class WfConfLauncherDialog {
form = new FormGroup({});
+ @Output() newHistory = new EventEmitter();
+
constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: WfConf, public client: WfConfsClient, public dialog: MatDialog) {
this.conf = data;
this.form.controls = {}
@@ -239,16 +241,7 @@ export class WfConfLauncherDialog {
});
}
- 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.length > 0) ? data[0].processId : undefined
- }
- });
- });
+ this.client.startWfConfiguration(this.conf.id, wfs, (data: WfHistoryEntry[]) => this.newHistory.emit(data));
}
isStartable(): boolean {
diff --git a/dnet-app/frontends/is/src/app/wf-confs/wf-conf-single.html b/dnet-app/frontends/is/src/app/wf-confs/wf-conf-single.html
index 058977d..9333687 100644
--- a/dnet-app/frontends/is/src/app/wf-confs/wf-conf-single.html
+++ b/dnet-app/frontends/is/src/app/wf-confs/wf-conf-single.html
@@ -14,56 +14,20 @@
configure
-
+
-
+
-
- Process Id |
-
- {{element.processId}}
- |
-
-
-
-
- Status |
- {{element.status}}
- |
-
-
-
- Start Date |
- {{element.startDate}} |
-
-
-
-
- End Date |
- {{element.endDate}} |
-
-
-
-
-
-
-
- No execution in history" |
-
-
-
diff --git a/dnet-app/frontends/is/src/app/wf-confs/wf-confs.component.ts b/dnet-app/frontends/is/src/app/wf-confs/wf-confs.component.ts
index 4372010..d1c017e 100644
--- a/dnet-app/frontends/is/src/app/wf-confs/wf-confs.component.ts
+++ b/dnet-app/frontends/is/src/app/wf-confs/wf-confs.component.ts
@@ -88,21 +88,24 @@ export class WfConfSingle implements OnInit, OnChanges {
@Input() conf?: WfConf;
prevConfId = '';
- historyDatasource: MatTableDataSource = new MatTableDataSource([]);
- colums: string[] = ['processId', 'status', 'startDate', 'endDate'];
+ historyEntries: WfHistoryEntry[] = [];
constructor(public client: WfConfsClient, public dialog: MatDialog, public snackBar: MatSnackBar) { }
ngOnInit(): void {
- if (this.conf) {
- this.client.loadWfHistoryForConf(this.conf?.id, (data: WfHistoryEntry[]) => this.historyDatasource.data = data);
- }
+ this.refresh();
}
ngOnChanges(changes: SimpleChanges): void {
if (this.conf && this.conf.id != this.prevConfId) {
this.prevConfId = this.conf.id;
- this.client.loadWfHistoryForConf(this.conf?.id, (data: WfHistoryEntry[]) => this.historyDatasource.data = data);
+ this.refresh();
+ }
+ }
+
+ refresh() {
+ if (this.conf) {
+ this.client.loadWfHistoryForConf(this.conf?.id, (data: WfHistoryEntry[]) => this.historyEntries = data);
}
}
@@ -110,6 +113,9 @@ export class WfConfSingle implements OnInit, OnChanges {
const wfDialogRef = this.dialog.open(WfConfLauncherDialog, {
data: this.conf
});
+ wfDialogRef.componentInstance.newHistory.subscribe((data: WfHistoryEntry[]) => {
+ this.historyEntries = data;
+ });
}
editConf() {
diff --git a/dnet-app/frontends/is/src/app/wf-history/wf-history.component.html b/dnet-app/frontends/is/src/app/wf-history/wf-history.component.html
index 3b0b184..d581bfa 100644
--- a/dnet-app/frontends/is/src/app/wf-history/wf-history.component.html
+++ b/dnet-app/frontends/is/src/app/wf-history/wf-history.component.html
@@ -8,4 +8,4 @@
Workflows from undefined to {{to}}
-
+
diff --git a/dnet-app/frontends/is/src/app/wf-history/wf-history.component.ts b/dnet-app/frontends/is/src/app/wf-history/wf-history.component.ts
index 1d74e79..54da98b 100644
--- a/dnet-app/frontends/is/src/app/wf-history/wf-history.component.ts
+++ b/dnet-app/frontends/is/src/app/wf-history/wf-history.component.ts
@@ -105,11 +105,12 @@ export class WfHistoryDialog implements OnInit {
})
export class WfHistoryTableComponent implements AfterViewInit, OnInit, OnChanges {
- @Input() entries: WfHistoryEntry[] = [];
+ @Input() entries?: WfHistoryEntry[];
+ @Input() allfields?: boolean;
historyDatasource: MatTableDataSource = new MatTableDataSource([]);
- colums: string[] = ['graph', 'processId', 'name', 'family', 'dsName', 'status', 'startDate', 'endDate'];
+ colums: string[] = [];
total: number = 100
from?: Date;
@@ -118,11 +119,16 @@ export class WfHistoryTableComponent implements AfterViewInit, OnInit, OnChanges
constructor(public dialog: MatDialog) { }
ngOnInit() {
- this.historyDatasource.data = this.entries;
+ if (this.allfields) {
+ this.colums = ['graph', 'processId', 'name', 'family', 'dsName', 'status', 'startDate', 'endDate'];
+ } else {
+ this.colums = ['graph', 'processId', 'status', 'startDate', 'endDate'];
+ }
+ this.historyDatasource.data = this.entries ? this.entries : [];
};
ngOnChanges() {
- this.historyDatasource.data = this.entries;
+ this.historyDatasource.data = this.entries ? this.entries : [];
}
@ViewChild(MatSort) sort: MatSort | undefined
diff --git a/dnet-app/frontends/is/src/app/wf-history/wf-history.dialog.html b/dnet-app/frontends/is/src/app/wf-history/wf-history.dialog.html
index 487eb2f..fc52979 100644
--- a/dnet-app/frontends/is/src/app/wf-history/wf-history.dialog.html
+++ b/dnet-app/frontends/is/src/app/wf-history/wf-history.dialog.html
@@ -1,7 +1,7 @@
Recent Workflows
-
+