From 8deced771d498b60ebe13bf66223bdb22d6d618a Mon Sep 17 00:00:00 2001
From: Jens Langhammer
Date: Sat, 14 Jan 2023 15:45:35 +0100
Subject: [PATCH] web/admin: fix broken outpost form
Signed-off-by: Jens Langhammer
---
web/src/admin/outposts/OutpostForm.ts | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/web/src/admin/outposts/OutpostForm.ts b/web/src/admin/outposts/OutpostForm.ts
index 0a3547468..dfe6d73c9 100644
--- a/web/src/admin/outposts/OutpostForm.ts
+++ b/web/src/admin/outposts/OutpostForm.ts
@@ -1,21 +1,21 @@
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { docLink } from "@goauthentik/common/global";
-import { first, groupBy } from "@goauthentik/common/utils";
+import { groupBy } from "@goauthentik/common/utils";
import "@goauthentik/elements/CodeMirror";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
import "@goauthentik/elements/forms/SearchSelect";
+import YAML from "yaml";
import { t } from "@lingui/macro";
import { TemplateResult, html } from "lit";
-import { customElement, property, state } from "lit/decorators.js";
+import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { until } from "lit/directives/until.js";
import {
Outpost,
- OutpostDefaultConfig,
OutpostTypeEnum,
OutpostsApi,
OutpostsServiceConnectionsAllListRequest,
@@ -36,15 +36,9 @@ export class OutpostForm extends ModelForm {
uuid: pk,
});
this.type = o.type || OutpostTypeEnum.Proxy;
- this.defaultConfig = await new OutpostsApi(
- DEFAULT_CONFIG,
- ).outpostsInstancesDefaultSettingsRetrieve();
return o;
}
- @state()
- defaultConfig?: OutpostDefaultConfig;
-
getSuccessMessage(): string {
if (this.instance) {
return t`Successfully updated outpost.`;
@@ -208,9 +202,20 @@ export class OutpostForm extends ModelForm {
+
${t`Set custom attributes using YAML or JSON.`}