Skip to content

fix(dashboard): sanitize empty spaces and invalid filter params#3090

Open
1genierock wants to merge 3 commits into
pingcap:mainfrom
1genierock:main
Open

fix(dashboard): sanitize empty spaces and invalid filter params#3090
1genierock wants to merge 3 commits into
pingcap:mainfrom
1genierock:main

Conversation

@1genierock

Copy link
Copy Markdown

Description

This PR addresses an issue where empty space filters or invalid blank parameters passed to the dashboard component trigger faulty state logic or bad remote API requests.

Changes

  • Added a default value to the params object in the Analyze component properties.
  • Implemented a sanitizedParams filter using Object.fromEntries to completely strip out any keys containing empty strings or whitespace-only inputs.
  • Updated useRemoteData hooks to consume sanitizedParams instead of raw parameters.

Sanitize params before using them in remote data calls.
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@1genierock is attempting to deploy a commit to the pingcap Team on Vercel.

A member of the Team first needs to authorize it.

Refactor parameter sanitization logic to use a for-in loop for improved clarity and control over null and undefined values.
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.

1 participant