Update for production April Release #2

Merged
k.triantafyllou merged 15 commits from develop into master 2023-04-19 15:20:10 +02:00
1 changed files with 14 additions and 12 deletions
Showing only changes of commit cc788e95dc - Show all commits

View File

@ -487,21 +487,23 @@ export class MonitorComponent implements OnInit, OnDestroy {
this.subscriptions.push(this.statisticsService.getNumbers(this.statisticsService.getSourceType(pair[0]), pair[1]).subscribe(response => {
if(activeSubcategory === this.activeSubCategory._id) {
indexes.forEach(([i, j]) => {
let result = JSON.parse(JSON.stringify(response));
this.activeSubCategory.numbers[i].indicators[j].indicatorPaths[0].jsonPath.forEach(jsonPath => {
if (result) {
result = result[jsonPath];
}
});
if (typeof result === 'string' || typeof result === 'number') {
result = Number(result);
if (result === Number.NaN) {
if( this.activeSubCategory?.numbers[i]?.indicators[j]) {
let result = JSON.parse(JSON.stringify(response));
this.activeSubCategory.numbers[i].indicators[j].indicatorPaths[0].jsonPath.forEach(jsonPath => {
if (result) {
result = result[jsonPath];
}
});
if (typeof result === 'string' || typeof result === 'number') {
result = Number(result);
if (result === Number.NaN) {
result = 0;
}
} else {
result = 0;
}
} else {
result = 0;
this.numberResults.set(i + '-' + j, result);
}
this.numberResults.set(i + '-' + j, result);
});
}
}));