Skip to content

add trend & statistics panel with contribution heatmap#952

Merged
zanllp merged 3 commits into
mainfrom
feature/trend-panel
May 17, 2026
Merged

add trend & statistics panel with contribution heatmap#952
zanllp merged 3 commits into
mainfrom
feature/trend-panel

Conversation

@zanllp

@zanllp zanllp commented May 17, 2026

Copy link
Copy Markdown
Owner

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 @

zanllp added 3 commits May 17, 2026 15:08
@
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.
@zanllp zanllp merged commit a2f9e62 into main May 17, 2026
@zanllp zanllp deleted the feature/trend-panel branch May 17, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant