Aias00 opened a new pull request, #517: URL: https://github.com/apache/rocketmq-dashboard/pull/517
### Motivation This is a small follow-up for #431. The Settings data source test endpoint still returned a fixed success response, so users could not validate whether a configured Prometheus-compatible source was actually reachable. ### Changes - Replace the fixed success response in `SettingsService.testDataSource` with a real Prometheus-compatible HTTP API probe. - Query `/api/v1/query?query=up` for Prometheus, VictoriaMetrics, Thanos, and Mimir style data sources. - Return explicit failure messages for invalid URLs, upstream Prometheus errors, connection failures, and timeouts. - Avoid logging the full data source URL during connection tests. - Add regression tests with a local mock HTTP server. ### Non-goals This PR does not add credential fields or replace dashboard charts. It only makes the existing test endpoint validate the configured Prometheus-compatible URL. ### Verification - `JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -B -ntp -Dtest=SettingsServiceTest test` - `JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -B -ntp test` -- 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]
