Skip to content

[SP/IP] default periods for specific dashboards - #4

Open
MatiasArriola wants to merge 2 commits into
feature/saved-filters-42-869c2wrkefrom
feature/spip-default-period
Open

MatiasArriola wants to merge 2 commits into
feature/saved-filters-42-869c2wrkefrom
feature/spip-default-period

Conversation

@MatiasArriola

Copy link
Copy Markdown

📌 References

Important notes

Based on #3

📝 Implementation

Adds dashboard-specific default relative periods through dataStore/dashboard/defaultFilters.

{
  "DASHBOARD_UID": {
    "pe": [{ "id": "TODAY" }]
  }
}

Defaults apply when entering a dashboard online. Users can change or clear them, and same-dashboard reloads preserve their selection. Offline entry skips defaults to preserve compatibility with cached data. Missing or invalid configuration leaves existing behavior unchanged.

This only support relative periods, but could be expanded to support saved filters or other kind of filters in the future.

🔥 Notes to the reviewer

Already bumped version to 101.4.2-spip2

📹 Screenshots/Screen capture

@Ramon-Jimenez Ramon-Jimenez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great @MatiasArriola ! I had some issues with the cache testing this and I had to clear it from the browser, but it works!

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