# HG changeset patch # User Lucas Thompson # Date 1496843490 -3600 # Node ID 48904aa87ba385e2a885b112e07798ad6dd5d004 # Parent 5220174f2712ff214f2c694bd7c2a872a41130f2 Rudimentary mechanism for loading remote plugins, with a loading spinner. Also small clean up for stuff left over from the md-select stuff. diff -r 5220174f2712 -r 48904aa87ba3 src/app/feature-extraction-menu/feature-extraction-menu.component.css --- a/src/app/feature-extraction-menu/feature-extraction-menu.component.css Wed Jun 07 08:58:38 2017 +0100 +++ b/src/app/feature-extraction-menu/feature-extraction-menu.component.css Wed Jun 07 14:51:30 2017 +0100 @@ -8,3 +8,19 @@ margin-top: 10pt; padding: 10pt; } + +.container button { + margin: 0 auto; + display: block; +} + +.container md-spinner { + height: 20px; + width: 20px; + margin: 0 auto; + display: block; +} + +md-list-item { + cursor: pointer; +} diff -r 5220174f2712 -r 48904aa87ba3 src/app/feature-extraction-menu/feature-extraction-menu.component.html --- a/src/app/feature-extraction-menu/feature-extraction-menu.component.html Wed Jun 07 08:58:38 2017 +0100 +++ b/src/app/feature-extraction-menu/feature-extraction-menu.component.html Wed Jun 07 14:51:30 2017 +0100 @@ -19,4 +19,9 @@ + + diff -r 5220174f2712 -r 48904aa87ba3 src/app/feature-extraction-menu/feature-extraction-menu.component.ts --- a/src/app/feature-extraction-menu/feature-extraction-menu.component.ts Wed Jun 07 08:58:38 2017 +0100 +++ b/src/app/feature-extraction-menu/feature-extraction-menu.component.ts Wed Jun 07 14:51:30 2017 +0100 @@ -11,7 +11,6 @@ } from '../services/feature-extraction/feature-extraction.service'; import {ListResponse} from 'piper'; import {Subscription} from 'rxjs/Subscription'; -import {MdSelect} from '@angular/material'; export interface ExtractorOutputInfo { extractorKey: string; @@ -48,6 +47,7 @@ private populateExtractors: (available: ListResponse) => void; extractors: Iterable; private librariesUpdatedSubscription: Subscription; + private isLoading: boolean; constructor(private piperService: FeatureExtractionService) { this.extractors = []; @@ -69,17 +69,10 @@ acc.push({name, outputs}); return acc; }, [] as ExtractorInfo[]); + this.isLoading = false; }; } - private getFirstSelectedItemOrEmpty(select: MdSelect): string { - const selected = select.selected; - if (selected) { - return selected instanceof Array ? selected[0].value : selected.value; - } - return ''; - } - ngOnInit() { this.librariesUpdatedSubscription = this.piperService.librariesUpdated$.subscribe(this.populateExtractors); @@ -96,6 +89,7 @@ } load(): void { + this.isLoading = true; this.piperService.updateAvailableLibraries(); }