Skip to content

Commit 805f31b

Browse files
committed
refactored request for enabled features
1 parent eb4ef29 commit 805f31b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

README_DEV.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The following commands are available:
5454
$ npm start
5555

5656
# Run the unit tests
57-
$ ng test --single-run
57+
$ ng test --watch=false
5858

5959
# Run lint
6060
$ ng lint

ui/src/app/shared/component/search/search.component.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ export class SearchComponent implements OnInit {
6464
}
6565

6666
ngOnInit(): void {
67-
this.aboutService.getAbout()
68-
.subscribe((about: AboutState) => {
69-
this.enabled.streams = about.features.streams;
70-
this.enabled.tasks = about.features.tasks;
71-
});
67+
this.aboutService.isFeatureEnabled('streams').then(enabled => this.enabled.streams = enabled);
68+
this.aboutService.isFeatureEnabled('tasks').then(enabled => this.enabled.tasks = enabled);
69+
7270
this.search.valueChanges
7371
.pipe(
7472
map(val => {

0 commit comments

Comments
 (0)