mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-13 21:32:55 +00:00
Display progress when server is starting
This commit is contained in:
parent
2a56441ce9
commit
80338f194b
@ -13,8 +13,9 @@
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<a [routerLink]="['/server', row.id, 'projects']" class="table-link">{{ row.name }}</a></mat-cell
|
||||
>
|
||||
<a *ngIf="getServerStatus(row) === 'running'" [routerLink]="['/server', row.id, 'projects']" class="table-link">{{ row.name }}</a>
|
||||
<span *ngIf="getServerStatus(row) != 'running'">{{ row.name }}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="location">
|
||||
@ -42,6 +43,8 @@
|
||||
<button mat-icon-button (click)="stopServer(row)" *ngIf="row.location === 'local' && getServerStatus(row) === 'running'">
|
||||
<mat-icon aria-label="Stop server">stop</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-spinner [diameter]="24" *ngIf="row.location === 'local' && getServerStatus(row) === 'starting'"></mat-spinner>
|
||||
|
||||
<button mat-icon-button (click)="deleteServer(row)">
|
||||
<mat-icon aria-label="Remove server">delete</mat-icon>
|
||||
|
@ -98,10 +98,12 @@ export class ServersComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async startServer(server: Server) {
|
||||
server.status = "starting";
|
||||
await this.serverManagement.start(server);
|
||||
}
|
||||
|
||||
async stopServer(server: Server) {
|
||||
server.status = "stopped";
|
||||
await this.serverManagement.stop(server);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user