]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
Add fcbk open-graph and twitter-card metas for accounts, video-channels, playlists...
[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" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
21 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
22 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
23 >
24 <ng-template pTemplate="header">
25 <tr>
26 <th style="width: 40px;"></th>
27 <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
28 <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th >
29 <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
30 <th style="width: 150px;"></th>
31 </tr>
32 </ng-template>
33
34 <ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
35 <tr>
36
37 <td>
38 <span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy">
39 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
40 </span>
41 </td>
42
43 <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
44
45 <td>
46 <a [href]="redundancy.url" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
47 {{ redundancy.name }}
48 <span class="glyphicon glyphicon-new-window"></span>
49 </a>
50 </td>
51
52 <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td>
53
54 <td class="action-cell">
55 <my-delete-button (click)="removeRedundancy(redundancy)"></my-delete-button>
56 </td>
57 </tr>
58 </ng-template>
59
60 <ng-template pTemplate="rowexpansion" let-redundancy>
61 <tr *ngIf="redundancy.redundancies.files.length !== 0">
62 <td class="expand-cell" [attr.colspan]="getColspan()">
63 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
64 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
65 </div>
66 </td>
67 </tr>
68
69 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
70 <td class="expand-cell" [attr.colspan]="getColspan()">
71 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
72 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
73 </div>
74 </td>
75 </tr>
76 </ng-template>
77
78 <ng-template pTemplate="emptymessage">
79 <tr>
80 <td colspan="6">
81 <div class="no-results">
82 <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container>
83 <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container>
84 </div>
85 </td>
86 </tr>
87 </ng-template>
88 </p-table>
89
90
91 <div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()">
92 <div class="form-sub-title" i18n>Enabled strategies stats</div>
93
94 <div class="chart-blocks">
95
96 <div *ngIf="noRedundancies" i18n class="no-results">
97 No redundancy strategy is enabled on your instance.
98 </div>
99
100 <div class="chart-block" *ngFor="let r of redundanciesGraphsData">
101 <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart>
102 </div>
103
104 </div>
105 </div>