From 07aef97141a3ee2fa37adc36b4d20d38196821a1 Mon Sep 17 00:00:00 2001 From: pprinzSVA Date: Wed, 26 Nov 2025 14:02:35 +0100 Subject: [PATCH] remove parsing to Map, when Record is expected --- src/app/data/scenario.service.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/app/data/scenario.service.ts b/src/app/data/scenario.service.ts index 5bfd6d60..4adaaaff 100644 --- a/src/app/data/scenario.service.ts +++ b/src/app/data/scenario.service.ts @@ -32,9 +32,7 @@ class CustomEncoder implements HttpParameterCodec { } } -@Injectable({ - providedIn: 'root', -}) +@Injectable({ providedIn: 'root' }) export class ScenarioService { private cachedScenarioList: Scenario[] = []; private fetchedList = false; @@ -60,16 +58,7 @@ export class ScenarioService { this.startedFetchedList = true; return this.gargAdmin.get('/list').pipe( map((s: ServerResponse) => { - const obj: Scenario[] = JSON.parse(atou(s.content)); // this doesn't encode a map though - // so now we need to go vmset-by-vmset and build maps - obj.forEach((s: Scenario) => { - s.virtualmachines = s.virtualmachines.map( - (v) => - new Map( - Object.entries(v as Record), - ), - ) as unknown as typeof s.virtualmachines; - }); + const obj: Scenario[] = JSON.parse(atou(s.content)); return obj; }),