From 7666b365c7f42fad8cc04f90c503f8049a8a5363 Mon Sep 17 00:00:00 2001 From: Martin Mechtel <mechtelm@user.hu-berlin.de> Date: Mon, 17 Dec 2018 18:10:41 +0100 Subject: [PATCH] reportdata started --- .../network-check/network-check.component.ts | 11 +++++------ src/app/sys-check/run.component.ts | 4 +--- src/app/sys-check/syscheck-data.service.ts | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/app/sys-check/network-check/network-check.component.ts b/src/app/sys-check/network-check/network-check.component.ts index b7049d58..098fcbb5 100644 --- a/src/app/sys-check/network-check/network-check.component.ts +++ b/src/app/sys-check/network-check/network-check.component.ts @@ -1,4 +1,4 @@ -import { SyscheckDataService, NetworkRequestTestResult } from './../syscheck-data.service'; +import { SyscheckDataService, NetworkRequestTestResult, ReportEntry } from './../syscheck-data.service'; import { Component, OnInit } from '@angular/core'; import { BackendService, RequestBenchmarkerFunction, RequestBenchmarkerFunctionCallback} from '../backend.service'; @@ -139,11 +139,10 @@ export class NetworkCheckComponent implements OnInit { updateStatus(`Die folgenden Netzwerkeigenschaften wurden festgestellt:`); this.testDone = true; - // this.ds.networkData$.next({ - // 'uploadTest': this.averageSpeed.uploadTest, -// 'downloadTest': this.averageSpeed.downloadTest, - // 'pingTest': this.averageSpeed.pingTest - // }); + // send data for reporting + const myReport: ReportEntry[] = []; + myReport.push({'label': 'lalala', 'value': 'sososo'}); + this.ds.networkData$.next(myReport); }); }); diff --git a/src/app/sys-check/run.component.ts b/src/app/sys-check/run.component.ts index 6e6c6045..b0ed894f 100644 --- a/src/app/sys-check/run.component.ts +++ b/src/app/sys-check/run.component.ts @@ -36,9 +36,7 @@ export class RunComponent implements OnInit { this.ds.unitcheckAvailable$.subscribe(is => this.unitcheckAvailable = is); this.ds.questionnaireAvailable$.subscribe(is => this.questionnaireAvailable = is); this.ds.networkData$.subscribe(nd => { - if (nd !== null) { - this.stepNetwork.completed = true; - } + this.stepNetwork.completed = nd.length > 0; }); this.stepper.linear = true; diff --git a/src/app/sys-check/syscheck-data.service.ts b/src/app/sys-check/syscheck-data.service.ts index a7927f0e..9359d201 100644 --- a/src/app/sys-check/syscheck-data.service.ts +++ b/src/app/sys-check/syscheck-data.service.ts @@ -21,8 +21,8 @@ export class SyscheckDataService { constructor() { this.checkConfig$.subscribe(cDef => { - this.environmentData$.next(null); - this.networkData$.next(null); + this.environmentData$.next([]); + this.networkData$.next([]); if (cDef === null) { this.reportWithEmail$.next(false); this.unitcheckAvailable$.next(false); -- GitLab