add trend & statistics panel with contribution heatmap#952
Merged
Conversation
feat(trend): add trend & statistics panel with contribution heatmap - Add GET /db/stats/trend endpoint aggregating daily/monthly image counts, top models/samplers/source/LoRA, total images and disk usage - Cache results in global_setting table for fast subsequent access - Vue component with GitHub-style contribution heatmap (pure HTML/CSS), monthly trend bar chart, top models and top source distribution charts - Quick access button on startup page header - i18n support for en, zh-hans, zh-hant, de @
TREND_CACHE_VERSION was defined but never checked — cache was only invalidated on image count change. Now also compares the stored cache_version against the current constant so bumping the version number forces a full cache refresh.
Direct queries on 84k-row image table complete in ~50ms; caching adds complexity (version management, stale data) with no real benefit. Also drop the cached_at field from the frontend type.
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.
feat(trend): add trend & statistics panel with contribution heatmap