Skip to content

feat: 添加 U-Boot 网络模式配置(DHCP/静态IP)#101

Merged
ZR233 merged 2 commits into
mainfrom
feat-uboot-network-mode
May 14, 2026
Merged

feat: 添加 U-Boot 网络模式配置(DHCP/静态IP)#101
ZR233 merged 2 commits into
mainfrom
feat-uboot-network-mode

Conversation

@ZR233
Copy link
Copy Markdown
Member

@ZR233 ZR233 commented May 14, 2026

Summary

  • 引入 UbootNetworkMode 枚举,支持 DHCP 和静态 IP 两种网络配置模式
  • 扩展 BoardConfig / UbootProfile,新增 board_ipserver_ipnetmaskgatewayip 等网络字段
  • 实现静态 IP 配置的校验逻辑,确保必填字段完整且 IP 格式合法
  • 更新 API 路由和请求处理,支持新增网络参数的序列化/反序列化与归一化
  • 前端 BoardEditorView 新增网络模式选择和静态 IP 输入表单
  • 添加 Playwright 测试依赖并优化全局样式

Test plan

  • 验证 DHCP 模式下网络字段被正确清空
  • 验证静态 IP 模式下必填校验(board_ip、server_ip)和格式校验
  • 验证 use_tftp=false 时自动切换为 DHCP
  • 验证前端网络模式切换交互和表单联动
  • 运行 cargo test 确认后端测试通过

🤖 Generated with Claude Code

ZR233 added 2 commits May 14, 2026 12:25
- Introduced UbootNetworkMode enum to handle DHCP and static IP configurations.
- Enhanced BoardConfig and UbootProfile structs to include network-related fields (board_ip, server_ip, netmask, gatewayip).
- Implemented validation logic for UbootProfile to ensure proper configuration of static IP settings.
- Updated boot configuration normalization to handle new network fields and set defaults.
- Modified API responses and request handling to accommodate new network parameters.
- Added tests to validate static IP configurations and ensure proper error handling for invalid inputs.
- Updated frontend components to support new network mode options and input fields.
@ZR233 ZR233 merged commit 78ac8be into main May 14, 2026
2 checks passed
@ZR233 ZR233 deleted the feat-uboot-network-mode branch May 14, 2026 05:26
@github-actions github-actions Bot mentioned this pull request May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant