Improve admin tables row expand
This commit is contained in:
parent
a911462d02
commit
b1f3b635ed
|
@ -1,6 +1,4 @@
|
||||||
<div class="admin-sub-header">
|
<div class="admin-sub-header">
|
||||||
<div i18n class="form-sub-title">Video redundancies list</div>
|
|
||||||
|
|
||||||
<div class="select-filter-block">
|
<div class="select-filter-block">
|
||||||
<label for="displayType" i18n>Display</label>
|
<label for="displayType" i18n>Display</label>
|
||||||
|
|
||||||
|
@ -19,6 +17,7 @@
|
||||||
>
|
>
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width: 40px"></th>
|
||||||
<th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
|
<th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
|
||||||
<th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th>
|
<th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th>
|
||||||
<th i18n>Video URL</th>
|
<th i18n>Video URL</th>
|
||||||
|
@ -27,8 +26,15 @@
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="body" let-redundancy>
|
<ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
|
||||||
<tr class="expander" [pRowToggler]="redundancy">
|
<tr>
|
||||||
|
|
||||||
|
<td class="expand-cell">
|
||||||
|
<span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy">
|
||||||
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
|
<td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
|
||||||
|
|
||||||
<td>{{ redundancy.name }}</td>
|
<td>{{ redundancy.name }}</td>
|
||||||
|
@ -46,16 +52,16 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="rowexpansion" let-redundancy>
|
<ng-template pTemplate="rowexpansion" let-redundancy>
|
||||||
<tr>
|
<tr *ngIf="redundancy.redundancies.files.length !== 0">
|
||||||
<td colspan="2">
|
<td [attr.colspan]="getColspan()">
|
||||||
<div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
|
<div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
|
||||||
<my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
|
<my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
|
||||||
<td colspan="2">
|
<td [attr.colspan]="getColspan()">
|
||||||
<div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
|
<div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
|
||||||
<my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
|
<my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-sub-header {
|
.admin-sub-header {
|
||||||
align-items: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.select-filter-block {
|
.select-filter-block {
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
|
|
|
@ -65,6 +65,12 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getColspan () {
|
||||||
|
if (this.isDisplayingRemoteVideos()) return 3
|
||||||
|
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
isDisplayingRemoteVideos () {
|
isDisplayingRemoteVideos () {
|
||||||
return this.displayType === 'remote-videos'
|
return this.displayType === 'remote-videos'
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,9 @@
|
||||||
|
|
||||||
<ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
|
<ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td class="expand-cell">
|
<td class="expand-cell">
|
||||||
<span class="expander" [pRowToggler]="videoAbuse">
|
<span class="expander" i18n-ngbTooltip ngbTooltip="More information" [pRowToggler]="videoAbuse">
|
||||||
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -15,8 +15,9 @@
|
||||||
|
|
||||||
<ng-template pTemplate="body" let-videoBlacklist let-expanded="expanded">
|
<ng-template pTemplate="body" let-videoBlacklist let-expanded="expanded">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td class="expand-cell">
|
<td class="expand-cell">
|
||||||
<span *ngIf="videoBlacklist.reason" class="expander" [pRowToggler]="videoBlacklist">
|
<span *ngIf="videoBlacklist.reason" class="expander" i18n-ngbTooltip ngbTooltip="More information" [pRowToggler]="videoBlacklist">
|
||||||
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<div class="admin-sub-header">
|
<div class="admin-sub-header">
|
||||||
<div i18n class="form-sub-title">Jobs list</div>
|
|
||||||
|
|
||||||
<div class="select-filter-block">
|
<div class="select-filter-block">
|
||||||
<label for="jobType" i18n>Job type</label>
|
<label for="jobType" i18n>Job type</label>
|
||||||
<div class="peertube-select-container">
|
<div class="peertube-select-container">
|
||||||
|
@ -27,6 +25,7 @@
|
||||||
>
|
>
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width: 40px"></th>
|
||||||
<th class="job-id" i18n>ID</th>
|
<th class="job-id" i18n>ID</th>
|
||||||
<th class="job-type" i18n>Type</th>
|
<th class="job-type" i18n>Type</th>
|
||||||
<th class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
|
<th class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
|
||||||
|
@ -35,7 +34,13 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="body" let-expanded="expanded" let-job>
|
<ng-template pTemplate="body" let-expanded="expanded" let-job>
|
||||||
<tr class="expander" [pRowToggler]="job">
|
<tr>
|
||||||
|
<td class="expand-cell">
|
||||||
|
<span class="expander" [pRowToggler]="job" i18n-ngbTooltip ngbTooltip="More information">
|
||||||
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td class="job-id" [title]="job.id">{{ job.id }}</td>
|
<td class="job-id" [title]="job.id">{{ job.id }}</td>
|
||||||
<td class="job-type">{{ job.type }}</td>
|
<td class="job-type">{{ job.type }}</td>
|
||||||
<td class="job-date">{{ job.createdAt }}</td>
|
<td class="job-date">{{ job.createdAt }}</td>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-sub-header {
|
.admin-sub-header {
|
||||||
align-items: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.select-filter-block {
|
.select-filter-block {
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
<ng-template pTemplate="body" let-expanded="expanded" let-videoImport>
|
<ng-template pTemplate="body" let-expanded="expanded" let-videoImport>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="expand-cell">
|
||||||
<span *ngIf="videoImport.error" class="expander" [pRowToggler]="videoImport">
|
<span *ngIf="videoImport.error" class="expander" [pRowToggler]="videoImport" i18n-ngbTooltip ngbTooltip="See the error">
|
||||||
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue