Skip to content

[FEATURE] Add disable_auto_refresh config - #212

Open
mixturesolutions wants to merge 4 commits into
perses:mainfrom
mixturesolutions:feat/4295-disable-auto-refresh
Open

[FEATURE] Add disable_auto_refresh config#212
mixturesolutions wants to merge 4 commits into
perses:mainfrom
mixturesolutions:feat/4295-disable-auto-refresh

Conversation

@mixturesolutions

@mixturesolutions mixturesolutions commented Aug 4, 2026

Copy link
Copy Markdown

Description

Adds an optional admin config flag to centrally disable dashboard auto-refresh, addressing perses/perses#4295

Default: false (no behavior change unless explicitly enabled)

When enabled:

  • The auto-refresh interval dropdown is greyed out and non-interactive
  • Tooltip: “Auto-refresh has been turned off by your administrator.”
  • Dashboard refreshInterval and ?refresh= URL param are ignored
  • Follows the same pattern as disable_custom and disable_zoom

Note this is linked with another PR in the main perses repo

Screenshots

To enable, change in the respective perses config yaml file like the following:
Screenshot 2026-07-30 at 2 09 37 PM

Once the changes are deployed, config page will reflect the changes and the dashboard ui will look like:
Screenshot 2026-07-30 at 2 10 20 PM

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

…a server config (default false)

Signed-off-by: Iris Ye <iris.ye.cs@gmail.com>
@mixturesolutions
mixturesolutions force-pushed the feat/4295-disable-auto-refresh branch from 2e9c4cb to e7d4d0f Compare August 4, 2026 14:22
@mixturesolutions mixturesolutions changed the title [FEATURE] Allow admins to centrally disable dashboard auto-refresh via server [FEATURE] Add disable_auto_refresh config Aug 4, 2026
@jgbernalp

Copy link
Copy Markdown
Contributor

@mixturesolutions mind checking the tests and lint failures?

Comment thread plugin-system/src/runtime/TimeRangeProvider/TimeRangeProvider.tsx Outdated
const [paramsLoaded, setParamsLoaded] = useState<boolean>(false);

const { refresh } = query;
const effectiveInitialRefreshInterval = disableAutoRefresh ? DISABLED_REFRESH_INTERVAL : initialRefreshInterval;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if we need all this logic to set the refresh interval to a default one. It complicates the logic when the admin re enables it as is persistent in the URL and there is no path to reset it to the default value that might come from the dashboard. If the refresh action is already gated we might not need to edit the query params.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Not sure if we need all this logic to set the refresh interval to a default one. It complicates the logic when the admin re enables it as is persistent in the URL and there is no path to reset it to the default value that might come from the dashboard. If the refresh action is already gated we might not need to edit the query params.

You are absolutely right, I simplified this and a lot more, only keeping the necessary changes. Everything should work now.

mixturesolutions and others added 3 commits August 6, 2026 08:50
Co-authored-by: Gabriel Bernal <gabrielbernalp@gmail.com>
Signed-off-by: Iris Ye <143642859+mixturesolutions@users.noreply.github.com>
Signed-off-by: Iris Ye <iris.ye.cs@gmail.com>
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