mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-17 06:18:09 +00:00
Update status-info.component.ts
This commit is contained in:
@ -25,10 +25,19 @@ export class StatusInfoComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serverId = this.route.snapshot.paramMap.get("server_id");
|
this.serverId = this.route.snapshot.paramMap.get("server_id");
|
||||||
|
this.getStatistics();
|
||||||
|
}
|
||||||
|
|
||||||
|
getStatistics() {
|
||||||
this.serverService.get(Number(this.serverId)).then((server: Server) => {
|
this.serverService.get(Number(this.serverId)).then((server: Server) => {
|
||||||
this.computeService.getStatistics(server).subscribe(
|
this.computeService.getStatistics(server).subscribe(
|
||||||
(statistics: ComputeStatistics[]) => {
|
(statistics: ComputeStatistics[]) => {
|
||||||
this.computeStatistics = statistics;
|
this.computeStatistics = statistics;
|
||||||
|
setTimeout(() =>
|
||||||
|
{
|
||||||
|
this.getStatistics();
|
||||||
|
},
|
||||||
|
10000);
|
||||||
}),
|
}),
|
||||||
error => {
|
error => {
|
||||||
this.toasterService.error('Required server version is 2.3')
|
this.toasterService.error('Required server version is 2.3')
|
||||||
|
Reference in New Issue
Block a user