From 4955245b9ccd8dbc60ad2ee689c90bac0cfac050 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Mon, 20 Jan 2020 17:38:40 +0100 Subject: [PATCH] Update status-info.component.ts --- .../system-status/status-info/status-info.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/components/system-status/status-info/status-info.component.ts b/src/app/components/system-status/status-info/status-info.component.ts index e3610d74..7647db93 100644 --- a/src/app/components/system-status/status-info/status-info.component.ts +++ b/src/app/components/system-status/status-info/status-info.component.ts @@ -25,10 +25,19 @@ export class StatusInfoComponent implements OnInit { ngOnInit() { this.serverId = this.route.snapshot.paramMap.get("server_id"); + this.getStatistics(); + } + + getStatistics() { this.serverService.get(Number(this.serverId)).then((server: Server) => { this.computeService.getStatistics(server).subscribe( (statistics: ComputeStatistics[]) => { this.computeStatistics = statistics; + setTimeout(() => + { + this.getStatistics(); + }, + 10000); }), error => { this.toasterService.error('Required server version is 2.3')