fix(ui): сохранять недоступные шлюзы Filters
This commit is contained in:
1 parent
860e88ed3e
commit
0ab5a23eb3
7 files changed
+149
-30
No files matched your search
@@ -11,3 +11,18 @@ export const filtersResponseSchema = z.object({
|
||||
live: z.boolean().optional(), stale: z.boolean().optional(), error: z.string().optional(),
|
||||
})
|
||||
export const filtersMutationSchema = z.object({ ok: z.literal(true), rules: filterRulesSchema.optional() })
|
||||
|
||||
export const filtersGreResponseSchema = z.object({
|
||||
tunnels: z.array(z.object({
|
||||
id: z.string().min(1), serverId: z.string().min(1), name: z.string(), localAddress: z.string(), remoteAddress: z.string(),
|
||||
localInnerIp: z.string(), remoteInnerIp: z.string(), poolId: z.string(), ipsec: z.null(), mtu: z.number().int().nonnegative(),
|
||||
keepaliveInterval: z.number().int().nonnegative(), keepaliveRetries: z.number().int().nonnegative(),
|
||||
dscp: z.union([z.literal("inherit"), z.number().int().min(0).max(63)]), clampTcpMss: z.boolean(), allowFastPath: z.boolean(),
|
||||
comment: z.string(), enabled: z.boolean(), status: z.enum(["up", "down", "degraded"]),
|
||||
})).refine(rows => new Set(rows.map(r => r.id)).size === rows.length),
|
||||
})
|
||||
export const filtersRecursiveResponseSchema = z.object({
|
||||
routes: z.array(z.object({ id: z.string().min(1), dstAddress: z.string(), gateway: z.string(), distance: z.number().int().nonnegative(), routingTable: z.string(), comment: z.string(), disabled: z.boolean() }))
|
||||
.refine(rows => new Set(rows.map(r => r.id)).size === rows.length),
|
||||
stale: z.boolean().optional(),
|
||||
})
|
||||
Reference in new issue
Block a user