messere1 opened a new issue, #1603: URL: https://github.com/apache/rocketmq-dashboard/issues/1603
### Description When `MetricsExplorer` is scoped to an instance, the selected metrics data source can become unavailable after the parent switches to another instance. The availability effect clears the rendered selection, but it does not clear `dataSourceKeyRef` or reload the metric from the default source. As a result, the selector appears to use the default source while the Refresh action continues querying the data source that belonged to the previous instance. ### Steps to reproduce 1. Render Metrics Explorer for instance A. 2. Select a data source bound only to instance A. 3. Switch the parent view to instance B. 4. Observe that the selector falls back to the default source. 5. Refresh the metric. ### Expected behavior The unavailable selection is invalidated consistently and the current metric is reloaded from the default source. ### Actual behavior The internal ref still contains the instance-A data source key, so refreshes keep querying it despite the empty selector. ### Proposed fix Clear both the state and ref when the selected source is no longer available, invalidate any in-flight source query, and reload the selected metric through the default metrics endpoint. Add a regression test that rerenders with a different instance. -- 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]
