comparison src/app/feature-extraction-menu/feature-extraction-menu.component.ts @ 44:13f5f228ed98

Add a component for the feature extraction menu, and start setting up some comms with the worker. Currently populating a select box with list of extractors from hardcoded server.
author Lucas Thompson <dev@lucas.im>
date Fri, 02 Dec 2016 16:55:14 +0000
parents
children 88052122ec01
comparison
equal deleted inserted replaced
43:c6f3ec87915a 44:13f5f228ed98
1 import {Component, OnInit} from '@angular/core';
2 import {FeatureExtractionService} from "../services/feature-extraction/feature-extraction.service";
3
4 interface ExtractorInfo {
5 key: string;
6 name: string;
7 }
8
9 @Component({
10 selector: 'app-feature-extraction-menu',
11 templateUrl: './feature-extraction-menu.component.html',
12 styleUrls: ['./feature-extraction-menu.component.css']
13 })
14 export class FeatureExtractionMenuComponent implements OnInit {
15
16 extractors: ExtractorInfo[];
17
18 constructor(private piperService: FeatureExtractionService) {
19 this.extractors = [];
20 }
21
22 ngOnInit() {
23 this.piperService.list().then(available => {
24 available.available.forEach(staticData => this.extractors.push({
25 key: staticData.key,
26 name: staticData.basic.name
27 })
28 );
29 });
30 }
31
32 }