From cecc5fc831e0c5ee80461d609c3694d9b180fdf3 Mon Sep 17 00:00:00 2001 From: sagIoTPower Date: Sun, 25 Feb 2024 09:09:39 +0100 Subject: [PATCH] change formatting --- .../src/status/engine-status.component.html | 10 ------- .../src/status/engine-status.component.ts | 28 +++++++++++-------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/analytics-ui/src/status/engine-status.component.html b/analytics-ui/src/status/engine-status.component.html index fb4a2b5..2a197ee 100644 --- a/analytics-ui/src/status/engine-status.component.html +++ b/analytics-ui/src/status/engine-status.component.html @@ -53,14 +53,6 @@

Safe Mode

- - Safe Mode
- - diff --git a/analytics-ui/src/status/engine-status.component.ts b/analytics-ui/src/status/engine-status.component.ts index 4141c5f..1e22809 100644 --- a/analytics-ui/src/status/engine-status.component.ts +++ b/analytics-ui/src/status/engine-status.component.ts @@ -3,7 +3,7 @@ import { BsModalRef } from "ngx-bootstrap/modal"; import { AnalyticsService } from "../shared"; import { HumanizePipe, PropertiesListItem, gettext } from "@c8y/ngx-components"; import { IManifest } from "@c8y/client"; -import { BehaviorSubject, Subject } from 'rxjs'; +import { BehaviorSubject, Subject } from "rxjs"; @Component({ selector: "engine-status", @@ -12,9 +12,9 @@ import { BehaviorSubject, Subject } from 'rxjs'; }) export class EngineStatusComponent implements OnInit { cepId: string; - cepCtrlStatus$: Subject = new Subject (); - cepCtrlStatusLabels$: BehaviorSubject = new BehaviorSubject ([]); - + cepCtrlStatus$: Subject = new Subject(); + cepCtrlStatusLabels$: BehaviorSubject = + new BehaviorSubject([]); constructor( private analyticsService: AnalyticsService, @@ -28,17 +28,21 @@ export class EngineStatusComponent implements OnInit { this.cepId = await this.analyticsService.getCEP_Id(); const cepCtrlStatus = await this.analyticsService.getCEP_Status(); const cepCtrlStatusLabels = []; - Object.keys(cepCtrlStatus).forEach (key => { - cepCtrlStatusLabels.push ( { - label: humanize.transform(key), - type: 'string', - value: cepCtrlStatus[key] - }) + Object.keys(cepCtrlStatus).forEach((key) => { + if ( + ["number_extensions", "is_safe_mode", "microservice_name"].includes(key) + ) { + cepCtrlStatusLabels.push({ + label: humanize.transform(key), + type: "string", + value: cepCtrlStatus[key], + }); + } }); this.cepCtrlStatusLabels$.next(cepCtrlStatusLabels); - console.log("Labels:", cepCtrlStatusLabels); - console.log("Objects:", cepCtrlStatus); + // console.log("Labels:", cepCtrlStatusLabels); + // console.log("Objects:", cepCtrlStatus); } private async init() {