zjncs opened a new pull request, #5622: URL: https://github.com/apache/rocketmq-dashboard/pull/5622
Closes #5621 ## Problem `CreateNameserverRegistryDTO` enforces `@Size` caps (name 128, namesrvAddr 512, k8sNamespace 128), but the registry modal's inputs had only `required` rules and no `maxLength` — a user could type a 129-character name or a 513-character address list and submit, only to receive a bare server-side 400 with their input still in the form. ## Fix Add `maxLength` with a visible counter to the three free-text inputs (name 128, namesrvAddr 512, k8sNamespace 128). `k8sId` is options-bound from system values and `description` has no cap — both untouched. ## Verification - New backend contract test `NameserverRegistrySizeContractTest` pins the DTO constraint (129-char name rejected / 128 accepted / 513-char addr rejected) — 3/3 - New frontend test in `ClusterPage.test.tsx` opens the 新建 NameServer dialog and asserts the three inputs' `maxlength` attributes (128/512/128) - Mutation check: stashing only the form change makes the frontend test fail; restoring it passes - Regression: the full `ClusterPage` suite 30/30; `tsc --noEmit` clean ## Collision note `cluster/index.tsx` is touched by #5032/#5151/#5299/#5429 (hunks at 167, 695-797, 1406-1444); the NS registry modal region (~1915-1940) is disjoint from all four. The other two files have no occupants. -- 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]
