mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-24 13:05:48 +00:00
Update status-info.component.ts
This commit is contained in:
parent
8175c47b6f
commit
4955245b9c
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user