aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/redundancy/videos-redundancy.model.ts19
-rw-r--r--shared/models/server/server-stats.model.ts10
2 files changed, 26 insertions, 3 deletions
diff --git a/shared/models/redundancy/videos-redundancy.model.ts b/shared/models/redundancy/videos-redundancy.model.ts
index eb84964e0..436394c1e 100644
--- a/shared/models/redundancy/videos-redundancy.model.ts
+++ b/shared/models/redundancy/videos-redundancy.model.ts
@@ -1,6 +1,19 @@
1export type VideoRedundancyStrategy = 'most-views' 1export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
2 2
3export interface VideosRedundancy { 3export type MostViewsRedundancyStrategy = {
4 strategy: VideoRedundancyStrategy 4 strategy: 'most-views'
5 size: number 5 size: number
6} 6}
7
8export type TrendingRedundancyStrategy = {
9 strategy: 'trending'
10 size: number
11}
12
13export type RecentlyAddedStrategy = {
14 strategy: 'recently-added'
15 size: number
16 minViews: number
17}
18
19export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy
diff --git a/shared/models/server/server-stats.model.ts b/shared/models/server/server-stats.model.ts
index 5c1bf3468..a6bd2d4d3 100644
--- a/shared/models/server/server-stats.model.ts
+++ b/shared/models/server/server-stats.model.ts
@@ -1,3 +1,5 @@
1import { VideoRedundancyStrategy } from '../redundancy'
2
1export interface ServerStats { 3export interface ServerStats {
2 totalUsers: number 4 totalUsers: number
3 totalLocalVideos: number 5 totalLocalVideos: number
@@ -9,4 +11,12 @@ export interface ServerStats {
9 11
10 totalInstanceFollowers: number 12 totalInstanceFollowers: number
11 totalInstanceFollowing: number 13 totalInstanceFollowing: number
14
15 videosRedundancy: {
16 strategy: VideoRedundancyStrategy
17 totalSize: number
18 totalUsed: number
19 totalVideoFiles: number
20 totalVideos: number
21 }[]
12} 22}