[PR #1870] [MERGED] feat(web): improved server stats #9256

Closed
opened 2026-02-05 14:01:24 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/1870
Author: @michelheusschen
Created: 2/25/2023
Status: Merged
Merged: 2/26/2023
Merged by: @alextran1502

Base: mainHead: feat/web-improved-server-stats


📝 Commits (3)

  • 09a1d56 feat(web): improved server stats
  • 7fc2987 fix(web): don't log unauthorized errors
  • a95608e Revert "fix(web): don't log unauthorized errors"

📊 Changes

25 files changed (+198 additions, -259 deletions)

View changed files

📝 mobile/openapi/doc/ServerStatsResponseDto.md (+3 -5)
📝 mobile/openapi/doc/UsageByUserDto.md (+4 -3)
📝 mobile/openapi/lib/model/server_stats_response_dto.dart (+6 -22)
📝 mobile/openapi/lib/model/usage_by_user_dto.dart (+25 -17)
📝 mobile/openapi/test/server_stats_response_dto_test.dart (+3 -13)
📝 mobile/openapi/test/usage_by_user_dto_test.dart (+10 -5)
📝 server/apps/immich/src/api-v1/album/album.service.spec.ts (+1 -0)
📝 server/apps/immich/src/api-v1/server-info/response-dto/server-stats-response.dto.ts (+4 -18)
📝 server/apps/immich/src/api-v1/server-info/response-dto/usage-by-user-response.dto.ts (+8 -14)
📝 server/apps/immich/src/api-v1/server-info/server-info.module.ts (+2 -2)
📝 server/apps/immich/src/api-v1/server-info/server-info.service.ts (+37 -33)
📝 server/apps/immich/src/api-v1/tag/tag.service.spec.ts (+1 -0)
📝 server/immich-openapi-specs.json (+19 -19)
📝 server/libs/domain/src/user/user.service.spec.ts (+3 -0)
📝 server/libs/domain/test/fixtures.ts (+2 -0)
📝 server/libs/infra/src/db/entities/user.entity.ts (+4 -0)
📝 web/src/api/open-api/api.ts (+12 -18)
📝 web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte (+21 -62)
📝 web/src/lib/components/admin-page/server-stats/stats-card.svelte (+5 -16)
📝 web/src/lib/components/asset-viewer/detail-panel.svelte (+1 -1)

...and 5 more files

📄 Description

  • Changed server-info/stats endpoint to include more user information and removed the pre-formatted usage bytes
  • No seperate API call to get all users needed
  • 'Admin' user now shows the actual name, fixes #1857
  • Users are ordered by their creation date (newest first)
  • Stats now include the size of non-visible assets, but non-visible assets don't count towards photos or videos
  • Soft deleted users are NOT included, but users without assets are now included
  • Added reverse relation from UserEntity to AssetEntity[] because outer join isn't possible in TypeORM

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/1870 **Author:** [@michelheusschen](https://github.com/michelheusschen) **Created:** 2/25/2023 **Status:** ✅ Merged **Merged:** 2/26/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `feat/web-improved-server-stats` --- ### 📝 Commits (3) - [`09a1d56`](https://github.com/immich-app/immich/commit/09a1d56bf3a7412ab6cc7e5b956628252db63ab9) feat(web): improved server stats - [`7fc2987`](https://github.com/immich-app/immich/commit/7fc2987a77ae8bf3a7381ed3156a7a0c16f27564) fix(web): don't log unauthorized errors - [`a95608e`](https://github.com/immich-app/immich/commit/a95608e96688dd450297aa78194e6072a902655e) Revert "fix(web): don't log unauthorized errors" ### 📊 Changes **25 files changed** (+198 additions, -259 deletions) <details> <summary>View changed files</summary> 📝 `mobile/openapi/doc/ServerStatsResponseDto.md` (+3 -5) 📝 `mobile/openapi/doc/UsageByUserDto.md` (+4 -3) 📝 `mobile/openapi/lib/model/server_stats_response_dto.dart` (+6 -22) 📝 `mobile/openapi/lib/model/usage_by_user_dto.dart` (+25 -17) 📝 `mobile/openapi/test/server_stats_response_dto_test.dart` (+3 -13) 📝 `mobile/openapi/test/usage_by_user_dto_test.dart` (+10 -5) 📝 `server/apps/immich/src/api-v1/album/album.service.spec.ts` (+1 -0) 📝 `server/apps/immich/src/api-v1/server-info/response-dto/server-stats-response.dto.ts` (+4 -18) 📝 `server/apps/immich/src/api-v1/server-info/response-dto/usage-by-user-response.dto.ts` (+8 -14) 📝 `server/apps/immich/src/api-v1/server-info/server-info.module.ts` (+2 -2) 📝 `server/apps/immich/src/api-v1/server-info/server-info.service.ts` (+37 -33) 📝 `server/apps/immich/src/api-v1/tag/tag.service.spec.ts` (+1 -0) 📝 `server/immich-openapi-specs.json` (+19 -19) 📝 `server/libs/domain/src/user/user.service.spec.ts` (+3 -0) 📝 `server/libs/domain/test/fixtures.ts` (+2 -0) 📝 `server/libs/infra/src/db/entities/user.entity.ts` (+4 -0) 📝 `web/src/api/open-api/api.ts` (+12 -18) 📝 `web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte` (+21 -62) 📝 `web/src/lib/components/admin-page/server-stats/stats-card.svelte` (+5 -16) 📝 `web/src/lib/components/asset-viewer/detail-panel.svelte` (+1 -1) _...and 5 more files_ </details> ### 📄 Description - Changed `server-info/stats` endpoint to include more user information and removed the pre-formatted usage bytes - No seperate API call to get all users needed - 'Admin' user now shows the actual name, fixes #1857 - Users are ordered by their creation date (newest first) - Stats now include the size of non-visible assets, but non-visible assets don't count towards photos or videos - Soft deleted users are NOT included, but users without assets are now included - Added reverse relation from `UserEntity` to `AssetEntity[]` because outer join isn't possible in TypeORM ![image](https://user-images.githubusercontent.com/59014050/221362162-2d0c9d69-6ebb-4771-8dcd-e2fdaaef0aa8.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:01:24 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9256