Frun1na opened a new pull request, #5079:
URL: https://github.com/apache/rocketmq-dashboard/pull/5079
### Which Issue(s) This PR Fixes
- Fixes #<issue-id>
### Brief Description
`output.stringify` renders table cells for nested JSON values (maps and
arrays decoded from a tool response) with Go's default `fmt.Sprint` formatting,
so a cell shows things like `map[max:10 used:3]` — Go-syntax noise with the
server's actual JSON shape lost.
The tool outputs are JSON to begin with, so nested objects and arrays are
now rendered as their JSON form (`{"max":10,"used":3}`, `["a","b"]`). Scalars
keep their existing rendering.
### How Did You Test This Change?
```
cd rmqctl && go test ./internal/output/
ok github.com/apache/rocketmq-dashboard/rmqctl/internal/output
```
The new test fails on the unpatched renderer:
```
--- FAIL: TestRowsRendersNestedValuesAsJSON
data line renders Go syntax for nested values
```
`gofmt -l` clean, `go vet ./internal/output/` clean.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks)
- [x] New source files carry the ASF license header
- [ ] Documentation touched where behaviour changed (README / `docs/` /
in-app help)
--
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]