]>
Commit | Line | Data |
---|---|---|
1 | <div class="admin-sub-header"> | |
2 | <div i18n class="form-sub-title">Video redundancies list</div> | |
3 | ||
4 | <div class="select-filter-block"> | |
5 | <label for="displayType" i18n>Display</label> | |
6 | ||
7 | <div class="peertube-select-container"> | |
8 | <select id="displayType" name="displayType" [(ngModel)]="displayType" (ngModelChange)="onDisplayTypeChanged()"> | |
9 | <option value="my-videos">My videos duplicated by remote instances</option> | |
10 | <option value="remote-videos">Remote videos duplicated by my instance</option> | |
11 | </select> | |
12 | </div> | |
13 | </div> | |
14 | </div> | |
15 | ||
16 | <p-table | |
17 | [value]="videoRedundancies" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
18 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | |
19 | > | |
20 | <ng-template pTemplate="header"> | |
21 | <tr> | |
22 | <th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th> | |
23 | <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> | |
24 | <th i18n>Video URL</th> | |
25 | <th i18n *ngIf="isDisplayingRemoteVideos()">Total size</th> | |
26 | <th></th> | |
27 | </tr> | |
28 | </ng-template> | |
29 | ||
30 | <ng-template pTemplate="body" let-redundancy> | |
31 | <tr class="expander" [pRowToggler]="redundancy"> | |
32 | <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td> | |
33 | ||
34 | <td>{{ redundancy.name }}</td> | |
35 | ||
36 | <td> | |
37 | <a target="_blank" rel="noopener noreferrer" [href]="redundancy.url">{{ redundancy.url }}</a> | |
38 | </td> | |
39 | ||
40 | <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td> | |
41 | ||
42 | <td class="action-cell"> | |
43 | <my-delete-button (click)="removeRedundancy(redundancy)"></my-delete-button> | |
44 | </td> | |
45 | </tr> | |
46 | </ng-template> | |
47 | ||
48 | <ng-template pTemplate="rowexpansion" let-redundancy> | |
49 | <tr> | |
50 | <td colspan="2"> | |
51 | <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block"> | |
52 | <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information> | |
53 | </div> | |
54 | </td> | |
55 | </tr> | |
56 | ||
57 | <tr> | |
58 | <td colspan="2"> | |
59 | <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists"> | |
60 | <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information> | |
61 | </div> | |
62 | </td> | |
63 | </tr> | |
64 | </ng-template> | |
65 | </p-table> | |
66 | ||
67 | ||
68 | <div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()"> | |
69 | <div class="form-sub-title" i18n>Enabled strategies stats</div> | |
70 | ||
71 | <div class="chart-blocks"> | |
72 | ||
73 | <div *ngIf="noRedundancies" i18n class="no-results"> | |
74 | No redundancy strategy is enabled on your instance. | |
75 | </div> | |
76 | ||
77 | <div class="chart-block" *ngFor="let r of redundanciesGraphsData"> | |
78 | <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart> | |
79 | </div> | |
80 | ||
81 | </div> | |
82 | </div> |