Repository navigation
feat: add a Download Analytics status page to the admin dashboard - #2337
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review supports approval, with only a non-blocking suggestion to cover automatic polling in tests.
1 open finding
What changed in this PR
Adds an operator-facing Download Analytics page using the availability tracking introduced in #2336.
Changes:
- Exposes a permission-protected status endpoint with probe details and ingestion counts.
- Adds a dashboard page with automatic and manual refresh.
- Adds server and UI tests and changelog entries.
| File | Description |
|---|---|
webui/test/unit/pages/admin-dashboard/analytics-status.spec.tsx |
Tests status displays and manual refresh. |
webui/src/pages/admin-dashboard/analytics-status/use-analytics-status.ts |
Fetches status with 15-second polling. |
webui/src/pages/admin-dashboard/analytics-status/analytics-status.tsx |
Displays availability and ingestion counts. |
webui/src/pages/admin-dashboard/admin-dashboard.tsx |
Adds permission-guarded navigation and page. |
webui/src/pages/admin-dashboard/admin-dashboard-routes.ts |
Defines the page route. |
webui/src/extension-registry-types.ts |
Defines the status response type. |
webui/src/extension-registry-service.ts |
Adds the status API client. |
webui/CHANGELOG.md |
Documents the dashboard page. |
server/src/test/java/org/eclipse/openvsx/analytics/AnalyticsStatusAPITest.java |
Tests endpoint responses and permission checks. |
server/src/test/java/org/eclipse/openvsx/analytics/AnalyticsAvailabilityTest.java |
Tests probe metadata and state timestamps. |
server/src/main/java/org/eclipse/openvsx/json/AnalyticsStatusJson.java |
Defines the status response payload. |
server/src/main/java/org/eclipse/openvsx/analytics/AnalyticsStatusAPI.java |
Exposes the protected status endpoint. |
server/src/main/java/org/eclipse/openvsx/analytics/AnalyticsAvailability.java |
Tracks timestamps and probe errors. |
server/CHANGELOG.md |
Documents the status endpoint. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return useQuery({ | ||
| queryKey: analyticsStatusQueryKey, | ||
| queryFn: ({ signal }) => service.admin.getAnalyticsStatus(controllerFromSignal(signal)), | ||
| refetchInterval: REFRESH_INTERVAL_MS |
Keep the time and error of the last probe and since when the current state has held, and expose them with the counts of log files that wait for analytics or failed ingestion on GET /admin/analytics/status. The endpoint needs the view_reports permission and stays mapped when analytics is disabled, so that it can say so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Show under Maintenance whether the analytics database is reachable, since when and why not, and how many log files wait for it. The page refreshes itself, and says so when analytics is turned off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
netomi
force-pushed
the
feat/analytics-status-page
branch
from
October 15, 2026 09:54
109fc4d to
24fa65a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Stacked on #2336, which adds the availability check this page reports on; the base of this PR is that branch, so the diff shows only the page. Once #2336 merges, this PR should be retargeted to
main.An outage of the analytics database is deliberately invisible to registry users: the registry keeps serving. That also makes it easy to miss for an operator, who only sees it in the logs and in the
openvsx_analytics_pending_filesgauge. This adds a read-only page under Maintenance that shows it.Server
AnalyticsAvailability.status()returns the current verdict, since when it holds, and the time and error of the last probe. The error is the root cause of the last failed probe, capped at 300 characters, and is absent once a probe succeeded.GET /admin/analytics/statusreturnsenabled,available,since,lastProbe,lastError,pendingFilesandfailedFiles. It requiresview_reports, the permission of the existing Analytics > Statistics page. It stays mapped when analytics is disabled and reportsenabled: false, so the page can say it is off.Web UI
A "Download Analytics" page in the Maintenance group: an Available or Unavailable chip, the since and last-checked times, the last error, and the pending and failed file counts. It shows a warning when the database is unreachable and an info note when analytics is off. It refreshes itself every 15 seconds and has a Refresh button.
The change is in two commits, server first, then the web UI.
Test plan
AnalyticsStatusAPITest(available, unreachable with its reason, disabled, forbidden) and two newAnalyticsAvailabilityTestcases pass;spotlessCheckpassesyarn lint,yarn tscand the fullyarn testpass (527 tests)/admin/**)🤖 Generated with Claude Code