mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 02:01:19 +00:00
Action button added
This commit is contained in:
parent
96f4600706
commit
06926c53af
@ -36,17 +36,21 @@
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" style="text-align: right">
|
||||
<button mat-icon-button (click)="startServer(row)" *ngIf="row.location === 'local' && getServerStatus(row) === 'stopped'">
|
||||
<button mat-icon-button matTooltip="Go to projects" matTooltipClass="custom-tooltip" (click)="openProjects(row)" *ngIf="getServerStatus(row) === 'running' || row.location === 'remote' || row.location === 'bundled'">
|
||||
<mat-icon aria-label="Go to projects">arrow_forward</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-icon-button matTooltip="Start server" matTooltipClass="custom-tooltip" (click)="startServer(row)" *ngIf="row.location === 'local' && getServerStatus(row) === 'stopped'">
|
||||
<mat-icon aria-label="Start server">play_arrow</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-icon-button (click)="stopServer(row)" *ngIf="row.location === 'local' && getServerStatus(row) === 'running'">
|
||||
<button mat-icon-button matTooltip="Stop server" matTooltipClass="custom-tooltip" (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)">
|
||||
<button mat-icon-button matTooltip="Remove server" matTooltipClass="custom-tooltip" (click)="deleteServer(row)">
|
||||
<mat-icon aria-label="Remove server">delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
|
@ -35,7 +35,8 @@ export class ServersComponent implements OnInit, OnDestroy {
|
||||
private electronService: ElectronService,
|
||||
private childProcessService: ChildProcessService,
|
||||
private bottomSheet: MatBottomSheet,
|
||||
private route : ActivatedRoute
|
||||
private route : ActivatedRoute,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
getServers() {
|
||||
@ -107,6 +108,10 @@ export class ServersComponent implements OnInit, OnDestroy {
|
||||
this.startServer(server);
|
||||
}
|
||||
|
||||
openProjects(server) {
|
||||
this.router.navigate(['/server', server.id, 'projects']);
|
||||
}
|
||||
|
||||
createModal() {
|
||||
const dialogRef = this.dialog.open(AddServerDialogComponent, {
|
||||
width: '350px',
|
||||
|
@ -20,4 +20,9 @@ export class RecentlyOpenedProjectService {
|
||||
getProjectId() : string {
|
||||
return this.projectId;
|
||||
}
|
||||
|
||||
removeData() {
|
||||
this.serverId = '';
|
||||
this.projectId = ''
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user