Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 4a3fe11

Browse files
oodamienghillert
authored andcommitted
Tasks: update message and visibility creation action
Resolves #921
1 parent 75af5bf commit 4a3fe11

File tree

4 files changed

+6
-25
lines changed

4 files changed

+6
-25
lines changed

ui/src/app/tasks/components/tasks-tabulation/tasks-tabulation.component.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
<app-page-head>
44
<app-page-head-title><strong>Tasks</strong></app-page-head-title>
55
<app-page-head-actions [appRoles]="['ROLE_CREATE']">
6-
<ng-container *ngIf="appsState$ | async as appsState;">
7-
<button class="btn btn-primary btn-fa" (click)="createTask()" *ngIf="appsState.tasks > 0">
8-
<span class="fa fa-plus"></span>
9-
Create task(s)
10-
</button>
11-
</ng-container>
6+
<button class="btn btn-primary btn-fa" (click)="createTask()">
7+
<span class="fa fa-plus"></span>
8+
Create task(s)
9+
</button>
1210
</app-page-head-actions>
1311
</app-page-head>
1412

ui/src/app/tasks/components/tasks-tabulation/tasks-tabulation.component.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ export class TasksTabulationComponent implements OnInit {
2828

2929
counters$: Observable<any>;
3030

31-
32-
/**
33-
* Apps State
34-
*/
35-
appsState$: Observable<any>;
36-
3731
/**
3832
* Constructor
3933
*
@@ -49,7 +43,6 @@ export class TasksTabulationComponent implements OnInit {
4943
}
5044

5145
ngOnInit() {
52-
this.appsState$ = this.appsService.appsState();
5346
this.refresh();
5447
}
5548

ui/src/app/tasks/task-definitions/task-definitions.component.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@
6464

6565
<app-list-empty [page]="taskDefinitions" [filters]="[params.q]">
6666
<p>There is <strong>no registered task</strong>, yet.</p>
67-
<div *ngIf="appsState$ | async as appsState">
68-
<p *ngIf="appsState.tasks > 0" [appRoles]="['ROLE_CREATE']">
67+
<div>
68+
<p [appRoles]="['ROLE_CREATE']">
6969
You can <a (click)="createTask()">Create Task(s)</a> or <a (click)="refresh()">Refresh</a> the page
7070
</p>
71-
<p *ngIf="appsState.tasks == 0" [appRoles]="['ROLE_CREATE']">
72-
To create task(s), you have to <a (click)="registerApps()">register Apps</a> first.<br />
73-
You can <a (click)="refresh()">Refresh</a> the page.
74-
</p>
7571
</div>
7672
</app-list-empty>
7773

ui/src/app/tasks/task-definitions/task-definitions.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ export class TaskDefinitionsComponent implements OnInit, OnDestroy {
9595
*/
9696
context: any;
9797

98-
/**
99-
* Apps State
100-
*/
101-
appsState$: Observable<any>;
102-
10398
/**
10499
* Constructor
105100
*
@@ -249,7 +244,6 @@ export class TaskDefinitionsComponent implements OnInit, OnDestroy {
249244
this.form = { q: this.context.q, checkboxes: [] };
250245
this.itemsSelected = this.context.itemsSelected || [];
251246

252-
this.appsState$ = this.appsService.appsState();
253247
this.sharedAboutService.getFeatureInfo()
254248
.subscribe((featureInfo: FeatureInfo) => {
255249
this.schedulerEnabled = !!featureInfo.schedulerEnabled;

0 commit comments

Comments
 (0)