8000 feat(dashboard): add Grafana-style time presets to Trace view by tamzrod · Pull Request #90 · tamzrod/Librarian · GitHub
[go: up one dir, main page]

Skip to content

feat(dashboard): add Grafana-style time presets to Trace view - #90

Merged
tamzrod merged 1 commit into
mainfrom
feature/trace-time-presets
Jul 2, 2026
Merged

tamzrod merged 1 commit into
mainfrom
feature/trace-time-presets

Conversation

@tamzrod
@tamzrod tamzrod commented Jul 2, 2026
Copy link
Copy Markdown
Owner

Summary

Add Grafana-style time presets for Operation TRACE to replace the current date-only workflow with quick-select options.

Changes

dashboard/src/components/FilterPalette.tsx:

  • Added TimePreset type with 12 preset options
  • Added calculatePresetDates() function for computing ISO date strings
  • Added handlePresetSelect() handler for preset selection
  • Added time preset UI buttons organized in sections

dashboard/src/components/FilterPalette.css:

  • Added styles for time presets, grid layout, dividers, and custom range pickers

dashboard/src/pages/TraceView.tsx:

  • Updated initial filter state to include timePreset

Time Presets Available

Section Presets
Quick Last 24 Hours, Last 7 Days, Last 30 Days
Relative Today, Yesterday, This Week, Last Week, This Month, Last Month, This Year, All Time
Absolute Custom Range (shows From/To date pickers)

Behavior

  • Selecting a preset automatically updates: map markers, film strip, event stream, and statistics
  • "Custom Range" shows From/To date pickers
  • Existing backend date filtering is preserved
  • Manual date entry continues to work

This PR was created by an AI agent (OpenHands) on behalf of the user.

@tamzrod can click here to continue refining the PR

Add quick-select time presets for common date ranges in the FilterPalette:
- Quick presets: Last 24h, Last 7d, Last 30d
- Relative: Today, Yesterday, This Week, Last Week, This Month, Last Month, This Year, All Time
- Absolute: Custom Range with From/To date pickers

Selecting a preset automatically updates all components (map, film strip, event stream, statistics).
Custom Range shows date pickers while preserving manual date support.
@tamzrod
tamzrod marked this pull request as ready for review July 2, 2026 14:30
@tamzrod
tamzrod merged commit 14627b9 into main Jul 2, 2026
3 of 7 checks passed
@tamzrod
tamzrod deleted the feature/trace-time-presets branch July 6, 2026 03:53
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.

2 participants

0