mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 10:01:44 +00:00
message for system status page
This commit is contained in:
parent
1658845022
commit
3e2c537a6d
@ -1,3 +1,6 @@
|
||||
<div *ngIf="!computeStatistics.length">
|
||||
Statistics not loaded
|
||||
</div>
|
||||
<div *ngFor='let statistics of computeStatistics'>
|
||||
{{statistics.compute_name}}
|
||||
<app-status-chart [computeStatistics]="statistics"></app-status-chart>
|
||||
|
@ -15,6 +15,7 @@ import { ToasterService } from '../../../services/toaster.service';
|
||||
export class StatusInfoComponent implements OnInit {
|
||||
public serverId: string = "";
|
||||
public computeStatistics: ComputeStatistics[] = [];
|
||||
public connectionFailed: boolean;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@ -30,8 +31,7 @@ export class StatusInfoComponent implements OnInit {
|
||||
|
||||
getStatistics() {
|
||||
this.serverService.get(Number(this.serverId)).then((server: Server) => {
|
||||
this.computeService.getStatistics(server).subscribe(
|
||||
(statistics: ComputeStatistics[]) => {
|
||||
this.computeService.getStatistics(server).subscribe((statistics: ComputeStatistics[]) => {
|
||||
this.computeStatistics = statistics;
|
||||
setTimeout(() =>
|
||||
{
|
||||
@ -40,7 +40,7 @@ export class StatusInfoComponent implements OnInit {
|
||||
20000);
|
||||
}),
|
||||
error => {
|
||||
this.toasterService.error('Required server version is 2.3')
|
||||
this.connectionFailed = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user