mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +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
18
mobile/openapi/lib/model/usage_by_user_dto.dart
generated
18
mobile/openapi/lib/model/usage_by_user_dto.dart
generated
|
|
@ -16,6 +16,8 @@ class UsageByUserDto {
|
|||
required this.photos,
|
||||
required this.quotaSizeInBytes,
|
||||
required this.usage,
|
||||
required this.usagePhotos,
|
||||
required this.usageVideos,
|
||||
required this.userId,
|
||||
required this.userName,
|
||||
required this.videos,
|
||||
|
|
@ -27,6 +29,10 @@ class UsageByUserDto {
|
|||
|
||||
int usage;
|
||||
|
||||
int usagePhotos;
|
||||
|
||||
int usageVideos;
|
||||
|
||||
String userId;
|
||||
|
||||
String userName;
|
||||
|
|
@ -38,6 +44,8 @@ class UsageByUserDto {
|
|||
other.photos == photos &&
|
||||
other.quotaSizeInBytes == quotaSizeInBytes &&
|
||||
other.usage == usage &&
|
||||
other.usagePhotos == usagePhotos &&
|
||||
other.usageVideos == usageVideos &&
|
||||
other.userId == userId &&
|
||||
other.userName == userName &&
|
||||
other.videos == videos;
|
||||
|
|
@ -48,12 +56,14 @@ class UsageByUserDto {
|
|||
(photos.hashCode) +
|
||||
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
|
||||
(usage.hashCode) +
|
||||
(usagePhotos.hashCode) +
|
||||
(usageVideos.hashCode) +
|
||||
(userId.hashCode) +
|
||||
(userName.hashCode) +
|
||||
(videos.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UsageByUserDto[photos=$photos, quotaSizeInBytes=$quotaSizeInBytes, usage=$usage, userId=$userId, userName=$userName, videos=$videos]';
|
||||
String toString() => 'UsageByUserDto[photos=$photos, quotaSizeInBytes=$quotaSizeInBytes, usage=$usage, usagePhotos=$usagePhotos, usageVideos=$usageVideos, userId=$userId, userName=$userName, videos=$videos]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -64,6 +74,8 @@ class UsageByUserDto {
|
|||
// json[r'quotaSizeInBytes'] = null;
|
||||
}
|
||||
json[r'usage'] = this.usage;
|
||||
json[r'usagePhotos'] = this.usagePhotos;
|
||||
json[r'usageVideos'] = this.usageVideos;
|
||||
json[r'userId'] = this.userId;
|
||||
json[r'userName'] = this.userName;
|
||||
json[r'videos'] = this.videos;
|
||||
|
|
@ -82,6 +94,8 @@ class UsageByUserDto {
|
|||
photos: mapValueOfType<int>(json, r'photos')!,
|
||||
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
|
||||
usage: mapValueOfType<int>(json, r'usage')!,
|
||||
usagePhotos: mapValueOfType<int>(json, r'usagePhotos')!,
|
||||
usageVideos: mapValueOfType<int>(json, r'usageVideos')!,
|
||||
userId: mapValueOfType<String>(json, r'userId')!,
|
||||
userName: mapValueOfType<String>(json, r'userName')!,
|
||||
videos: mapValueOfType<int>(json, r'videos')!,
|
||||
|
|
@ -135,6 +149,8 @@ class UsageByUserDto {
|
|||
'photos',
|
||||
'quotaSizeInBytes',
|
||||
'usage',
|
||||
'usagePhotos',
|
||||
'usageVideos',
|
||||
'userId',
|
||||
'userName',
|
||||
'videos',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue