oggui/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.html

71 lines
3.3 KiB
HTML

<app-loading [isLoading]="loading"></app-loading>
<div class="header-container">
<button mat-icon-button color="primary" (click)="initTour()">
<mat-icon>help</mat-icon>
</button>
<div class="header-container-title">
<h2 joyrideStep="bootServerTitleStep" text="Vista de Servidores de Arranque">
{{ 'ogbootServers' | translate }}</h2>
</div>
<div class="images-button-row">
<button *ngIf="auth.isSuperAdmin"
class="action-button" (click)="addServer()"
joyrideStep="addStep"
text="Añadir Servidor Boot">{{ 'addBootServer' | translate }}</button>
</div>
</div>
<mat-divider class="divider"></mat-divider>
<div class="search-container" joyrideStep="searchStep" text="Búsqueda rápida de servidores">
<mat-form-field appearance="fill" class="search-string">
<mat-label>{{ 'placeholderSearchByName' | translate }}</mat-label>
<input matInput [placeholder]="'labelSearch' | translate" [(ngModel)]="filters['name']" (keyup.enter)="search()">
<mat-icon matSuffix>search</mat-icon>
<mat-hint>{{ 'searchHint' | translate }}</mat-hint>
</mat-form-field>
<mat-form-field appearance="fill" class="search-string">
<mat-label>{{ 'placeholderSearchByIp' | translate }}</mat-label>
<input matInput [placeholder]="'labelSearch' | translate" [(ngModel)]="filters['ip']" (keyup.enter)="search()">
<mat-icon matSuffix>search</mat-icon>
<mat-hint>{{ 'searchHint' | translate }}</mat-hint>
</mat-form-field>
</div>
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8" joyrideStep="tableDateStep" text="Tabla de Servidores OgBoot">
@for (column of columns; track column.columnDef) {
<ng-container [matColumnDef]="column.columnDef">
<th mat-header-cell *matHeaderCellDef> {{ column.header | translate }} </th>
<td mat-cell *matCellDef="let server">
{{ column.cell(server) }}
</td>
</ng-container>
}
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef style="text-align: center;">{{ 'actions' | translate }}</th>
<td mat-cell *matCellDef="let server" style="text-align: center;" joyrideStep="actionsStep">
<button mat-icon-button color="accent" (click)="openServerDashboard(server)" [matTooltip]="'manageServer' | translate">
<mat-icon>open_in_new</mat-icon>
</button>
<button mat-icon-button color="primary" (click)="syncServer(server)" [matTooltip]="'syncServer' | translate">
<mat-icon>sync</mat-icon>
</button>
<button *ngIf="auth.isSuperAdmin" mat-icon-button color="primary" (click)="editServer($event, server)" [matTooltip]="'editServerTitle' | translate">
<mat-icon>edit</mat-icon>
</button>
<button *ngIf="auth.isSuperAdmin" mat-icon-button color="warn" (click)="deleteServer($event, server)" [matTooltip]="'buttonDeleteServer' | translate">
<mat-icon>delete</mat-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<div class="paginator-container" joyrideStep="paginationStep" text="Paginación de resultados">
<mat-paginator [length]="length" [pageSize]="itemsPerPage" [pageIndex]="page" [pageSizeOptions]="[5, 10, 20, 40, 100]"
(page)="onPageChange($event)">
</mat-paginator>
</div>