Skip to content

Commit

Permalink
feat(dashboard): display the resolver_inputs
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Bétrancourt <thomas@betrancourt.net>
  • Loading branch information
rclsilver committed Aug 29, 2023
1 parent 7b66b70 commit 62fa1bc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ export default class Resolution {
base_configurations: any;
task_id: string;
task_title: string;
resolver_inputs?: { [key: string]: any };
steps: { [key: string]: Step };
}
21 changes: 12 additions & 9 deletions ui/dashboard/projects/utask-lib/src/lib/@routes/task/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,11 @@
</a>
<span *ngIf="!(meta$ | async).user_is_admin">{{(task$ | async).template_name}}</span>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Inputs">
<table>
<tbody>
<tr *ngFor="let inputKey of objectKeys((task$ | async).input)">
<td>{{inputKey}}</td>
<td>{{(task$ | async).input[inputKey] | json}}</td>
</tr>
</tbody>
</table>
<nz-descriptions-item *ngIf="(task$ | async) as task" nzTitle="Inputs" class="inputs">
<div *ngFor="let inputKey of objectKeys(task.input)" class="input">
<span class="key">{{ inputKey }}</span>
<span class="value">{{task.input[inputKey] | json}}</span>
</div>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Information">
Created by {{(task$ | async).requester_username}} <abbr
Expand Down Expand Up @@ -141,6 +137,7 @@
</ul>
</nz-dropdown-menu>
</div>
<pre>{{resolution|json}}</pre>
<div app-box-content>
<div nz-row [nzGutter]="16">
<div nz-col [nzSpan]="8">
Expand All @@ -154,6 +151,12 @@
<nz-descriptions-item nzTitle="Last stop">
{{resolution.last_stop | date: 'yyyy/MM/dd HH:mm'}}
</nz-descriptions-item>
<nz-descriptions-item *ngIf="resolution.resolver_inputs" nzTitle="Resolver inputs" class="inputs">
<div *ngFor="let inputKey of objectKeys(resolution.resolver_inputs)" class="input">
<span class="key">{{ inputKey }}</span>
<span class="value">{{resolution.resolver_inputs[inputKey] | json}}</span>
</div>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Run count">
{{resolution.run_count}} / {{resolution.run_max}}
</nz-descriptions-item>
Expand Down
12 changes: 12 additions & 0 deletions ui/dashboard/projects/utask-lib/src/lib/@routes/task/task.sass
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,15 @@ lib-utask-steps-viewer
&_WAITING, &_TO_AUTORUN_DELAYED
background: $color-waiting !important
color: white !important

.inputs
display: flex
flex-direction: column

.input
.key
&::after
content: ": "

.value
font-family: monospace

0 comments on commit 62fa1bc

Please sign in to comment.