From c46b2d5573c22a819e06eebd7c2b4642b66779d8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 29 Dec 2022 22:28:54 +0100 Subject: [PATCH] web/admin: finish migration to search-select Signed-off-by: Jens Langhammer --- .../TypeOAuthCodeApplicationWizardPage.ts | 4 +- web/src/admin/blueprints/BlueprintForm.ts | 58 +++-- .../event_matcher/EventMatcherPolicyForm.ts | 45 ++-- .../admin/providers/ldap/LDAPProviderForm.ts | 69 ++++-- .../providers/oauth2/OAuth2ProviderForm.ts | 4 +- .../providers/proxy/ProxyProviderForm.ts | 4 +- .../admin/providers/saml/SAMLProviderForm.ts | 61 ++--- .../providers/saml/SAMLProviderImportForm.ts | 4 +- .../admin/sources/oauth/OAuthSourceForm.ts | 148 +++++------ web/src/admin/sources/plex/PlexSourceForm.ts | 148 +++++------ web/src/admin/sources/saml/SAMLSourceForm.ts | 12 +- .../AuthenticatorDuoStageForm.ts | 4 +- .../AuthenticatorSMSStageForm.ts | 53 ++-- .../AuthenticatorStaticStageForm.ts | 4 +- .../AuthenticatorTOTPStageForm.ts | 4 +- .../AuthenticateWebAuthnStageForm.ts | 4 +- .../identification/IdentificationStageForm.ts | 231 +++++++++--------- .../admin/stages/invitation/InvitationForm.ts | 4 +- .../stages/password/PasswordStageForm.ts | 4 +- web/src/admin/tenants/TenantForm.ts | 24 +- 20 files changed, 475 insertions(+), 414 deletions(-) diff --git a/web/src/admin/applications/wizard/oauth/TypeOAuthCodeApplicationWizardPage.ts b/web/src/admin/applications/wizard/oauth/TypeOAuthCodeApplicationWizardPage.ts index 15ded0e83..9ba7bcf8b 100644 --- a/web/src/admin/applications/wizard/oauth/TypeOAuthCodeApplicationWizardPage.ts +++ b/web/src/admin/applications/wizard/oauth/TypeOAuthCodeApplicationWizardPage.ts @@ -62,8 +62,8 @@ export class TypeOAuthCodeApplicationWizardPage extends WizardFormPage { .renderElement=${(flow: Flow): string => { return flow.name; }} - .renderDescription=${(flow: Flow): string => { - return flow.slug; + .renderDescription=${(flow: Flow): TemplateResult => { + return html`${flow.slug}`; }} .value=${(flow: Flow | undefined): string | undefined => { return flow?.pk; diff --git a/web/src/admin/blueprints/BlueprintForm.ts b/web/src/admin/blueprints/BlueprintForm.ts index 3c9520cdb..867458631 100644 --- a/web/src/admin/blueprints/BlueprintForm.ts +++ b/web/src/admin/blueprints/BlueprintForm.ts @@ -2,6 +2,7 @@ import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { docLink } from "@goauthentik/common/global"; import { first } from "@goauthentik/common/utils"; import "@goauthentik/elements/CodeMirror"; +import "@goauthentik/elements/SearchSelect"; import "@goauthentik/elements/forms/FormGroup"; import "@goauthentik/elements/forms/HorizontalFormElement"; import { ModelForm } from "@goauthentik/elements/forms/ModelForm"; @@ -12,12 +13,11 @@ import { t } from "@lingui/macro"; import { CSSResult, TemplateResult, css, html } from "lit"; import { customElement, state } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; -import { until } from "lit/directives/until.js"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css"; -import { BlueprintInstance, ManagedApi } from "@goauthentik/api"; +import { BlueprintFile, BlueprintInstance, ManagedApi } from "@goauthentik/api"; enum blueprintSource { local, @@ -133,30 +133,36 @@ export class BlueprintForm extends ModelForm {