diff --git a/frontends/dnet-is-application/src/app/info/info.component.html b/frontends/dnet-is-application/src/app/info/info.component.html index d9b20827..c54a31b7 100644 --- a/frontends/dnet-is-application/src/app/info/info.component.html +++ b/frontends/dnet-is-application/src/app/info/info.component.html @@ -12,12 +12,12 @@ Property - {{element.k}} + {{element.k}} Value - {{element.v}} + {{element.v}} @@ -36,23 +36,23 @@ - + - + - - + + - - + + diff --git a/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.css b/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.css index 491543a1..7c244416 100644 --- a/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.css +++ b/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.css @@ -14,3 +14,5 @@ .collapse-buttons { text-align: right; } .collapse-buttons button { font-size: 0.6em; } + +.mat-expansion-panel-spacing { margin: 0; } diff --git a/frontends/dnet-is-application/src/app/wf-history/wf-dialog.html b/frontends/dnet-is-application/src/app/wf-history/wf-dialog.html index 9872724e..a68c3ffa 100644 --- a/frontends/dnet-is-application/src/app/wf-history/wf-dialog.html +++ b/frontends/dnet-is-application/src/app/wf-history/wf-dialog.html @@ -1,6 +1,11 @@

Details

+

+ Started at: {{startDate}}
+ Finished at: {{endDate}}
+ Duration: {{duration}}
+

Filter @@ -11,12 +16,12 @@
- + - + @@ -28,4 +33,8 @@
Group Group {{element.group}} Name Name {{element.name}} Versions {{element.versions}} Versions {{v}}
Files {{element.files}} Files {{f}}
k{{element.k}}{{element.k}} v {{element.v}} {{element.v}}
- \ No newline at end of file + + +
+ +
diff --git a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.css b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.css index e69de29b..8b137891 100644 --- a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.css +++ b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.css @@ -0,0 +1 @@ + diff --git a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.html b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.html index 1e25d063..7708ed95 100644 --- a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.html +++ b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.html @@ -1,70 +1,67 @@ -

Workflow History

+

Workflow History

- - Filter - - + + Filter + + -

- Recent workflows (max {{total}}) - Workflows from {{from | date:"yyyy-MM-dd HH:mm:ss"}} to {{to | date:"yyyy-MM-dd HH:mm:ss"}} - Workflows from {{from | date:"yyyy-MM-dd HH:mm:ss"}} to undefined - Workflows from undefined to {{to | date:"yyyy-MM-dd HH:mm:ss"}} -
- Count : {{historyDatasource.filteredData.length}} -

+

+ Recent workflows (max {{total}}) + Workflows from {{from | date:"yyyy-MM-dd HH:mm:ss"}} to {{to | + date:"yyyy-MM-dd HH:mm:ss"}} + Workflows from {{from | date:"yyyy-MM-dd HH:mm:ss"}} to + undefined + Workflows from undefined to {{to | date:"yyyy-MM-dd + HH:mm:ss"}} +
+ Count : {{historyDatasource.filteredData.length}} +

+ + + + + -
Process Id + {{element.processId}} +
+ + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Workflow Name {{element.name}} Process Id - {{element.processId}} - Workflow Family {{element.family}} Workflow Name {{element.name}} Datasource {{element.dsName}} Workflow Family {{element.family}} Datasource {{element.dsName}} Status {{element.status}} Start Date {{element.startDate}} End Date {{element.endDate}}
No data matching the filter "{{input.value}}"
+ + Status + {{element.status}} + + + Start Date + {{element.startDate}} + + + End Date + {{element.endDate}} + + + + + + No data matching the filter "{{input.value}}" + + \ No newline at end of file diff --git a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.ts b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.ts index 0bb19362..3bf70c43 100644 --- a/frontends/dnet-is-application/src/app/wf-history/wf-history.component.ts +++ b/frontends/dnet-is-application/src/app/wf-history/wf-history.component.ts @@ -17,7 +17,7 @@ export class WfHistoryComponent { historyDatasource: MatTableDataSource = new MatTableDataSource([]); - colums: string[] = ['processId', 'name', 'family', 'status', 'startDate', 'endDate', 'dsName']; + colums: string[] = ['processId', 'name', 'family', 'dsName', 'status', 'startDate', 'endDate']; total: number = 100 from: number = -1 @@ -55,8 +55,13 @@ export class WfHistoryComponent { @Component({ selector: 'wf-dialog', templateUrl: 'wf-dialog.html', + styleUrls: ['wf-history.component.css'] + }) export class WfDialog { + startDate:string = ''; + endDate:string = ''; + duration:string = ''; wfDatasource: MatTableDataSource = new MatTableDataSource([]); colums: string[] = ['k', 'v']; @@ -66,10 +71,17 @@ export class WfDialog { @Inject(MAT_DIALOG_DATA) public data: WfHistoryEntry, ) { let list:KeyValue[] = []; - for (let [key, value] of new Map(Object.entries(data.details))) { + let map = new Map(Object.entries(data.details)); + for (let [key, value] of map) { list.push({k: key, v: value}); } this.wfDatasource.data = list; + this.startDate = data.startDate; + this.endDate = data.endDate; + this.duration = this.calculateDateDiff( + parseInt(map.get('system:startDate')), + parseInt(map.get('system:endDate')) + ); } applyFilter(event: Event) { const filterValue = (event.target as HTMLInputElement).value.trim().toLowerCase(); @@ -78,4 +90,57 @@ export class WfDialog { onNoClick(): void { this.dialogRef.close(); } + + + calculateDateDiff(start:number, end:number):string { + if (start <= 0 || end <= 0) { + return '-'; + } + var seconds = 0; + var minutes = 0; + var hours = 0; + var days = 0; + + if (end > start) { + seconds = Math.round((end - start) / 1000); + if (seconds > 60) { + minutes = Math.floor(seconds / 60); + seconds = seconds % 60; + if (minutes > 60) { + hours = Math.floor(minutes / 60); + minutes = minutes % 60; + if (hours > 24) { + days = Math.floor(hours / 24); + hours = hours % 24; + } + } + } + } + var res = ''; + if (days > 0) { + if (res) { res += ', '; } + res += days + " day(s)" + } + if (hours > 0) { + if (res) { res += ', '; } + res += hours + " hour(s)" + } + if (minutes > 0) { + if (res) { res += ', '; } + res += minutes + " minute(s)" + } + if (seconds > 0) { + if (res) { res += ', '; } + res += seconds + " second(s)" + } + if (!res) { + res = '0 seconds'; + } + + return res; +} + + + + } \ No newline at end of file diff --git a/frontends/dnet-is-application/src/styles.css b/frontends/dnet-is-application/src/styles.css index 4acdef93..642ee400 100644 --- a/frontends/dnet-is-application/src/styles.css +++ b/frontends/dnet-is-application/src/styles.css @@ -15,7 +15,7 @@ table { font-family: monospace; } -a:not([href]) { +a, a:not([href]) { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; @@ -24,4 +24,22 @@ a:not([href]) { text-underline-offset: 3px; color: #336699; } - \ No newline at end of file + +table { + table-layout: fixed !important; +} + +tr { + height: auto !important; +} + +th, td { + white-space: nowrap !important; + overflow: hidden !important; + text-overflow: ellipsis !important; + font-size: 0.9em !important; + padding-top: 0.5em !important; + padding-bottom: 0.5em !important; +} + +.muted { color: darkgray; }