mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: adding photo & video storage space to server stats (#14125)
* expose detailed user storage stats + display them in the storage per user table * chore: openapi & sql * fix: fix test stubs * fix: formatting errors, e2e test and server test * fix: upper lower case typo in spec file --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
24ae4ecff1
commit
f5c4af73aa
12 changed files with 138 additions and 7 deletions
|
|
@ -86,6 +86,10 @@ export class UsageByUserDto {
|
|||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usage!: number;
|
||||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usagePhotos!: number;
|
||||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usageVideos!: number;
|
||||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
quotaSizeInBytes!: number | null;
|
||||
}
|
||||
|
||||
|
|
@ -99,6 +103,12 @@ export class ServerStatsResponseDto {
|
|||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usage = 0;
|
||||
|
||||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usagePhotos = 0;
|
||||
|
||||
@ApiProperty({ type: 'integer', format: 'int64' })
|
||||
usageVideos = 0;
|
||||
|
||||
@ApiProperty({
|
||||
isArray: true,
|
||||
type: UsageByUserDto,
|
||||
|
|
@ -107,7 +117,9 @@ export class ServerStatsResponseDto {
|
|||
{
|
||||
photos: 1,
|
||||
videos: 1,
|
||||
diskUsageRaw: 1,
|
||||
diskUsageRaw: 2,
|
||||
usagePhotos: 1,
|
||||
usageVideos: 1,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue