material and activeModelIndex fix
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<h4>
|
||||
Average result: {{result.mean}}<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>
|
||||
</h4>
|
||||
<a href="javascript:" class="rb-details-toggle" rbDetailsToggle #triggerDetails="rbDetailsToggle">Details</a>
|
||||
<a class="rb-details-toggle" rbDetailsToggle #triggerDetails="rbDetailsToggle">Details</a>
|
||||
<div *ngIf="triggerDetails.open" class="space-below">
|
||||
<p *ngFor="let prediction of result.predictions; index as i">
|
||||
{{spectrumNames[i]}}: {{prediction}}<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>
|
||||
|
@ -99,6 +99,8 @@ export class PredictionComponent implements OnInit {
|
||||
|
||||
loadPrediction() {
|
||||
this.loading = true;
|
||||
console.log(this.activeGroup);
|
||||
console.log(this.activeModelIndex);
|
||||
this.api.post<any>(this.activeGroup.models[this.activeModelIndex].url, this.flattenedSpectra, data => {
|
||||
this.result = {
|
||||
predictions: Object.entries(omit(data, ['mean', 'std', 'label']))
|
||||
@ -114,7 +116,9 @@ export class PredictionComponent implements OnInit {
|
||||
}
|
||||
|
||||
groupChange(index) {
|
||||
console.log(index);
|
||||
this.activeGroup = this.d.arr.modelGroups[index];
|
||||
this.activeModelIndex = 0;
|
||||
this.result = undefined;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user