2020-07-23 15:09:15 +02:00
|
|
|
<h1>
|
|
|
|
<my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
|
|
|
|
<ng-container i18n>Videos redundancies</ng-container>
|
|
|
|
</h1>
|
|
|
|
|
2020-01-10 10:11:28 +01:00
|
|
|
<div class="admin-sub-header">
|
|
|
|
<div class="select-filter-block">
|
|
|
|
<label for="displayType" i18n>Display</label>
|
|
|
|
|
|
|
|
<div class="peertube-select-container">
|
2020-04-13 17:03:01 +02:00
|
|
|
<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>
|
2020-01-10 10:11:28 +01:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p-table
|
2022-07-12 10:19:33 +02:00
|
|
|
[value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords"
|
|
|
|
[rows]="rowsPerPage" [first]="pagination.start" [rowsPerPageOptions]="rowsPerPageOptions"
|
2020-05-08 18:41:32 +02:00
|
|
|
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
|
2021-12-24 15:37:42 +01:00
|
|
|
[expandedRowKeys]="expandedRows"
|
2020-01-10 10:11:28 +01:00
|
|
|
>
|
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr>
|
2020-04-16 14:22:27 +02:00
|
|
|
<th style="width: 40px;"></th>
|
2021-04-12 08:43:40 +02:00
|
|
|
<th style="width: 150px;" i18n>Action</th>
|
2020-04-16 14:22:27 +02:00
|
|
|
<th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
|
2020-05-08 18:41:32 +02:00
|
|
|
<th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th >
|
2020-04-16 14:22:27 +02:00
|
|
|
<th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
|
2020-01-10 10:11:28 +01:00
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
2020-04-08 14:05:55 +02:00
|
|
|
<ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
|
|
|
|
<tr>
|
2021-10-27 11:54:48 +02:00
|
|
|
<td class="expand-cell" [pRowToggler]="redundancy">
|
|
|
|
<my-table-expander-icon i18n-ngbTooltip ngbTooltip="List redundancies" [expanded]="expanded"></my-table-expander-icon>
|
2020-04-08 14:05:55 +02:00
|
|
|
</td>
|
|
|
|
|
2020-07-31 11:30:57 +02:00
|
|
|
<td class="action-cell">
|
|
|
|
<my-delete-button label (click)="removeRedundancy(redundancy)"></my-delete-button>
|
|
|
|
</td>
|
|
|
|
|
2020-01-10 10:11:28 +01:00
|
|
|
<td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
|
|
|
|
|
|
|
|
<td>
|
2020-05-08 18:41:32 +02:00
|
|
|
<a [href]="redundancy.url" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
|
|
|
|
{{ redundancy.name }}
|
2022-06-10 17:05:55 +02:00
|
|
|
<my-global-icon iconName="external-link"></my-global-icon>
|
2020-05-08 18:41:32 +02:00
|
|
|
</a>
|
2020-01-10 10:11:28 +01:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="rowexpansion" let-redundancy>
|
2020-04-08 14:05:55 +02:00
|
|
|
<tr *ngIf="redundancy.redundancies.files.length !== 0">
|
2023-05-26 10:27:02 +02:00
|
|
|
<td class="expand-cell" myAutoColspan>
|
2020-01-10 10:11:28 +01:00
|
|
|
<div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
|
|
|
|
<my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2020-04-08 14:05:55 +02:00
|
|
|
<tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
|
2023-05-26 10:27:02 +02:00
|
|
|
<td class="expand-cell" myAutoColspan>
|
2020-01-10 10:11:28 +01:00
|
|
|
<div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
|
|
|
|
<my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
2020-04-19 20:26:25 +02:00
|
|
|
|
|
|
|
<ng-template pTemplate="emptymessage">
|
|
|
|
<tr>
|
2023-05-26 10:27:02 +02:00
|
|
|
<td myAutoColspan>
|
2020-06-15 13:18:22 +02:00
|
|
|
<div class="no-results">
|
2020-04-19 20:26:25 +02:00
|
|
|
<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>
|
2020-01-10 10:11:28 +01:00
|
|
|
</p-table>
|
|
|
|
|
|
|
|
|
2023-02-15 11:39:45 +01:00
|
|
|
<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos() && dataLoaded">
|
2021-10-29 11:33:28 +02:00
|
|
|
<h6 i18n>Enabled strategies stats</h6>
|
2020-01-10 10:11:28 +01:00
|
|
|
|
|
|
|
<div class="chart-blocks">
|
|
|
|
|
|
|
|
<div *ngIf="noRedundancies" i18n class="no-results">
|
|
|
|
No redundancy strategy is enabled on your instance.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="chart-block" *ngFor="let r of redundanciesGraphsData">
|
|
|
|
<p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|