]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / video-redundancies-list / video-redundancies-list.component.html
1 <h1>
2 <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
3 <ng-container i18n>Videos redundancies</ng-container>
4 </h1>
5
6 <div class="admin-sub-header">
7 <div class="select-filter-block">
8 <label for="displayType" i18n>Display</label>
9
10 <div class="peertube-select-container">
11 <select id="displayType" name="displayType" [(ngModel)]="displayType" (ngModelChange)="onDisplayTypeChanged()" class="form-control">
12 <option value="my-videos" i18n>My videos duplicated by remote instances</option>
13 <option value="remote-videos" i18n>Remote videos duplicated by my instance</option>
14 </select>
15 </div>
16 </div>
17 </div>
18
19 <p-table
20 [value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords"
21 [rows]="rowsPerPage" [first]="pagination.start" [rowsPerPageOptions]="rowsPerPageOptions"
22 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
23 [expandedRowKeys]="expandedRows"
24 >
25 <ng-template pTemplate="header">
26 <tr>
27 <th style="width: 40px;"></th>
28 <th style="width: 150px;" i18n>Action</th>
29 <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
30 <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th >
31 <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
32 </tr>
33 </ng-template>
34
35 <ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
36 <tr>
37 <td class="expand-cell" [pRowToggler]="redundancy">
38 <my-table-expander-icon i18n-ngbTooltip ngbTooltip="List redundancies" [expanded]="expanded"></my-table-expander-icon>
39 </td>
40
41 <td class="action-cell">
42 <my-delete-button label (click)="removeRedundancy(redundancy)"></my-delete-button>
43 </td>
44
45 <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
46
47 <td>
48 <a [href]="redundancy.url" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
49 {{ redundancy.name }}
50 <my-global-icon iconName="external-link"></my-global-icon>
51 </a>
52 </td>
53
54 <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td>
55 </tr>
56 </ng-template>
57
58 <ng-template pTemplate="rowexpansion" let-redundancy>
59 <tr *ngIf="redundancy.redundancies.files.length !== 0">
60 <td class="expand-cell" myAutoColspan>
61 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
62 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
63 </div>
64 </td>
65 </tr>
66
67 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
68 <td class="expand-cell" myAutoColspan>
69 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
70 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
71 </div>
72 </td>
73 </tr>
74 </ng-template>
75
76 <ng-template pTemplate="emptymessage">
77 <tr>
78 <td myAutoColspan>
79 <div class="no-results">
80 <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container>
81 <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container>
82 </div>
83 </td>
84 </tr>
85 </ng-template>
86 </p-table>
87
88
89 <div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos() && dataLoaded">
90 <h6 i18n>Enabled strategies stats</h6>
91
92 <div class="chart-blocks">
93
94 <div *ngIf="noRedundancies" i18n class="no-results">
95 No redundancy strategy is enabled on your instance.
96 </div>
97
98 <div class="chart-block" *ngFor="let r of redundanciesGraphsData">
99 <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart>
100 </div>
101
102 </div>
103 </div>