]>
Commit | Line | Data |
---|---|---|
1 | <div class="admin-sub-header"> | |
2 | <div class="select-filter-block"> | |
3 | <label for="displayType" i18n>Display</label> | |
4 | ||
5 | <div class="peertube-select-container"> | |
6 | <select id="displayType" name="displayType" [(ngModel)]="displayType" (ngModelChange)="onDisplayTypeChanged()" class="form-control"> | |
7 | <option value="my-videos" i18n>My videos duplicated by remote instances</option> | |
8 | <option value="remote-videos" i18n>Remote videos duplicated by my instance</option> | |
9 | </select> | |
10 | </div> | |
11 | </div> | |
12 | </div> | |
13 | ||
14 | <p-table | |
15 | [value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
16 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | |
17 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | |
18 | > | |
19 | <ng-template pTemplate="header"> | |
20 | <tr> | |
21 | <th style="width: 40px;"></th> | |
22 | <th style="width: 160px;" 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 style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th> | |
26 | <th style="width: 80px;"></th> | |
27 | </tr> | |
28 | </ng-template> | |
29 | ||
30 | <ng-template pTemplate="body" let-expanded="expanded" let-redundancy> | |
31 | <tr> | |
32 | ||
33 | <td> | |
34 | <span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy"> | |
35 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
36 | </span> | |
37 | </td> | |
38 | ||
39 | <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td> | |
40 | ||
41 | <td>{{ redundancy.name }}</td> | |
42 | ||
43 | <td> | |
44 | <a target="_blank" rel="noopener noreferrer" [href]="redundancy.url">{{ redundancy.url }}</a> | |
45 | </td> | |
46 | ||
47 | <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td> | |
48 | ||
49 | <td class="action-cell"> | |
50 | <my-delete-button (click)="removeRedundancy(redundancy)"></my-delete-button> | |
51 | </td> | |
52 | </tr> | |
53 | </ng-template> | |
54 | ||
55 | <ng-template pTemplate="rowexpansion" let-redundancy> | |
56 | <tr *ngIf="redundancy.redundancies.files.length !== 0"> | |
57 | <td class="expand-cell" [attr.colspan]="getColspan()"> | |
58 | <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block"> | |
59 | <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information> | |
60 | </div> | |
61 | </td> | |
62 | </tr> | |
63 | ||
64 | <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0"> | |
65 | <td class="expand-cell" [attr.colspan]="getColspan()"> | |
66 | <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists"> | |
67 | <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information> | |
68 | </div> | |
69 | </td> | |
70 | </tr> | |
71 | </ng-template> | |
72 | ||
73 | <ng-template pTemplate="emptymessage"> | |
74 | <tr> | |
75 | <td colspan="6"> | |
76 | <div class="empty-table-message"> | |
77 | <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container> | |
78 | <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container> | |
79 | </div> | |
80 | </td> | |
81 | </tr> | |
82 | </ng-template> | |
83 | </p-table> | |
84 | ||
85 | ||
86 | <div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()"> | |
87 | <div class="form-sub-title" i18n>Enabled strategies stats</div> | |
88 | ||
89 | <div class="chart-blocks"> | |
90 | ||
91 | <div *ngIf="noRedundancies" i18n class="no-results"> | |
92 | No redundancy strategy is enabled on your instance. | |
93 | </div> | |
94 | ||
95 | <div class="chart-block" *ngFor="let r of redundanciesGraphsData"> | |
96 | <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart> | |
97 | </div> | |
98 | ||
99 | </div> | |
100 | </div> |