From 481f411d35a4524a98bde0dab9546a974c3fc4e1 Mon Sep 17 00:00:00 2001 From: Oleksandr Karpov Date: Mon, 20 Nov 2023 12:38:19 +0200 Subject: [PATCH 1/2] NAS-125259: ES60G2 fails to be displayed in UI --- .../pages/system/viewenclosure/view-enclosure.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/pages/system/viewenclosure/view-enclosure.component.ts b/src/app/pages/system/viewenclosure/view-enclosure.component.ts index aec9363d0c9..bbfada2ecd9 100644 --- a/src/app/pages/system/viewenclosure/view-enclosure.component.ts +++ b/src/app/pages/system/viewenclosure/view-enclosure.component.ts @@ -37,7 +37,7 @@ interface EnclosureResponse { }) export class ViewEnclosureComponent implements AfterContentInit, OnChanges, OnDestroy { errors: ErrorMessage[] = []; - events: Subject ; + events: Subject; @ViewChild('navigation', { static: false }) nav: ElementRef; // public currentView: ViewConfig @@ -89,6 +89,8 @@ export class ViewEnclosureComponent implements AfterContentInit, OnChanges, OnDe constructor(private core: CoreService, protected router: Router) { this.events = new Subject(); this.events.subscribe((evt: CoreEvent) => { + console.log(evt); + switch (evt.name) { case 'VisualizerReady': this.extractVisualizations(); @@ -210,7 +212,7 @@ export class ViewEnclosureComponent implements AfterContentInit, OnChanges, OnDe extractVisualizations() { this.system.profile.forEach((item, index) => { if (this.system.rearIndex && item.enclosureKey == this.system.rearIndex) { return; } - if (this.system.profile) { + if (this.system.profile && this.system.profile[index].model) { this.events.next({ name: 'CanvasExtract', data: this.system.profile[index], sender: this }); } }); From 7fb11ad6515680abb4db3f5c0a3a86d8d6cb2831 Mon Sep 17 00:00:00 2001 From: Oleksandr Karpov Date: Mon, 20 Nov 2023 12:40:47 +0200 Subject: [PATCH 2/2] NAS-125259: ES60G2 fails to be displayed in UI --- .../system/viewenclosure/view-enclosure.component.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/pages/system/viewenclosure/view-enclosure.component.ts b/src/app/pages/system/viewenclosure/view-enclosure.component.ts index bbfada2ecd9..dfdfac5272a 100644 --- a/src/app/pages/system/viewenclosure/view-enclosure.component.ts +++ b/src/app/pages/system/viewenclosure/view-enclosure.component.ts @@ -1,11 +1,7 @@ import { - ApplicationRef, Component, Injector, AfterContentInit, OnChanges, SimpleChanges, OnDestroy, ViewChild, ElementRef, + Component, AfterContentInit, OnChanges, SimpleChanges, OnDestroy, ViewChild, ElementRef, } from '@angular/core'; import { Router } from '@angular/router'; -import { RestService, WebSocketService } from 'app/services/'; -import { MaterialModule } from 'app/appMaterial.module'; -import { EnclosureDisksComponent } from './enclosure-disks/enclosure-disks.component'; - import { CoreService, CoreEvent } from 'app/core/services/core.service'; import { Subject } from 'rxjs'; import { SystemProfiler } from 'app/core/classes/system-profiler'; @@ -89,8 +85,6 @@ export class ViewEnclosureComponent implements AfterContentInit, OnChanges, OnDe constructor(private core: CoreService, protected router: Router) { this.events = new Subject(); this.events.subscribe((evt: CoreEvent) => { - console.log(evt); - switch (evt.name) { case 'VisualizerReady': this.extractVisualizations();