{r.target_addr}{r.target_port_start ? `:${r.target_port_start}${r.target_port_end !== r.target_port_start ? `-${r.target_port_end}` : ''}` : ''}
}
+ const openEdit = (row: NATRule) => {
+ setEditing(row)
+ form.setFieldsValue({
+ name: row.name ?? undefined,
+ priority: row.priority, enabled: row.enabled, kind: row.kind,
+ in_zone: row.in_zone ?? undefined, out_zone: row.out_zone ?? undefined,
+ proto: row.proto ?? undefined,
+ match_src_cidr: row.match_src_cidr ?? undefined,
+ match_dst_cidr: row.match_dst_cidr ?? undefined,
+ match_dport_start: row.match_dport_start ?? undefined,
+ match_dport_end: row.match_dport_end ?? undefined,
+ target_addr: row.target_addr ?? undefined,
+ target_port_start: row.target_port_start ?? undefined,
+ target_port_end: row.target_port_end ?? undefined,
+ comment: row.comment ?? undefined,
+ })
+ }
+
const columns: ColumnsTypesrc={r.match_src_cidr}}
- {r.match_dst_cidr && dst={r.match_dst_cidr}}
- {r.match_dport_start && dport={r.match_dport_start}{r.match_dport_end && r.match_dport_end !== r.match_dport_start ? `-${r.match_dport_end}` : ''}}
+