From 285c3a3436a35447ebfa32d01b1a9435ceaa7fca Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Sat, 4 Nov 2023 14:40:41 +0100 Subject: [PATCH] Add static route comment field --- client/src/definitions.ts | 6 +----- src/definitions/network.rs | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/definitions.ts b/client/src/definitions.ts index fa08648..a36ca29 100644 --- a/client/src/definitions.ts +++ b/client/src/definitions.ts @@ -208,17 +208,13 @@ export const editTypes: { [key: string]: { [key: string]: any } } = { 'static_routes': { name: 'Static Route', idType: 'Number', - validationSchema: toFormValidator( - zod.object({ - name: zod.string(), - }), - ), fields: { name: { is: 'TextBox', label: 'Name'}, interface: { is: 'SingleSelect', label: 'Interface', props: { searchProvider: GetInterfaces} }, gatway: { is: 'TextBox', label: 'Gateway'}, destination: { is: 'TextBox', label: 'Destination'}, metric: { is: 'NumberBox', label: 'Metric'}, + comment: { is: 'TextBox', label: 'Comment'}, }, }, }, diff --git a/src/definitions/network.rs b/src/definitions/network.rs index 498b491..883f13d 100644 --- a/src/definitions/network.rs +++ b/src/definitions/network.rs @@ -41,4 +41,5 @@ pub struct StaticRoute { pub gateway: IpAddr, pub destination: IpNet, pub metric: u64, + pub comment: String, }