1
0
Fork 0

Try to prevent layout shift with redundancy stats

This commit is contained in:
Chocobozzz 2023-02-15 11:39:45 +01:00
parent 6a7cea1527
commit 0e76f30abb
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 9 additions and 2 deletions

View File

@ -86,7 +86,7 @@
</p-table>
<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()">
<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos() && dataLoaded">
<h6 i18n>Enabled strategies stats</h6>
<div class="chart-blocks">

View File

@ -26,6 +26,9 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
noRedundancies = false
// Prevent layout shift for redundancy stats
dataLoaded = false
private bytesPipe: BytesPipe
constructor (
@ -163,6 +166,8 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
}
protected reloadDataInternal () {
this.dataLoaded = false
const options = {
pagination: this.pagination,
sort: this.sort,
@ -174,9 +179,11 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
next: resultList => {
this.videoRedundancies = resultList.data
this.totalRecords = resultList.total
this.dataLoaded = true
},
error: err => this.notifier.error(err.message)
error: err => this.notifier.error(err.message),
})
}