oggui/ogWebconsole/src/app/components/repositories/repositories.component.html

87 lines
3.9 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="repositoryTitleStep" text="{{ 'repositoryTitleStep' | translate }}">
{{ 'repositoryTitle' | translate }}
</h2>
</div>
<div class="images-button-row">
<button *ngIf="auth.isSuperAdmin"
class="action-button" (click)="addImage()"
joyrideStep="addStep"
text="{{ 'addRepositoryStepText' | translate }}">{{ 'addRepository' | translate }}</button>
</div>
</div>
<mat-divider class="divider"></mat-divider>
<div class="search-container" joyrideStep="searchStep" text="{{ 'searchStepText' | translate }}">
<mat-form-field appearance="fill" class="search-string">
<mat-label>{{ 'search' | translate }} {{ 'repository' | translate }}</mat-label>
<input matInput [placeholder]="'labelSearch' | translate" [(ngModel)]="filters['name']" (keyup.enter)="search()"
i18n-placeholder="@@searchPlaceholder">
<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>{{ 'search' | translate }} IP de {{ 'repository' | translate }}</mat-label>
<input matInput [placeholder]="'labelSearch' | translate" [(ngModel)]="filters['ip']" (keyup.enter)="search()"
i18n-placeholder="@@searchPlaceholder">
<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="{{ 'tableDateRepositoryText' | translate }}">
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
<th mat-header-cell *matHeaderCellDef> {{ column.header | translate }} </th>
<td mat-cell *matCellDef="let repository">
<ng-container *ngIf="column.columnDef !== 'images'">
{{ column.cell(repository) }}
</ng-container>
<ng-container *ngIf="column.columnDef === 'images'">
<button
class="action-button"
joyrideStep="monolithicImageStep"
text="{{ 'monolithicImageStepText' | translate }}"
(click)="openShowMonoliticImagesDialog(repository)">
{{ 'monolithicImage' | translate }}
</button>
<button
class="action-button"
joyrideStep="gitImageStep"
text="{{ 'gitImageStepText' | translate }}"
style="margin-left: 0.5vw;"
[disabled]="!isGitModuleInstalled"
(click)="openShowGitImagesDialog(repository)">
{{ 'gitImage' | translate }}
</button>
</ng-container>
</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef i18n="@@columnActions" style="text-align: center;">{{ 'actions' | translate }}</th>
<td mat-cell *matCellDef="let repository" style="text-align: center;" joyrideStep="actionsStep"
[text]="'actionsDescription' | translate">
<button *ngIf="auth.isSuperAdmin" mat-icon-button color="primary" (click)="editRepository($event, repository)" i18n="@@editImage">
<mat-icon>edit</mat-icon></button>
<button *ngIf="auth.isSuperAdmin" mat-icon-button color="warn" (click)="deleteRepository($event, repository)">
<mat-icon i18n="@@deleteElementTooltip">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="{{ 'paginationDescription' | translate }}">
<mat-paginator [length]="length" [pageSize]="itemsPerPage" [pageIndex]="page" [pageSizeOptions]="[5, 10, 20, 40, 100]"
(page)="onPageChange($event)">
</mat-paginator>
</div>