Skip to content

Commit

Permalink
Tasks enhancement
Browse files Browse the repository at this point in the history
- Task definition: add the page Task Execution (list)
- Task definition: launch and destroy actions are moved in the header page
- Launch: fix the cancel action
  • Loading branch information
oodamien authored and BoykoAlex committed Jun 28, 2018
1 parent b9508ac commit 6b94094
Show file tree
Hide file tree
Showing 17 changed files with 743 additions and 65 deletions.
8 changes: 8 additions & 0 deletions ui/src/app/tasks/components/tasks.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ export interface TaskCreateParams {
definition: string;
name: string;
}

export interface TaskExecutionListParams extends ListParams {
task: string;
page: number;
size: number;
sort: string;
order: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<div *ngIf="executions$ | async as executions; else loading">

<div id="executions-list">

<div id="filters" class="pui-filter" style="margin-top: 0.4rem">

<div class="pui-filter-center">
<div style="height: 34px">
&nbsp;
</div>
</div>

<div class="pui-filter-actions">
<div class="pui-filter-right" style="text-align: right">
<button (click)="refresh(executions.params)" name="app-refresh" type="button" class="btn btn-default btn-icon"
title="Refresh">
<span class="glyphicon glyphicon-refresh"></span>
</button>
</div>
</div>
</div>

<table *ngIf="executions.page?.items && executions.page.items.length > 0"
class="table table-hover table-actions" id="taskExecutionsTable">
<thead>
<tr>
<th style="width: 140px">
<app-sort id="sort-id" (change)="applySort(executions.params, $event)" [value]="'TASK_EXECUTION_ID'"
[sort]="executions.params">
Execution Id
</app-sort>
</th>
<th nowrap="">
<app-sort id="sort-startdate" (change)="applySort(executions.params, $event)" [value]="'START_TIME'"
[sort]="executions.params">
Start Date
</app-sort>
</th>
<th nowrap="">
<app-sort id="sort-enddate" (change)="applySort(executions.params, $event)" [value]="'END_TIME'"
[sort]="executions.params">
End Date
</app-sort>
</th>
<th nowrap="">
<app-sort id="sort-exitcode" (change)="applySort(executions.params, $event)" [value]="'EXIT_CODE'"
[sort]="executions.params">
Exit Code
</app-sort>
</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="let item of executions.page.items | paginate: executions.page.getPaginationInstance(); index as i">
<tr>
<td>
<a (click)="details(item)" style="cursor: pointer">
#{{ item.executionId }}
</a>
</td>
<td>
{{ item.startTime }}
</td>
<td>
{{ item.endTime }}
</td>
<td>
{{ item.exitCode }}
</td>
<td class="table-actions" width="10px" nowrap="">
<div class="actions" role="group">
<button type="button" name="task-details{{ i }}" (click)="details(item)" class="btn btn-default"
title="Details">
<span class="glyphicon glyphicon-search"></span>
</button>
</div>
</td>
</tr>
</ng-container>
</tbody>
</table>

<div class="row">
<div class="col-xs-12">
<div id="pagination" *ngIf="executions.page && executions.page.totalPages > 1">
<pagination-controls *ngIf="executions.page.items.length > 0 "
(pageChange)="getPage(executions.params, $event)"></pagination-controls>
</div>
</div>
<div class="col-xs-12" *ngIf="executions.page && executions.page?.totalElements > 0">
<app-pager [page]="executions.params.page" [total]="executions.page.totalElements"
[size]="executions.params.size" (onSizeChange)="changeSize(executions.params, $event)">
</app-pager>
</div>
</div>

<div *ngIf="executions.page" id="empty" style="padding-top:1.5rem">

<div *ngIf="isExecutionsEmpty(executions.page)" class="text-center">
<div class="alert alert-warning" style="display:inline-block;margin:0 auto">
<strong>No execution.</strong>
</div>
</div>

</div>

</div>

</div>
<ng-template #loading>
<app-loader></app-loader>
</ng-template>
Loading

0 comments on commit 6b94094

Please sign in to comment.