1
1
< nz-select nzMode ="tags " nzPlaceHolder ="Filter steps " [(ngModel)] ="filter.tags " (ngModelChange) ="filterSteps() "
2
2
[nzCustomTemplate] ="multipleTemplate ">
3
- < nz-option *ngFor ="let item of presentStates " [nzLabel] ="item " [nzValue] ="item ">
4
- </ nz-option >
3
+ < ng-container *ngFor ="let item of presentStates ">
4
+ < nz-option [nzLabel] ="item " [nzValue] ="item ">
5
+ </ nz-option >
6
+ </ ng-container >
7
+
5
8
< ng-template #multipleTemplate let-item >
6
9
< span *ngIf ="item.nzValue.startsWith('State:') ">
7
10
< i nz-icon [nzType] ="getIcon(item.nzValue.split(':')[1]) "> </ i >
12
15
</ span >
13
16
</ ng-template >
14
17
</ nz-select >
18
+
19
+
15
20
< div class ="list ">
16
- < lib-utask-box *ngFor ="let stepName of filteredStepNames "
17
- [header] ="{openable: resolution.steps[stepName].state !== 'TODO', init: false, class: 'primary', color: (states[resolution.steps[stepName].state] ? states[resolution.steps[stepName].state].color : defaultState.color), fontColor: (states[resolution.steps[stepName].state] ? states[resolution.steps[stepName].state].fontColor : defaultState.fontColor)} ">
18
- < div app-box-header > {{resolution.steps[stepName].state}} - {{stepName}}
19
- < nz-button-group nzSize ="small ">
20
- < button type ="button " nz-button [nzGhost] ="true " title ="View as code "
21
- (click) ="previewStepDetails(resolution.steps[stepName]); $event.stopPropagation(); "
22
- nzTooltipTitle ="View as code " nz-tooltip > < i nz-icon nzType ="file-text "> </ i > </ button >
23
- < button type ="button " nz-button [nzGhost] ="true " [disabled] ="resolution.state != 'PAUSED' "
24
- (click) ="updateStepState(resolution.steps[stepName]); $event.stopPropagation(); "
25
- nzTooltipTitle ="Edit step state " nz-tooltip > < i nz-icon nzType ="edit "> </ i > </ button >
26
- < button type ="button " nz-button [nzGhost] ="true " [disabled] ="resolution.state != 'PAUSED' "
27
- nzTooltipTitle ="Edit step " nz-tooltip
28
- (click) ="updateStep(resolution.steps[stepName]); $event.stopPropagation(); "> < i nz-icon
29
- nzType ="form "> </ i > </ button >
30
- </ nz-button-group >
31
- </ div >
32
- < div app-box-content >
33
- < div *ngIf ="resolution.steps[stepName].output ">
34
- Output:
35
- < lib-utask-editor [ngModel] ="JSON.stringify(resolution.steps[stepName].output, null, 4) "
36
- ngDefaultControl [ngModelOptions] ="{standalone: true} " [config] ="editorConfigPayload ">
37
- </ lib-utask-editor >
38
- </ div >
39
- < div *ngIf ="resolution.steps[stepName].children ">
40
- Children:
41
- < lib-utask-editor [ngModel] ="JSON.stringify(resolution.steps[stepName].children, null, 4) "
42
- ngDefaultControl [ngModelOptions] ="{standalone: true} " [config] ="editorConfigChildren ">
43
- </ lib-utask-editor >
44
- </ div >
45
- < div *ngIf ="resolution.steps[stepName].error ">
46
- < span *ngIf ="resolution.steps[stepName].state !== 'DONE' "> Error:</ span >
47
- < span *ngIf ="resolution.steps[stepName].state === 'DONE' "> Message:</ span >
48
- < lib-utask-editor [ngModel] ="JSON.stringify(resolution.steps[stepName].error, null, 4) " ngDefaultControl
49
- [ngModelOptions] ="{standalone: true} " [config] ="editorConfigError ">
50
- </ lib-utask-editor >
51
- </ div >
52
- < div
53
- *ngIf ="resolution.steps[stepName].last_run && resolution.steps[stepName].last_run != '0001-01-01T00:00:00Z' ">
54
- Last run: < strong > {{resolution.steps[stepName].last_run | utaskFromNow}}</ strong >
55
- </ div >
56
- </ div >
57
- </ lib-utask-box >
21
+ < nz-table nzTemplateMode nzSize ="small ">
22
+ < tbody >
23
+ < ng-container *ngFor ="let stepName of filteredStepNames ">
24
+ < tr
25
+ [ngStyle] ="lineStyle(stepName) ">
26
+ < td > {{stepName}}</ td >
27
+ < td style ="text-align: right;padding-right: 8px; ">
28
+ < nz-button-group nzSize ="small " nzType ="default ">
29
+ < button type ="button " nzType ="default " nz-button [nzGhost] ="true " title ="View error "
30
+ *ngIf ="resolution.steps[stepName].error "
31
+ (click) ="preview('Step '+ resolution.steps[stepName].name, resolution.steps[stepName].error); $event.stopPropagation(); "
32
+ nzTooltipTitle ="View error " nz-tooltip > < i nz-icon nzType ="warning "
33
+ nzTheme ="outline "> </ i > </ button >
34
+
35
+ < button type ="button " nzType ="default " nz-button [nzGhost] ="true " title ="View children "
36
+ *ngIf ="resolution.steps[stepName].children "
37
+ (click) ="preview('Children '+ resolution.steps[stepName].name, resolution.steps[stepName].children); $event.stopPropagation(); "
38
+ nzTooltipTitle ="View children " nz-tooltip > < i nz-icon nzType ="partition "
39
+ nzTheme ="outline "> </ i > </ button >
40
+
41
+ < button type ="button " nzType ="default " nz-button [nzGhost] ="true " title ="View as code "
42
+ (click) ="preview('Step '+ resolution.steps[stepName].name, resolution.steps[stepName]); $event.stopPropagation(); "
43
+ nzTooltipTitle ="View as code " nz-tooltip > < i nz-icon nzType ="file-text "> </ i > </ button >
44
+
45
+ < button type ="button " nzType ="default " nz-button [nzGhost] ="true "
46
+ *ngIf ="resolution.state == 'PAUSED' "
47
+ (click) ="updateStepState(resolution.steps[stepName]); $event.stopPropagation(); "
48
+ nzTooltipTitle ="Edit step state " nz-tooltip > < i nz-icon nzType ="edit "> </ i > </ button >
49
+ < button type ="button " nzType ="default " nz-button [nzGhost] ="true "
50
+ *ngIf ="resolution.state == 'PAUSED' " nzTooltipTitle ="Edit step " nz-tooltip
51
+ (click) ="updateStep(resolution.steps[stepName]); $event.stopPropagation(); "> < i nz-icon
52
+ nzType ="form "> </ i > </ button >
53
+ </ nz-button-group >
54
+ </ td >
55
+ </ tr >
56
+ </ ng-container >
57
+ </ tbody >
58
+ </ nz-table >
58
59
</ div >
0 commit comments