aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-26 09:00:08 +0200
committerChocobozzz <me@florianbigard.com>2021-08-26 10:01:42 +0200
commit818045ef04b321aa0a66bb8abce30a2e94e9fefa (patch)
treed1f900a396b85db252d7735209571d9f2f1b8955 /client/src/app/+admin
parent50bb71badee51785fb54b95b9811ed862983a513 (diff)
downloadPeerTube-818045ef04b321aa0a66bb8abce30a2e94e9fefa.tar.gz
PeerTube-818045ef04b321aa0a66bb8abce30a2e94e9fefa.tar.zst
PeerTube-818045ef04b321aa0a66bb8abce30a2e94e9fefa.zip
Update client dependencies
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts34
1 files changed, 18 insertions, 16 deletions
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
index 7ffed83e8..2f87c6743 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
@@ -1,3 +1,4 @@
1import { ChartData, ChartOptions, TooltipItem } from 'chart.js'
1import { SortMeta } from 'primeng/api' 2import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' 4import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
@@ -21,7 +22,7 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
21 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 22 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
22 displayType: VideoRedundanciesTarget = 'my-videos' 23 displayType: VideoRedundanciesTarget = 'my-videos'
23 24
24 redundanciesGraphsData: { stats: VideosRedundancyStats, graphData: any, options: any }[] = [] 25 redundanciesGraphsData: { stats: VideosRedundancyStats, graphData: ChartData, options: ChartOptions }[] = []
25 26
26 noRedundancies = false 27 noRedundancies = false
27 28
@@ -114,21 +115,22 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
114 ] 115 ]
115 }, 116 },
116 options: { 117 options: {
117 title: { 118 plugins: {
118 display: true, 119 title: {
119 text: stats.strategy 120 display: true,
120 }, 121 text: stats.strategy
121 122 },
122 tooltips: { 123
123 callbacks: { 124 tooltip: {
124 label: (tooltipItem: any, data: any) => { 125 callbacks: {
125 const dataset = data.datasets[tooltipItem.datasetIndex] 126 label: (tooltip: TooltipItem<any>) => {
126 let label = data.labels[tooltipItem.index] 127 let label = tooltip.label || ''
127 if (label) label += ': ' 128 if (label) label += ': '
128 else label = '' 129
129 130 label += this.bytesPipe.transform(tooltip.raw as number, 1)
130 label += this.bytesPipe.transform(dataset.data[tooltipItem.index], 1) 131
131 return label 132 return label
133 }
132 } 134 }
133 } 135 }
134 } 136 }