89799969 opened a new issue, #4492:
URL: https://github.com/apache/rocketmq-dashboard/issues/4492

   ### Before Creating the Bug Report
   
   - [x] I have searched the open issues of this repository and believe that 
this is not a duplicate.
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   ### Studio Version
   
   branch: master
   git commit id: 987b748e851d3da94c01e129f0fa61465dcbcf30
   deployed as: built from source
   
   ### Runtime Environment
   
   OS: Windows 11
   MySQL: not required
   browser: Chrome-compatible browser
   
   ### Connected RocketMQ Cluster
   
   RocketMQ version: not required
   access mode: not required
   deployment: not required
   
   ### Build Toolchain
   
   JDK: not required
   Maven: not required
   Node.js: 20.19.0 locally (package engines)
   
   ### Describe the Bug
   
   `formatDelay` in `web/src/utils/format.ts` keeps sub-second precision when 
the input contains millisecond or decimal-second values. Delay/lag labels are 
operator-facing compact durations, so fractional seconds such as `5.9s` / 
`5.9秒` are noisy and inconsistent with the rest of the UI.
   
   ### Steps to Reproduce
   
   1. Call `formatDelay(65.9)` from `web/src/utils/format.ts`.
   2. Render the formatted value in a delay or lag label.
   3. Observe that the seconds segment is not normalized to a whole second.
   
   ### What Did You Expect to See?
   
   Delay labels should use whole seconds after truncating sub-second precision, 
for example `1m 5s` (en) / `1分钟5秒` (zh).
   
   ### What Did You See Instead?
   
   The helper surfaces fractional-second values in the seconds segment (for 
example `5.9s`).
   
   ### Additional Context
   
   This is a small formatting defect. Related withdrawn PR #4460 was closed 
together with issue #4459 when the author stopped pursuing the change; this 
issue reopens the defect against current `master`.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


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