Support routes.
This commit is contained in:
@@ -41,11 +41,6 @@ const cloudDnsSchema = z.object({
|
||||
ip: ipAddressSchema,
|
||||
});
|
||||
|
||||
// Cloud router configuration schema
|
||||
const cloudRouterSchema = z.object({
|
||||
ip: ipAddressSchema,
|
||||
});
|
||||
|
||||
// Cloud dnsmasq configuration schema
|
||||
const cloudDnsmasqSchema = z.object({
|
||||
interface: interfaceSchema,
|
||||
@@ -57,7 +52,6 @@ const cloudConfigSchema = z.object({
|
||||
internalDomain: domainSchema,
|
||||
dhcpRange: dhcpRangeSchema,
|
||||
dns: cloudDnsSchema,
|
||||
router: cloudRouterSchema,
|
||||
dnsmasq: cloudDnsmasqSchema,
|
||||
});
|
||||
|
||||
@@ -121,12 +115,6 @@ export const configFormSchema = z.object({
|
||||
'Must be a valid IP address'
|
||||
),
|
||||
}),
|
||||
router: z.object({
|
||||
ip: z.string().min(1, 'Router IP is required').refine(
|
||||
(val) => ipAddressSchema.safeParse(val).success,
|
||||
'Must be a valid IP address'
|
||||
),
|
||||
}),
|
||||
dnsmasq: z.object({
|
||||
interface: z.string().min(1, 'Interface is required').refine(
|
||||
(val) => interfaceSchema.safeParse(val).success,
|
||||
@@ -168,9 +156,6 @@ export const defaultConfigValues: ConfigFormData = {
|
||||
dns: {
|
||||
ip: '192.168.8.50',
|
||||
},
|
||||
router: {
|
||||
ip: '192.168.8.1',
|
||||
},
|
||||
dnsmasq: {
|
||||
interface: 'eth0',
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@ export interface Status {
|
||||
// ========================================
|
||||
// Global Config Types (Wild Central level)
|
||||
// Endpoint: /api/v1/config
|
||||
// File: {dataDir}/config.yaml
|
||||
// File: {dataDir}/state.yaml
|
||||
// ========================================
|
||||
|
||||
export interface HAProxyCustomRoute {
|
||||
@@ -25,10 +25,6 @@ export interface GlobalConfig {
|
||||
central?: {
|
||||
domain?: string;
|
||||
};
|
||||
router?: {
|
||||
ip?: string;
|
||||
dynamicDns?: string;
|
||||
};
|
||||
dnsmasq?: {
|
||||
ip?: string;
|
||||
interface?: string;
|
||||
|
||||
Reference in New Issue
Block a user