feat(web): show template env and network egress policy in WebUI#486
feat(web): show template env and network egress policy in WebUI#486xiaojunxiang2023 wants to merge 2 commits into
Conversation
|
Claude finished @xiaojunxiang2023's task in 2m 11s —— View job Code Review: feat(web): show template env and network egress policy in WebUIOverall: This is a clean, well-structured PR. The extraction of ✅ What's done well
🔍 Minor suggestions
✅ Test plan verificationThe provided test plan covers:
All scenarios are covered. No issues found with the test plan. Summary
| Branch |
|
Claude finished @xiaojunxiang2023's task in 1m 21s —— View job Review: Re-synchronized PR #486 ✓The PR was re-synchronized with commit What changed in the re-sync commit
Detailed changes
This lets developers visually test the new env and policy features in mock mode without a real backend.
Final verdict
The PR is in good shape. No additional issues found in the re-sync commit. | Branch |
41c8494 to
a77eb01
Compare
|
Claude finished @xiaojunxiang2023's task in 2m 43s —— View job Code Review: feat(web): show template env and network egress policy in WebUI
Status: This is a re-synchronization of the branch (likely a rebase/force-push after the prior review). The substantive code is identical to what was reviewed in the previous pass — the same two commits ( ✅ Prior feedback confirmationAll suggestions from the first review have been verified as addressed:
📝 Additional observations1. return results
.map((r, i): TemplateDetail => { ... })
.filter(Boolean);The 2. return {
templateID: base.templateID,
...
createRequest: buildMockCreateRequest(base),
...network, // { networkType, allowInternetAccess }
} as TemplateDetailDto;The spread of 3. ✅ Final summaryThe PR is clean, well-structured, and all prior feedback has been incorporated. The code is correct, the types are well-defined, the mock fixtures support visual testing, and both locale files are complete.
| Branch | | |
a77eb01 to
77684fc
Compare
|
Claude finished @xiaojunxiang2023's task in 1m 25s —— View job ✅ Review: feat(web): show template env and network egress policy in WebUI
Status: This is a re-synchronization of the same branch. The two commits ( ✅ Prior feedback confirmationAll suggestions from previous reviews remain addressed:
📝 Additional observations (re-checked)1. 2. Env variable order in 3. ✅ Final verdict
The PR is in good shape. No additional issues found in this pass. | Branch | |
77684fc to
a77eb01
Compare
|
Claude finished @xiaojunxiang2023's task in 1m 15s —— View job ✅ Review: feat(web): show template env and network egress policy in WebUI
Status: This is a re-synchronization of the same branch with identical content to the prior review. No new commits were introduced — the two commits ( 📋 Prior feedback confirmationAll suggestions from previous reviews remain addressed with no regressions:
🔍 Re-check observations1. 2. return {
templateID: base.templateID,
...
createRequest: buildMockCreateRequest(base),
...network,
} as TemplateDetailDto;The 3. ✅ Final verdict
The PR is clean, stable, and all prior review feedback has been incorporated. No new issues found in this pass. | Branch |
Expose environment variables on the template detail page and add DNS, allowOut, and denyOut columns to the network egress table by parsing createRequest fields returned from the template API. Signed-off-by: xiaojunxiang <xiaojunxiang@kingsoft.com>
Use type predicates in env formatting, document trim and null-return semantics, update the network fetch comment, and enrich mock template createRequest data for local dev testing. Signed-off-by: xiaojunxiang <xiaojunxiang@kingsoft.com>
a77eb01 to
0220231
Compare
|
Claude finished @xiaojunxiang2023's task in 45s —— View job ✅ Review: feat(web): show template env and network egress policy in WebUIStatus: This is another re-synchronization of the same branch. The two commits ( 📋 Prior feedback confirmationAll suggestions from the first review remain addressed:
🔍 Verdict after 6th review passNo regressions, no new issues, no content changes since the prior review. The code remains correct, well-structured, and production-ready.
No further review needed unless new commits are added. | Branch |
fslongjin
left a comment
There was a problem hiding this comment.
The template egress policy fields (DNS, Allow Out, Deny Out) should be displayed on the template detail page, not under the Network tab. Here is the reasoning:
-
User intuition: When viewing a template detail page, users naturally expect to see all configuration related to that template — including env vars and network policies. Placing this information on the template detail page aligns with user expectations.
-
Information ownership: DNS, Allow Out, and Deny Out are template-level configurations derived from
createRequest, and are inherently tied to the template itself. They belong at the same level as existing detail fields such as exposed ports and probe path. -
Network page scope: The Network tab serves as a cluster/node-level overview (gateway config, node rate limits, etc.). Embedding per-template egress policy columns here feels disjointed and makes it harder for users to quickly locate a specific template's policy.
Recommendation: Move the DNS / Allow Out / Deny Out display from Network.tsx to TemplateDetail.tsx, placing them alongside the existing environment variables section to form a complete template configuration view.
fslongjin
left a comment
There was a problem hiding this comment.
The code quality is solid, but the placement of the new egress policy fields is not intuitive for end users. DNS, Allow Out, and Deny Out are template-level configurations and should be displayed on the template detail page (TemplateDetail.tsx) rather than the Network tab (Network.tsx). Please relocate these fields to the template detail page alongside the existing environment variables section, then resubmit for review.
Summary
createRequest.containers[0].envstemplateConfighelper to parse runtime and network fields fromcreateRequestChanges
KEY=VALUEenv vars when present increateRequestweb/src/lib/templateConfig.tscentralizescreateRequestparsing for both pagesTest plan
KEY=VALUEcreateRequest