Add static route comment field

This commit is contained in:
Samuel Lorch 2023-11-04 14:40:41 +01:00
parent 75322d4ece
commit 285c3a3436
2 changed files with 2 additions and 5 deletions

View file

@ -208,17 +208,13 @@ export const editTypes: { [key: string]: { [key: string]: any } } = {
'static_routes': { 'static_routes': {
name: 'Static Route', name: 'Static Route',
idType: 'Number', idType: 'Number',
validationSchema: toFormValidator(
zod.object({
name: zod.string(),
}),
),
fields: { fields: {
name: { is: 'TextBox', label: 'Name'}, name: { is: 'TextBox', label: 'Name'},
interface: { is: 'SingleSelect', label: 'Interface', props: { searchProvider: GetInterfaces} }, interface: { is: 'SingleSelect', label: 'Interface', props: { searchProvider: GetInterfaces} },
gatway: { is: 'TextBox', label: 'Gateway'}, gatway: { is: 'TextBox', label: 'Gateway'},
destination: { is: 'TextBox', label: 'Destination'}, destination: { is: 'TextBox', label: 'Destination'},
metric: { is: 'NumberBox', label: 'Metric'}, metric: { is: 'NumberBox', label: 'Metric'},
comment: { is: 'TextBox', label: 'Comment'},
}, },
}, },
}, },

View file

@ -41,4 +41,5 @@ pub struct StaticRoute {
pub gateway: IpAddr, pub gateway: IpAddr,
pub destination: IpNet, pub destination: IpNet,
pub metric: u64, pub metric: u64,
pub comment: String,
} }