This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Repository navigation
feat(admin): read server and library stats from the kmrs stats endpoints - #124
Merged
Merged
Conversation
everpcpc
force-pushed
the
feat/server-stats-endpoints
branch
from
October 6, 2026 13:06
29b4576 to
45c89a6
Compare
everpcpc
marked this pull request as ready for review
October 6, 2026 13:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the admin UI's metric fetching from the Spring-style
/actuator/metrics/*endpoints to the kmrs-native stats endpoints added in kmrs (GET /api/v1/stats/libraries,GET /api/v1/stats/server).Changes
statsApigainslibraries()andserver();actuatorApilosesmetric/metricNames. The remaining actuator endpoints (health, sessions, scheduledtasks, logfile, shutdown) are untouched.StatsGridreads uptime/CPU/memory from the server snapshot'sprocessfield; CPU is always a percent now, so the ratio-vs-percent branch goes away.ContentCountstakes libraries/collections/readlists from the server totals and series/books/file size from the libraries total.TaskExecutionPaneliterates the per-type rows (queue depth and execution metrics are merged server-side); failures are summed across types. The aggregate-only "all tasks" row is unreachable with the merged shape, so it and itstaskExecution.allTaskslocale keys are removed.LibraryCardfinds its row in the shared libraries stats query; empty libraries report zeros, so the 404-means-zero workaround is gone.admin/stats/server,admin/stats/libraries), replacing the per-metric/per-library request fan-out with two deduplicated queries.useMetric.ts,admin/metric.ts.Testing
pnpm build(tsc + vite) andpnpm lintpass.