]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
Make sure a report doesn't get deleted upon the deletion of its video
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / video-redundancies-list / video-redundancies-list.component.html
CommitLineData
b764380a 1<div class="admin-sub-header">
b764380a
C
2 <div class="select-filter-block">
3 <label for="displayType" i18n>Display</label>
4
5 <div class="peertube-select-container">
2bc9bd08
RK
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>
b764380a
C
9 </select>
10 </div>
11 </div>
12</div>
13
14<p-table
15 [value]="videoRedundancies" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
16 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
17>
18 <ng-template pTemplate="header">
19 <tr>
68d19a0a
RK
20 <th style="width: 40px;"></th>
21 <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
b764380a
C
22 <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th>
23 <th i18n>Video URL</th>
68d19a0a 24 <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
2bc9bd08 25 <th style="width: 80px;"></th>
b764380a
C
26 </tr>
27 </ng-template>
28
b1f3b635
C
29 <ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
30 <tr>
31
2bc9bd08 32 <td>
b1f3b635
C
33 <span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy">
34 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
35 </span>
36 </td>
37
b764380a
C
38 <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
39
40 <td>{{ redundancy.name }}</td>
41
42 <td>
43 <a target="_blank" rel="noopener noreferrer" [href]="redundancy.url">{{ redundancy.url }}</a>
44 </td>
45
46 <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td>
47
48 <td class="action-cell">
49 <my-delete-button (click)="removeRedundancy(redundancy)"></my-delete-button>
50 </td>
51 </tr>
52 </ng-template>
53
54 <ng-template pTemplate="rowexpansion" let-redundancy>
b1f3b635 55 <tr *ngIf="redundancy.redundancies.files.length !== 0">
2bc9bd08 56 <td class="expand-cell" [attr.colspan]="getColspan()">
b764380a
C
57 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
58 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
59 </div>
60 </td>
61 </tr>
62
b1f3b635 63 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
2bc9bd08 64 <td class="expand-cell" [attr.colspan]="getColspan()">
b764380a
C
65 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
66 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
67 </div>
68 </td>
69 </tr>
70 </ng-template>
71</p-table>
72
73
74<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()">
75 <div class="form-sub-title" i18n>Enabled strategies stats</div>
76
77 <div class="chart-blocks">
78
79 <div *ngIf="noRedundancies" i18n class="no-results">
80 No redundancy strategy is enabled on your instance.
81 </div>
82
83 <div class="chart-block" *ngFor="let r of redundanciesGraphsData">
84 <p-chart type="pie" [data]="r.graphData" [options]="r.options" width="300px" height="300px"></p-chart>
85 </div>
86
87 </div>
88</div>