feat: allow interfaces to have no zone (shorewall '-' zone)
This commit is contained in:
@@ -83,13 +83,13 @@ export default function ConfigDetail() {
|
||||
{
|
||||
key: 'zone_id' as const,
|
||||
label: 'Zone',
|
||||
render: (r: AnyEntity) => zones.find((z) => z.id === r['zone_id'])?.name ?? String(r['zone_id']),
|
||||
render: (r: AnyEntity) => r['zone_id'] == null ? '-' : (zones.find((z) => z.id === r['zone_id'])?.name ?? String(r['zone_id'])),
|
||||
},
|
||||
{ key: 'options' as const, label: 'Options' },
|
||||
] as Column<AnyEntity>[],
|
||||
fields: [
|
||||
{ name: 'name', label: 'Interface Name', required: true },
|
||||
{ name: 'zone_id', label: 'Zone', required: true, type: 'select' as const, options: zoneOptions },
|
||||
{ name: 'zone_id', label: 'Zone', type: 'select' as const, options: [{ value: '', label: '- (no zone)' }, ...zoneOptions] },
|
||||
{ name: 'options', label: 'Options' },
|
||||
] as FieldDef[],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user