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

   Fixes #669
   
   ### Problem
   
   On 4.x clusters (or 5.x clusters where topics were created without a message 
type attribute), every topic reports `messageType = UNSPECIFIED`. The topic 
page's default filter only selects `NORMAL`, and the `UNSPECIFIED` fallback 
branch was guarded by `rmqVersion` which is hardcoded to `true` and never 
updated, so all these topics were filtered out and the topic table appeared 
empty even though the backend returned full data.
   
   ### Fix
   
   In `frontend-new/src/pages/Topic/topic.jsx`, treat `UNSPECIFIED` as a normal 
topic in `filterByType`:
   
   ```diff
   -        if (filterNormal && type.includes("NORMAL")) return true;
   -        if (!rmqVersion && filterNormal && type.includes("UNSPECIFIED")) 
return true;
   +        if (filterNormal && (type.includes("NORMAL") || 
type.includes("UNSPECIFIED"))) return true;
   ```
   
   ### Verification
   
   `npm run build` passes on the fixed source (react-scripts build, which also 
runs ESLint), and the built bundle contains the updated filter logic.
   
   ### Diff
   
   1 file changed, +3 / -2.


-- 
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