feat: configure support for generic integrations

Co-authored-by: Gage Orsburn <gageorsburn@live.com>
This commit is contained in:
Aarnav Tale 2024-05-26 19:23:24 -04:00
parent 1a30185047
commit f0e4868252
No known key found for this signature in database
10 changed files with 289 additions and 148 deletions

View file

@ -9,7 +9,6 @@ import Link from '~/components/Link'
import Notice from '~/components/Notice'
import { cn } from '~/utils/cn'
import { loadAcl, loadContext, patchAcl } from '~/utils/config/headplane'
import { sighupHeadscale } from '~/utils/docker'
import { getSession } from '~/utils/sessions'
import Editor from './editor'
@ -47,8 +46,8 @@ export async function action({ request }: ActionFunctionArgs) {
const data = await request.json() as { acl: string }
await patchAcl(data.acl)
if (context.docker) {
await sighupHeadscale()
if (context.integration?.sighup) {
await context.integration.sighup()
}
return json({ success: true })