feat(networks): add delete confirmation modal with host count warning
Show a modal before deleting a network. If the network has hosts, display a warning with the exact count since they will be cascade-deleted. Host count comes from the existing NetworkWithCounts data (no extra query). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::models::Network;
|
||||
// Network row augmented with pre-computed counts.
|
||||
// Defined here (not in models.rs) because it is a presentation model
|
||||
// specific to the Networks page, not a pure domain entity.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct NetworkWithCounts {
|
||||
pub id: i64,
|
||||
pub cidr: String,
|
||||
|
||||
Reference in New Issue
Block a user