mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-09 20:12:53 +00:00
update for template dialog
This commit is contained in:
parent
66bbe2cd11
commit
15505b9b8c
@ -39,33 +39,33 @@
|
|||||||
(matSortChange)= "sortData($event)"
|
(matSortChange)= "sortData($event)"
|
||||||
[dataSource]="dataSource | datasourcefilter: searchText">
|
[dataSource]="dataSource | datasourcefilter: searchText">
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="emulator">
|
<ng-container matColumnDef="emulator">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Emulator </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Emulator </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.emulator}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.emulator}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="vendor">
|
<ng-container matColumnDef="vendor">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Vendor </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Vendor </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.vendor_name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.vendor_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="actions">
|
<ng-container matColumnDef="actions">
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" style="text-align: right">
|
<mat-cell *matCellDef="let row" style="text-align: right">
|
||||||
<button mat-icon-button matTooltip="Restore snapshot" (click)="restoreSnapshot(row)">
|
<button mat-icon-button matTooltip="Install" (click)="install(row)">
|
||||||
<mat-icon aria-label="Restore snapshot">restore</mat-icon>
|
<mat-icon aria-label="Install">archive</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-icon-button matTooltip="Delete snapshot" (click)="deleteSnapshot(row)">
|
<button mat-icon-button matTooltip="Show info" (click)="showInfo(row)">
|
||||||
<mat-icon aria-label="Delete snapshot">delete</mat-icon>
|
<mat-icon aria-label="Show info">info</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container> -->
|
</ng-container>
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="expandedDetail">
|
<!-- <ng-container matColumnDef="expandedDetail">
|
||||||
<mat-cell *matCellDef="let detail">
|
<mat-cell *matCellDef="let detail">
|
||||||
The symbol for {{detail.element}}
|
The symbol for {{detail.element}}
|
||||||
|
@ -36,7 +36,7 @@ export class NewTemplateDialogComponent implements OnInit {
|
|||||||
|
|
||||||
public categories: string[] = ['all categories', 'router', 'multilayer_switch', 'guest', 'firewall'];
|
public categories: string[] = ['all categories', 'router', 'multilayer_switch', 'guest', 'firewall'];
|
||||||
public category: string = 'all categories';
|
public category: string = 'all categories';
|
||||||
public displayedColumns: string[] = ['name', 'emulator', 'vendor'];
|
public displayedColumns: string[] = ['name', 'emulator', 'vendor', 'actions'];
|
||||||
|
|
||||||
public dataSource: MatTableDataSource<Appliance>;
|
public dataSource: MatTableDataSource<Appliance>;
|
||||||
|
|
||||||
@ -147,6 +147,14 @@ export class NewTemplateDialogComponent implements OnInit {
|
|||||||
onCloseClick() {
|
onCloseClick() {
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install(object: any) {
|
||||||
|
console.log(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
showInfo(object: any) {
|
||||||
|
console.log(object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function compareNames(a: string, b: string, isAsc: boolean) {
|
function compareNames(a: string, b: string, isAsc: boolean) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user