You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/08/13 08:38:35 UTC

[PR] fix(web): clamp formatBytes units and guard non-finite input [rocketmq-dashboard]

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

   ## What is the purpose of the change
   
   Fix #2064.
   
   formatBytes did not clamp the unit index and did not guard non-finite input. bytes beyond PB rendered an undefined unit (e.g. "1.2 undefined"), and NaN/Infinity rendered "NaN undefined".
   
   ## Brief changelog
   
   - formatBytes: guard non-finite input with '-', clamp to the largest unit with a division loop, and format the value against the clamped index
   
   ## How was this patch verified
   
   - npx vitest run src/utils/format.test.ts (4 passed)
   - npx tsc -b clean
   - npx eslint . clean
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(web): clamp formatBytes units and guard non-finite input [rocketmq-dashboard]

Posted by "yyqdbngt (via GitHub)" <gi...@apache.org>.
yyqdbngt closed pull request #2069: fix(web): clamp formatBytes units and guard non-finite input
URL: https://github.com/apache/rocketmq-dashboard/pull/2069


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org