feat(networks): add name field to networks

- Migration 0007: ALTER TABLE networks ADD COLUMN name TEXT NOT NULL DEFAULT ''
- Network model, repository, and API updated to include name
- Networks page: name input in the add form, Name column as first column in table
- Delete modal now shows "Name (CIDR)" for clarity
- Hosts page: network dropdowns now show network name instead of CIDR
- Seeds updated with names (LAN, DMZ, Corporate, VPN)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 01:38:40 +02:00
parent e17b8ee722
commit d9ee121fbb
9 changed files with 55 additions and 78 deletions

View File

@@ -74,7 +74,7 @@ fn AddHostModal(
{move || networks_res.get()
.and_then(|r| r.ok())
.map(|nets| nets.into_iter().map(|n| {
view! { <option value=n.id.to_string()>{n.cidr}</option> }
view! { <option value=n.id.to_string()>{n.name}</option> }
}).collect_view())
}
</select>
@@ -137,7 +137,7 @@ fn FilterBar(
{move || networks_res.get()
.and_then(|r| r.ok())
.map(|nets| nets.into_iter().map(|n| {
view! { <option value=n.id.to_string()>{n.cidr}</option> }
view! { <option value=n.id.to_string()>{n.name}</option> }
}).collect_view())
}
</select>