From 29e9a0b9b809ec5a1aa3d3ca6670cb79caaf29ff Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Mon, 24 Apr 2023 21:58:06 +0200 Subject: [PATCH] Add DNs Server Frontend --- client/src/App.vue | 2 + client/src/definitions.ts | 15 ++++++++ client/src/pages/service/DNSServers.vue | 51 +++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 client/src/pages/service/DNSServers.vue diff --git a/client/src/App.vue b/client/src/App.vue index cacbc08..94dd394 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -11,6 +11,7 @@ import ISNAT from '~icons/mdi/arrow-expand-right'; import IDNAT from '~icons/mdi/arrow-collapse-right'; import IConfig from '~icons/grommet-icons/document-config'; import IStaticRoutes from '~icons/material-symbols/drive-folder-upload-outline-sharp'; +import IDNSServer from '~icons/carbon/server-dns'; import ITimeServer from '~icons/carbon/server-time'; enum NavState { Open, Reduced, Collapsed }; @@ -26,6 +27,7 @@ const navRoutes = { "/object/addresses": { icon: IAddress, caption: "Addresses" }, "/object/services": { icon: IService, caption: "Services" }, "/service/dhcpv4servers": { icon: IService, caption: "DHCP v4" }, + "/service/dnsservers": { icon: IDNSServer, caption: "DNS Server" }, "/service/ntpservers": { icon: ITimeServer, caption: "NTP Server" }, "/config/config": { icon: IConfig, caption: "Config" }, }; diff --git a/client/src/definitions.ts b/client/src/definitions.ts index a02d27e..8c532ea 100644 --- a/client/src/definitions.ts +++ b/client/src/definitions.ts @@ -192,5 +192,20 @@ export const editTypes: { [key: string]: { [key: string]: any } } = { }, ], }, + "dnsservers": { + name: "DNSServer", + validationSchema: toFormValidator( + zod.object({ + }), + ), + sections: [ + { + fields: [ + { key: "interface", label: "Interface", as: "SingleSelect", props: { searchProvider: GetInterfaces } }, + { key: "comment", label: "Comment", as: "MultilineTextBox" }, + ], + }, + ], + }, }, }; \ No newline at end of file diff --git a/client/src/pages/service/DNSServers.vue b/client/src/pages/service/DNSServers.vue new file mode 100644 index 0000000..2b42bd6 --- /dev/null +++ b/client/src/pages/service/DNSServers.vue @@ -0,0 +1,51 @@ + + + \ No newline at end of file