Staging environment + FleetOps split #17

Open
kianiadee wants to merge 23 commits from feat/staging-fleetops-architecture into main
Showing only changes of commit 024b698bca - Show all commits

View file

@ -356,6 +356,9 @@ def _preset_to_range(period: str | None, start_date, end_date):
except ValueError:
return default
return _d(start_date, today), _d(end_date, today)
# generic 'Nd' window (e.g. 7d / 30d / 90d / 365d) — used by the Fuel Log tab
if p.endswith("d") and p[:-1].isdigit() and int(p[:-1]) > 0:
return today - timedelta(days=int(p[:-1]) - 1), today
# default + '7d'
return today - timedelta(days=6), today