-import { Component, OnInit } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
import { SortMeta } from 'primeng/api'
-import { ConfirmService } from '../../../core/confirm/confirm.service'
-import { RestPagination, RestTable } from '../../../shared'
+import { Component, OnInit } from '@angular/core'
+import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
+import { BytesPipe, RedundancyService } from '@app/shared/shared-main'
import { I18n } from '@ngx-translate/i18n-polyfill'
+import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
-import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
import { VideosRedundancyStats } from '@shared/models/server'
-import { BytesPipe } from 'ngx-pipes'
-import { RedundancyService } from '@app/shared/video/redundancy.service'
@Component({
selector: 'my-video-redundancies-list',
templateUrl: './video-redundancies-list.component.html',
- styleUrls: [ './video-redundancies-list.component.scss' ]
+ styleUrls: [ '../follows.component.scss', './video-redundancies-list.component.scss' ]
})
export class VideoRedundanciesListComponent extends RestTable implements OnInit {
private static LOCAL_STORAGE_DISPLAY_TYPE = 'video-redundancies-list-display-type'
videoRedundancies: VideoRedundancy[] = []
totalRecords = 0
- rowsPerPage = 10
sort: SortMeta = { field: 'name', order: 1 }
pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
this.bytesPipe = new BytesPipe()
}
+ getIdentifier () {
+ return 'VideoRedundanciesListComponent'
+ }
+
ngOnInit () {
this.loadSelectLocalStorage()
})
}
+ getColspan () {
+ if (this.isDisplayingRemoteVideos()) return 5
+
+ return 4
+ }
+
isDisplayingRemoteVideos () {
return this.displayType === 'remote-videos'
}