Mercurial > hg > ugly-duckling
comparison src/app/feature-extraction-menu/feature-extraction-menu.component.ts @ 46:88052122ec01
Basic select box listing all outputs from available feature extractors a la Sonic Visualiser menus.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Mon, 05 Dec 2016 11:59:22 +0000 |
parents | 13f5f228ed98 |
children | 933c64ebcd13 |
comparison
equal
deleted
inserted
replaced
45:05e9cec6d20a | 46:88052122ec01 |
---|---|
19 this.extractors = []; | 19 this.extractors = []; |
20 } | 20 } |
21 | 21 |
22 ngOnInit() { | 22 ngOnInit() { |
23 this.piperService.list().then(available => { | 23 this.piperService.list().then(available => { |
24 available.available.forEach(staticData => this.extractors.push({ | 24 const maxCharacterLimit = 50; |
25 key: staticData.key, | 25 available.available.forEach(staticData => { |
26 name: staticData.basic.name | 26 if (staticData.basicOutputInfo.length > 1) |
27 }) | 27 staticData.basicOutputInfo.forEach(output => this.extractors.push({ |
28 ); | 28 key: `${staticData.key}:${output.identifier}`, |
29 name: `${staticData.basic.name}: ${output.name}`.substr(0, maxCharacterLimit) + '...' | |
30 }) | |
31 ); | |
32 else | |
33 this.extractors.push({ | |
34 key: staticData.key, | |
35 name: staticData.basic.name.substr(0, maxCharacterLimit) + '...' | |
36 }); | |
37 }); | |
29 }); | 38 }); |
30 } | 39 } |
31 | 40 |
32 } | 41 } |