mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 09:58:44 +08:00
Makes the redesigned dashboard Site traffic section real for the core
traffic summary.
- In scope: live pageview headline, comparison trend, logged-in share
KPI, and stacked traffic chart.
- Out of scope: top referrers, top countries, and narrative traffic
insights. Those remain placeholder UI for a follow-up.
- Reuses the existing report stacked chart for both the dashboard
section and `/admin/reports/site_traffic`.
- Extends the existing site traffic report data contract instead of
introducing a dashboard-only chart shape.
- Keeps traffic aggregation, KPI calculation, and trend eligibility on
the backend.
- Supports dashboard preset and custom date ranges with inclusive date
windows.
- Ships traffic data in this section payload shape:
```json
{
"id": "traffic",
"data": {
"kpis": {
"browser_pageviews": {
"value": 30,
"percent_change": 900,
"comparison_period": {
"start_date": "2026-04-28",
"end_date": "2026-04-30"
}
},
"logged_in_share": {
"value": 33
}
},
"pageview_series": [
{
"req": "page_view_logged_in_browser",
"label": "Logged in",
"color": "#4B3CE0",
"data": [
{ "x": "2026-05-01", "y": 10 }
]
}
]
}
}
```
|
||
|---|---|---|
| .. | ||
| admin-dashboard-skeleton.scss | ||
| admin_base.scss | ||
| admin_bulk_users_delete_modal.scss | ||
| admin_config_area.scss | ||
| admin_config_color_palettes.scss | ||
| admin_config_components.scss | ||
| admin_dashboard.scss | ||
| admin_filter.scss | ||
| admin_filter_controls.scss | ||
| admin_intro.scss | ||
| admin_new_category_setup.scss | ||
| admin_report.scss | ||
| admin_report_chart.scss | ||
| admin_report_counters.scss | ||
| admin_report_inline_table.scss | ||
| admin_report_radar.scss | ||
| admin_report_stacked_chart.scss | ||
| admin_report_stacked_line_chart.scss | ||
| admin_report_table.scss | ||
| admin_reports.scss | ||
| admin_section_landing_page.scss | ||
| admin_table.scss | ||
| admin_user_fields.scss | ||
| api.scss | ||
| backups.scss | ||
| badges.scss | ||
| color-palette-editor.scss | ||
| color_palettes.scss | ||
| customize-install-theme.scss | ||
| customize.scss | ||
| customize_show_schema.scss | ||
| dashboard.scss | ||
| discourse_id.scss | ||
| emails.scss | ||
| flags.scss | ||
| json_schema_editor.scss | ||
| mini_profiler.scss | ||
| penalty.scss | ||
| plugins.scss | ||
| schema_field.scss | ||
| schema_setting_editor.scss | ||
| search.scss | ||
| settings.scss | ||
| sidebar.scss | ||
| site-settings.scss | ||
| staff_logs.scss | ||
| upcoming-changes.scss | ||
| users.scss | ||