<div class="admin-sub-header">
- <div i18n class="form-sub-title">Video redundancies list</div>
-
<div class="select-filter-block">
<label for="displayType" i18n>Display</label>
<div class="peertube-select-container">
- <select id="displayType" name="displayType" [(ngModel)]="displayType" (ngModelChange)="onDisplayTypeChanged()">
- <option value="my-videos">My videos duplicated by remote instances</option>
- <option value="remote-videos">Remote videos duplicated by my instance</option>
+ <select id="displayType" name="displayType" [(ngModel)]="displayType" (ngModelChange)="onDisplayTypeChanged()" class="form-control">
+ <option value="my-videos" i18n>My videos duplicated by remote instances</option>
+ <option value="remote-videos" i18n>Remote videos duplicated by my instance</option>
</select>
</div>
</div>
>
<ng-template pTemplate="header">
<tr>
- <th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
- <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th>
+ <th style="width: 40px;"></th>
+ <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
+ <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th >
<th i18n>Video URL</th>
- <th i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
- <th></th>
+ <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
+ <th style="width: 80px;"></th>
</tr>
</ng-template>
- <ng-template pTemplate="body" let-redundancy>
- <tr class="expander" [pRowToggler]="redundancy">
+ <ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
+ <tr>
+
+ <td>
+ <span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy">
+ <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
+ </span>
+ </td>
+
<td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
<td>{{ redundancy.name }}</td>
</ng-template>
<ng-template pTemplate="rowexpansion" let-redundancy>
- <tr>
- <td colspan="2">
+ <tr *ngIf="redundancy.redundancies.files.length !== 0">
+ <td class="expand-cell" [attr.colspan]="getColspan()">
<div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
<my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
</div>
</td>
</tr>
- <tr>
- <td colspan="2">
+ <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
+ <td class="expand-cell" [attr.colspan]="getColspan()">
<div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
<my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
</div>
</td>
</tr>
</ng-template>
+
+ <ng-template pTemplate="emptymessage">
+ <tr>
+ <td colspan="6">
+ <div class="empty-table-message">
+ <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container>
+ <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container>
+ </div>
+ </td>
+ </tr>
+ </ng-template>
</p-table>