From 0ad1392632e31a5db9ecf1194176ae1b6239a14c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 11 Nov 2021 22:47:10 +0100 Subject: [PATCH] web/admin: use more natural default ordering for objects Signed-off-by: Jens Langhammer --- web/src/pages/flows/StageBindingForm.ts | 4 ++-- web/src/pages/outposts/OutpostForm.ts | 6 +++--- web/src/pages/outposts/ServiceConnectionDockerForm.ts | 4 ++-- web/src/pages/policies/PolicyBindingForm.ts | 6 +++--- web/src/pages/providers/ldap/LDAPProviderForm.ts | 4 ++-- web/src/pages/providers/oauth2/OAuth2ProviderForm.ts | 4 ++-- web/src/pages/providers/proxy/ProxyProviderForm.ts | 4 ++-- web/src/pages/providers/saml/SAMLProviderForm.ts | 6 +++--- web/src/pages/providers/saml/SAMLProviderImportForm.ts | 2 +- web/src/pages/sources/oauth/OAuthSourceForm.ts | 4 ++-- web/src/pages/sources/plex/PlexSourceForm.ts | 4 ++-- web/src/pages/sources/saml/SAMLSourceForm.ts | 8 ++++---- .../stages/authenticator_duo/AuthenticatorDuoStageForm.ts | 2 +- .../stages/authenticator_sms/AuthenticatorSMSStageForm.ts | 2 +- .../authenticator_static/AuthenticatorStaticStageForm.ts | 2 +- .../authenticator_totp/AuthenticatorTOTPStageForm.ts | 2 +- .../AuthenticatorValidateStageForm.ts | 2 +- .../stages/identification/IdentificationStageForm.ts | 6 +++--- web/src/pages/stages/invitation/InvitationListLink.ts | 2 +- web/src/pages/stages/password/PasswordStageForm.ts | 2 +- web/src/pages/tenants/TenantForm.ts | 8 ++++---- 21 files changed, 42 insertions(+), 42 deletions(-) diff --git a/web/src/pages/flows/StageBindingForm.ts b/web/src/pages/flows/StageBindingForm.ts index 7454849a9..b5d0131a6 100644 --- a/web/src/pages/flows/StageBindingForm.ts +++ b/web/src/pages/flows/StageBindingForm.ts @@ -100,7 +100,7 @@ export class StageBindingForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", }) .then((flows) => { return flows.results.map((flow) => { @@ -124,7 +124,7 @@ export class StageBindingForm extends ModelForm { ${until( new StagesApi(DEFAULT_CONFIG) .stagesAllList({ - ordering: "pk", + ordering: "name", }) .then((stages) => { return this.groupStages(stages.results); diff --git a/web/src/pages/outposts/OutpostForm.ts b/web/src/pages/outposts/OutpostForm.ts index 23a3695af..f5f5f8b80 100644 --- a/web/src/pages/outposts/OutpostForm.ts +++ b/web/src/pages/outposts/OutpostForm.ts @@ -59,7 +59,7 @@ export class OutpostForm extends ModelForm { case OutpostTypeEnum.Proxy: return new ProvidersApi(DEFAULT_CONFIG) .providersProxyList({ - ordering: "pk", + ordering: "name", applicationIsnull: false, }) .then((providers) => { @@ -80,7 +80,7 @@ export class OutpostForm extends ModelForm { case OutpostTypeEnum.Ldap: return new ProvidersApi(DEFAULT_CONFIG) .providersLdapList({ - ordering: "pk", + ordering: "name", applicationIsnull: false, }) .then((providers) => { @@ -141,7 +141,7 @@ export class OutpostForm extends ModelForm { ${until( new OutpostsApi(DEFAULT_CONFIG) .outpostsServiceConnectionsAllList({ - ordering: "pk", + ordering: "name", }) .then((scs) => { return scs.results.map((sc) => { diff --git a/web/src/pages/outposts/ServiceConnectionDockerForm.ts b/web/src/pages/outposts/ServiceConnectionDockerForm.ts index 7f6c5b450..7700c5a81 100644 --- a/web/src/pages/outposts/ServiceConnectionDockerForm.ts +++ b/web/src/pages/outposts/ServiceConnectionDockerForm.ts @@ -86,7 +86,7 @@ export class ServiceConnectionDockerForm extends ModelForm { return certs.results.map((cert) => { @@ -116,7 +116,7 @@ export class ServiceConnectionDockerForm extends ModelForm { return certs.results.map((cert) => { diff --git a/web/src/pages/policies/PolicyBindingForm.ts b/web/src/pages/policies/PolicyBindingForm.ts index 3c69abee6..c2e1184f2 100644 --- a/web/src/pages/policies/PolicyBindingForm.ts +++ b/web/src/pages/policies/PolicyBindingForm.ts @@ -188,7 +188,7 @@ export class PolicyBindingForm extends ModelForm { ${until( new PoliciesApi(DEFAULT_CONFIG) .policiesAllList({ - ordering: "pk", + ordering: "name", }) .then((policies) => { return this.groupPolicies(policies.results); @@ -209,7 +209,7 @@ export class PolicyBindingForm extends ModelForm { ${until( new CoreApi(DEFAULT_CONFIG) .coreGroupsList({ - ordering: "pk", + ordering: "name", }) .then((groups) => { return groups.results.map((group) => { @@ -237,7 +237,7 @@ export class PolicyBindingForm extends ModelForm { ${until( new CoreApi(DEFAULT_CONFIG) .coreUsersList({ - ordering: "pk", + ordering: "name", }) .then((users) => { return users.results.map((user) => { diff --git a/web/src/pages/providers/ldap/LDAPProviderForm.ts b/web/src/pages/providers/ldap/LDAPProviderForm.ts index 7a341a71d..bcac9ea32 100644 --- a/web/src/pages/providers/ldap/LDAPProviderForm.ts +++ b/web/src/pages/providers/ldap/LDAPProviderForm.ts @@ -71,7 +71,7 @@ export class LDAPProviderFormPage extends ModelForm { tenant().then((t) => { return new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authentication, }) .then((flows) => { @@ -161,7 +161,7 @@ export class LDAPProviderFormPage extends ModelForm { ${until( new CryptoApi(DEFAULT_CONFIG) .cryptoCertificatekeypairsList({ - ordering: "pk", + ordering: "name", hasKey: true, }) .then((keys) => { diff --git a/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts b/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts index 871494de8..595acd842 100644 --- a/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts +++ b/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts @@ -80,7 +80,7 @@ export class OAuth2ProviderFormPage extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authorization, }) .then((flows) => { @@ -183,7 +183,7 @@ ${this.instance?.redirectUris} { diff --git a/web/src/pages/providers/proxy/ProxyProviderForm.ts b/web/src/pages/providers/proxy/ProxyProviderForm.ts index f42a7636a..0218ebe02 100644 --- a/web/src/pages/providers/proxy/ProxyProviderForm.ts +++ b/web/src/pages/providers/proxy/ProxyProviderForm.ts @@ -281,7 +281,7 @@ export class ProxyProviderFormPage extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authorization, }) .then((flows) => { @@ -331,7 +331,7 @@ export class ProxyProviderFormPage extends ModelForm { ${until( new CryptoApi(DEFAULT_CONFIG) .cryptoCertificatekeypairsList({ - ordering: "pk", + ordering: "name", hasKey: true, }) .then((keys) => { diff --git a/web/src/pages/providers/saml/SAMLProviderForm.ts b/web/src/pages/providers/saml/SAMLProviderForm.ts index 02671b549..9fbf589fa 100644 --- a/web/src/pages/providers/saml/SAMLProviderForm.ts +++ b/web/src/pages/providers/saml/SAMLProviderForm.ts @@ -70,7 +70,7 @@ export class SAMLProviderFormPage extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authorization, }) .then((flows) => { @@ -154,7 +154,7 @@ export class SAMLProviderFormPage extends ModelForm { ${until( new CryptoApi(DEFAULT_CONFIG) .cryptoCertificatekeypairsList({ - ordering: "pk", + ordering: "name", hasKey: true, }) .then((keys) => { @@ -188,7 +188,7 @@ export class SAMLProviderFormPage extends ModelForm { ${until( new CryptoApi(DEFAULT_CONFIG) .cryptoCertificatekeypairsList({ - ordering: "pk", + ordering: "name", }) .then((keys) => { return keys.results.map((key) => { diff --git a/web/src/pages/providers/saml/SAMLProviderImportForm.ts b/web/src/pages/providers/saml/SAMLProviderImportForm.ts index 9a1175215..a166e090e 100644 --- a/web/src/pages/providers/saml/SAMLProviderImportForm.ts +++ b/web/src/pages/providers/saml/SAMLProviderImportForm.ts @@ -48,7 +48,7 @@ export class SAMLProviderImportForm extends Form { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authorization, }) .then((flows) => { diff --git a/web/src/pages/sources/oauth/OAuthSourceForm.ts b/web/src/pages/sources/oauth/OAuthSourceForm.ts index 861aa880d..517a50c15 100644 --- a/web/src/pages/sources/oauth/OAuthSourceForm.ts +++ b/web/src/pages/sources/oauth/OAuthSourceForm.ts @@ -269,7 +269,7 @@ export class OAuthSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authentication, }) @@ -308,7 +308,7 @@ export class OAuthSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Enrollment, }) .then((flows) => { diff --git a/web/src/pages/sources/plex/PlexSourceForm.ts b/web/src/pages/sources/plex/PlexSourceForm.ts index 99b520ec0..7ee176d43 100644 --- a/web/src/pages/sources/plex/PlexSourceForm.ts +++ b/web/src/pages/sources/plex/PlexSourceForm.ts @@ -246,7 +246,7 @@ export class PlexSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authentication, }) @@ -285,7 +285,7 @@ export class PlexSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Enrollment, }) .then((flows) => { diff --git a/web/src/pages/sources/saml/SAMLSourceForm.ts b/web/src/pages/sources/saml/SAMLSourceForm.ts index cd88afd96..4392899cf 100644 --- a/web/src/pages/sources/saml/SAMLSourceForm.ts +++ b/web/src/pages/sources/saml/SAMLSourceForm.ts @@ -149,7 +149,7 @@ export class SAMLSourceForm extends ModelForm { ${until( new CryptoApi(DEFAULT_CONFIG) .cryptoCertificatekeypairsList({ - ordering: "pk", + ordering: "name", }) .then((keys) => { return keys.results.map((key) => { @@ -341,7 +341,7 @@ export class SAMLSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.StageConfiguration, }) @@ -378,7 +378,7 @@ export class SAMLSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authentication, }) @@ -417,7 +417,7 @@ export class SAMLSourceForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Enrollment, }) .then((flows) => { diff --git a/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts b/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts index 473e2d210..920d2278b 100644 --- a/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts +++ b/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts @@ -107,7 +107,7 @@ export class AuthenticatorDuoStageForm extends ModelForm { return stages.results.map((stage) => { diff --git a/web/src/pages/stages/identification/IdentificationStageForm.ts b/web/src/pages/stages/identification/IdentificationStageForm.ts index b9bbe246d..62333a0fc 100644 --- a/web/src/pages/stages/identification/IdentificationStageForm.ts +++ b/web/src/pages/stages/identification/IdentificationStageForm.ts @@ -112,7 +112,7 @@ export class IdentificationStageForm extends ModelForm { return stages.results.map((stage) => { @@ -228,7 +228,7 @@ export class IdentificationStageForm extends ModelForm { @@ -258,7 +258,7 @@ export class IdentificationStageForm extends ModelForm { diff --git a/web/src/pages/stages/invitation/InvitationListLink.ts b/web/src/pages/stages/invitation/InvitationListLink.ts index 7b7d9cc8c..36254ddd6 100644 --- a/web/src/pages/stages/invitation/InvitationListLink.ts +++ b/web/src/pages/stages/invitation/InvitationListLink.ts @@ -49,7 +49,7 @@ export class InvitationListLink extends LitElement { ${until( new StagesApi(DEFAULT_CONFIG) .stagesInvitationStagesList({ - ordering: "pk", + ordering: "name", noFlows: false, }) .then((stages) => { diff --git a/web/src/pages/stages/password/PasswordStageForm.ts b/web/src/pages/stages/password/PasswordStageForm.ts index 5c78869ec..1578d2c5c 100644 --- a/web/src/pages/stages/password/PasswordStageForm.ts +++ b/web/src/pages/stages/password/PasswordStageForm.ts @@ -128,7 +128,7 @@ export class PasswordStageForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.StageConfiguration, }) diff --git a/web/src/pages/tenants/TenantForm.ts b/web/src/pages/tenants/TenantForm.ts index 42bf8c573..45a3541de 100644 --- a/web/src/pages/tenants/TenantForm.ts +++ b/web/src/pages/tenants/TenantForm.ts @@ -143,7 +143,7 @@ export class TenantForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Authentication, }) @@ -180,7 +180,7 @@ export class TenantForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Invalidation, }) .then((flows) => { @@ -210,7 +210,7 @@ export class TenantForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Recovery, }) .then((flows) => { @@ -246,7 +246,7 @@ export class TenantForm extends ModelForm { ${until( new FlowsApi(DEFAULT_CONFIG) .flowsInstancesList({ - ordering: "pk", + ordering: "slug", designation: FlowsInstancesListDesignationEnum.Unenrollment, }) .then((flows) => {