]>
Commit | Line | Data |
---|---|---|
ed5bb517 K |
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 | ||
b764380a | 6 | <div class="admin-sub-header"> |
b764380a C |
7 | <div class="select-filter-block"> |
8 | <label for="displayType" i18n>Display</label> | |
9 | ||
10 | <div class="peertube-select-container"> | |
2bc9bd08 RK |
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> | |
b764380a C |
14 | </select> |
15 | </div> | |
16 | </div> | |
17 | </div> | |
18 | ||
19 | <p-table | |
1d26d05f | 20 | [value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
b72ec06b | 21 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" |
e6492b2d | 22 | [expandedRowKeys]="expandedRows" |
b764380a C |
23 | > |
24 | <ng-template pTemplate="header"> | |
25 | <tr> | |
68d19a0a | 26 | <th style="width: 40px;"></th> |
e0436741 | 27 | <th style="width: 150px;" i18n>Action</th> |
68d19a0a | 28 | <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th> |
b72ec06b | 29 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th > |
68d19a0a | 30 | <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th> |
b764380a C |
31 | </tr> |
32 | </ng-template> | |
33 | ||
b1f3b635 C |
34 | <ng-template pTemplate="body" let-expanded="expanded" let-redundancy> |
35 | <tr> | |
e4611b54 C |
36 | <td class="expand-cell" [pRowToggler]="redundancy"> |
37 | <my-table-expander-icon i18n-ngbTooltip ngbTooltip="List redundancies" [expanded]="expanded"></my-table-expander-icon> | |
b1f3b635 C |
38 | </td> |
39 | ||
30814423 K |
40 | <td class="action-cell"> |
41 | <my-delete-button label (click)="removeRedundancy(redundancy)"></my-delete-button> | |
42 | </td> | |
43 | ||
b764380a C |
44 | <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td> |
45 | ||
b764380a | 46 | <td> |
b72ec06b RK |
47 | <a [href]="redundancy.url" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer"> |
48 | {{ redundancy.name }} | |
c2faa073 | 49 | <my-global-icon iconName="external-link"></my-global-icon> |
b72ec06b | 50 | </a> |
b764380a C |
51 | </td> |
52 | ||
53 | <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td> | |
b764380a C |
54 | </tr> |
55 | </ng-template> | |
56 | ||
57 | <ng-template pTemplate="rowexpansion" let-redundancy> | |
b1f3b635 | 58 | <tr *ngIf="redundancy.redundancies.files.length !== 0"> |
2bc9bd08 | 59 | <td class="expand-cell" [attr.colspan]="getColspan()"> |
b764380a C |
60 | <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block"> |
61 | <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information> | |
62 | </div> | |
63 | </td> | |
64 | </tr> | |
65 | ||
b1f3b635 | 66 | <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0"> |
2bc9bd08 | 67 | <td class="expand-cell" [attr.colspan]="getColspan()"> |
b764380a C |
68 | <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists"> |
69 | <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information> | |
70 | </div> | |
71 | </td> | |
72 | </tr> | |
73 | </ng-template> | |
d3840613 RK |
74 | |
75 | <ng-template pTemplate="emptymessage"> | |
76 | <tr> | |
77 | <td colspan="6"> | |
22839330 | 78 | <div class="no-results"> |
d3840613 RK |
79 | <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container> |
80 | <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container> | |
81 | </div> | |
82 | </td> | |
83 | </tr> | |
84 | </ng-template> | |
b764380a C |
85 | </p-table> |
86 | ||
87 | ||
88 | <div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()"> | |
eeae8142 | 89 | <h6 i18n>Enabled strategies stats</h6> |
b764380a C |
90 | |
91 | <div class="chart-blocks"> | |
92 | ||
93 | <div *ngIf="noRedundancies" i18n class="no-results"> | |
94 | No redundancy strategy is enabled on your instance. | |
95 | </div> | |
96 | ||
97 | <div class="chart-block" *ngFor="let r of redundanciesGraphsData"> | |
98 | <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart> | |
99 | </div> | |
100 | ||
101 | </div> | |
102 | </div> |