Fix time-range filtering: correct FireFly query format, add custom ranges, align histograms (#173) #234
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.
Summary
This PR fixes incorrect and inconsistent behavior in FireFly UI's time filtering.
Custom start/end ranges now work end-to-end, and all outgoing queries now match
the exact FireFly API format (unix seconds, operators in the value, two params
for ranges). Histograms now respect custom endTime, and API errors no longer
crash components.
Fixes #173.
What Was Broken
created>=...as a key or encoded bracketed ranges).What This PR Changes
1. Time filter model + utils
Added
startTimeandendTimetoITimeFilterObject.Added a
customenum option.Rebuilt parsing to generate unix seconds.
Query params now use FireFly’s required format:
&created=>=<unix>&created=<=<unix>&created=>=<start>&created=<=<end>This resolves no-op filters and 400s.
2. Search param handling
startTime/endTimein URL params.3. Custom Range UI
4. Lists + histograms
endTimewhen present.5. Error handling
fetchCatchernow throws on non-OK responses.Result
All commits are DCO-signed.