web/admin: use flow slug as main name for flow dropdown

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-12-29 22:53:15 +01:00
parent c46b2d5573
commit 6a44695c48
No known key found for this signature in database
17 changed files with 56 additions and 57 deletions

View File

@ -60,10 +60,10 @@ export class TypeOAuthCodeApplicationWizardPage extends WizardFormPage {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -95,10 +95,10 @@ export class OAuth2ProviderFormPage extends ModelForm<OAuth2Provider, number> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -311,10 +311,10 @@ export class ProxyProviderFormPage extends ModelForm<ProxyProvider, number> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -87,10 +87,10 @@ export class SAMLProviderFormPage extends ModelForm<SAMLProvider, number> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -60,10 +60,10 @@ export class SAMLProviderImportForm extends Form<SAMLProvider> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -417,10 +417,10 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -463,10 +463,10 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -346,10 +346,10 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -392,10 +392,10 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -496,10 +496,10 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -540,10 +540,10 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -586,10 +586,10 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -146,10 +146,10 @@ export class AuthenticatorDuoStageForm extends ModelForm<AuthenticatorDuoStage,
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -10,7 +10,6 @@ import { t } from "@lingui/macro";
import { TemplateResult, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { until } from "lit/directives/until.js";
import {
AuthTypeEnum,
@ -286,10 +285,10 @@ export class AuthenticatorSMSStageForm extends ModelForm<AuthenticatorSMSStage,
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -93,10 +93,10 @@ export class AuthenticatorStaticStageForm extends ModelForm<AuthenticatorStaticS
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -98,10 +98,10 @@ export class AuthenticatorTOTPStageForm extends ModelForm<AuthenticatorTOTPStage
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -172,10 +172,10 @@ export class AuthenticateWebAuthnStageForm extends ModelForm<AuthenticateWebAuth
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -247,10 +247,10 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -281,10 +281,10 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -315,10 +315,10 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -88,10 +88,10 @@ export class InvitationForm extends ModelForm<Invitation, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -136,10 +136,10 @@ export class PasswordStageForm extends ModelForm<PasswordStage, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;

View File

@ -160,10 +160,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -197,10 +197,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -232,10 +232,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -269,10 +269,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -307,10 +307,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;
@ -342,10 +342,10 @@ export class TenantForm extends ModelForm<Tenant, string> {
return flows.results;
}}
.renderElement=${(flow: Flow): string => {
return flow.name;
return flow.slug;
}}
.renderDescription=${(flow: Flow): TemplateResult => {
return html`${flow.slug}`;
return html`${flow.name}`;
}}
.value=${(flow: Flow | undefined): string | undefined => {
return flow?.pk;