web/admin: use more natural default ordering for objects

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-11 22:47:10 +01:00
parent 6db1c914ee
commit 0ad1392632
21 changed files with 42 additions and 42 deletions

View file

@ -100,7 +100,7 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
${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<FlowStageBinding, string> {
${until(
new StagesApi(DEFAULT_CONFIG)
.stagesAllList({
ordering: "pk",
ordering: "name",
})
.then((stages) => {
return this.groupStages(stages.results);

View file

@ -59,7 +59,7 @@ export class OutpostForm extends ModelForm<Outpost, string> {
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<Outpost, string> {
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<Outpost, string> {
${until(
new OutpostsApi(DEFAULT_CONFIG)
.outpostsServiceConnectionsAllList({
ordering: "pk",
ordering: "name",
})
.then((scs) => {
return scs.results.map((sc) => {

View file

@ -86,7 +86,7 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
})
.then((certs) => {
return certs.results.map((cert) => {
@ -116,7 +116,7 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
})
.then((certs) => {
return certs.results.map((cert) => {

View file

@ -188,7 +188,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
${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<PolicyBinding, string> {
${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<PolicyBinding, string> {
${until(
new CoreApi(DEFAULT_CONFIG)
.coreUsersList({
ordering: "pk",
ordering: "name",
})
.then((users) => {
return users.results.map((user) => {

View file

@ -71,7 +71,7 @@ export class LDAPProviderFormPage extends ModelForm<LDAPProvider, number> {
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<LDAPProvider, number> {
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
hasKey: true,
})
.then((keys) => {

View file

@ -80,7 +80,7 @@ export class OAuth2ProviderFormPage extends ModelForm<OAuth2Provider, number> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Authorization,
})
.then((flows) => {
@ -183,7 +183,7 @@ ${this.instance?.redirectUris}</textarea
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
hasKey: true,
})
.then((keys) => {

View file

@ -281,7 +281,7 @@ export class ProxyProviderFormPage extends ModelForm<ProxyProvider, number> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Authorization,
})
.then((flows) => {
@ -331,7 +331,7 @@ export class ProxyProviderFormPage extends ModelForm<ProxyProvider, number> {
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
hasKey: true,
})
.then((keys) => {

View file

@ -70,7 +70,7 @@ export class SAMLProviderFormPage extends ModelForm<SAMLProvider, number> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Authorization,
})
.then((flows) => {
@ -154,7 +154,7 @@ export class SAMLProviderFormPage extends ModelForm<SAMLProvider, number> {
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
hasKey: true,
})
.then((keys) => {
@ -188,7 +188,7 @@ export class SAMLProviderFormPage extends ModelForm<SAMLProvider, number> {
${until(
new CryptoApi(DEFAULT_CONFIG)
.cryptoCertificatekeypairsList({
ordering: "pk",
ordering: "name",
})
.then((keys) => {
return keys.results.map((key) => {

View file

@ -48,7 +48,7 @@ export class SAMLProviderImportForm extends Form<SAMLProvider> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Authorization,
})
.then((flows) => {

View file

@ -269,7 +269,7 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.Authentication,
})
@ -308,7 +308,7 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Enrollment,
})
.then((flows) => {

View file

@ -246,7 +246,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.Authentication,
})
@ -285,7 +285,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Enrollment,
})
.then((flows) => {

View file

@ -149,7 +149,7 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
${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<SAMLSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})
@ -378,7 +378,7 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.Authentication,
})
@ -417,7 +417,7 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Enrollment,
})
.then((flows) => {

View file

@ -107,7 +107,7 @@ export class AuthenticatorDuoStageForm extends ModelForm<AuthenticatorDuoStage,
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})

View file

@ -235,7 +235,7 @@ export class AuthenticatorSMSStageForm extends ModelForm<AuthenticatorSMSStage,
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})

View file

@ -86,7 +86,7 @@ export class AuthenticatorStaticStageForm extends ModelForm<AuthenticatorStaticS
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})

View file

@ -90,7 +90,7 @@ export class AuthenticatorTOTPStageForm extends ModelForm<AuthenticatorTOTPStage
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})

View file

@ -183,7 +183,7 @@ export class AuthenticatorValidateStageForm extends ModelForm<AuthenticatorValid
${until(
new StagesApi(DEFAULT_CONFIG)
.stagesAllList({
ordering: "pk",
ordering: "name",
})
.then((stages) => {
return stages.results.map((stage) => {

View file

@ -112,7 +112,7 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
${until(
new StagesApi(DEFAULT_CONFIG)
.stagesPasswordList({
ordering: "pk",
ordering: "name",
})
.then((stages) => {
return stages.results.map((stage) => {
@ -228,7 +228,7 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Enrollment,
})
.then((flows) => {
@ -258,7 +258,7 @@ export class IdentificationStageForm extends ModelForm<IdentificationStage, stri
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Recovery,
})
.then((flows) => {

View file

@ -49,7 +49,7 @@ export class InvitationListLink extends LitElement {
${until(
new StagesApi(DEFAULT_CONFIG)
.stagesInvitationStagesList({
ordering: "pk",
ordering: "name",
noFlows: false,
})
.then((stages) => {

View file

@ -128,7 +128,7 @@ export class PasswordStageForm extends ModelForm<PasswordStage, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.StageConfiguration,
})

View file

@ -143,7 +143,7 @@ export class TenantForm extends ModelForm<Tenant, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation:
FlowsInstancesListDesignationEnum.Authentication,
})
@ -180,7 +180,7 @@ export class TenantForm extends ModelForm<Tenant, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Invalidation,
})
.then((flows) => {
@ -210,7 +210,7 @@ export class TenantForm extends ModelForm<Tenant, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Recovery,
})
.then((flows) => {
@ -246,7 +246,7 @@ export class TenantForm extends ModelForm<Tenant, string> {
${until(
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesList({
ordering: "pk",
ordering: "slug",
designation: FlowsInstancesListDesignationEnum.Unenrollment,
})
.then((flows) => {