coder999o opened a new pull request, #7333:
URL: https://github.com/apache/rocketmq-dashboard/pull/7333

   ## What is the purpose of the change
   
   Fixes #7332. The data-source API accepts authentication modes 
case-insensitively and preserves their casing. Settings only recognizes the 
selector's exact title-case values, so an API-created `basic auth` or `BEARER 
TOKEN` source incorrectly permits credential-free row tests and opens an edit 
dialog without credential inputs.
   
   ## Brief changelog
   
   - Normalize known saved modes to the existing selector values before 
editing, and use the same normalization for credential-required row actions. 
Preserve unknown modes instead of treating them as anonymous.
   - Add 12 component regressions for lowercase/uppercase Basic Auth, Bearer 
Token, and None, including missing-credential validation and connection-test 
payloads. Credentials remain transient; no API or storage migration is needed.
   
   ## Verifying this change
   
   - Before the fix, 10 new cases failed and the two anonymous row controls 
passed.
   - `cd web && npm test -- src/pages/settings/__tests__/DataSourceTab.test.tsx 
src/api/settings.test.ts src/components/__tests__/MetricsExplorer.test.tsx 
--maxWorkers=1` — 3 files, 91 tests passed.
   - `npx tsc -b --pretty false`, scoped ESLint, Prettier checks, and `git diff 
--check` passed. `npm run lint` completed with 0 errors and 10 existing 
warnings outside the changed files.
   - Full diff independently reviewed. These are component/unit checks; no 
deployed browser or live Prometheus verification is claimed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to