web: pass 2 migration
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		@ -104,7 +104,7 @@ export class ApplicationListPage extends TablePage<Application> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Application`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreApplicationsDelete({
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreApplicationsDestroy({
 | 
			
		||||
                        slug: item.slug || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -80,7 +80,7 @@ export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Certificate-Key Pair`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsDelete({
 | 
			
		||||
                    return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsDestroy({
 | 
			
		||||
                        kpUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -74,7 +74,7 @@ export class RuleListPage extends TablePage<NotificationRule> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Notification rule`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new EventsApi(DEFAULT_CONFIG).eventsRulesDelete({
 | 
			
		||||
                    return new EventsApi(DEFAULT_CONFIG).eventsRulesDestroy({
 | 
			
		||||
                        pbmUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@ export class TransportListPage extends TablePage<NotificationTransport> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Notifications Transport`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new EventsApi(DEFAULT_CONFIG).eventsTransportsDelete({
 | 
			
		||||
                    return new EventsApi(DEFAULT_CONFIG).eventsTransportsDestroy({
 | 
			
		||||
                        uuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -83,7 +83,7 @@ export class BoundStagesList extends Table<FlowStageBinding> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Stage binding`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new FlowsApi(DEFAULT_CONFIG).flowsBindingsDelete({
 | 
			
		||||
                    return new FlowsApi(DEFAULT_CONFIG).flowsBindingsDestroy({
 | 
			
		||||
                        fsbUuid: item.pk || "",
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@ export class FlowListPage extends TablePage<Flow> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Flow`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new FlowsApi(DEFAULT_CONFIG).flowsInstancesDelete({
 | 
			
		||||
                    return new FlowsApi(DEFAULT_CONFIG).flowsInstancesDestroy({
 | 
			
		||||
                        slug: item.slug
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -73,7 +73,7 @@ export class GroupListPage extends TablePage<Group> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Group`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreGroupsDelete({
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreGroupsDestroy({
 | 
			
		||||
                        groupUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -76,7 +76,7 @@ export class OutpostListPage extends TablePage<Outpost> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Outpost`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new OutpostsApi(DEFAULT_CONFIG).outpostsOutpostsDelete({
 | 
			
		||||
                    return new OutpostsApi(DEFAULT_CONFIG).outpostsOutpostsDestroy({
 | 
			
		||||
                        uuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -94,7 +94,7 @@ export class OutpostServiceConnectionListPage extends TablePage<ServiceConnectio
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Outpost Service-connection`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsAllDelete({
 | 
			
		||||
                    return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsAllDestroy({
 | 
			
		||||
                        uuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,7 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Policy binding`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsDelete({
 | 
			
		||||
                    return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsDestroy({
 | 
			
		||||
                        policyBindingUuid: item.pk || "",
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -107,7 +107,7 @@ export class PolicyListPage extends TablePage<Policy> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Policy`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new PoliciesApi(DEFAULT_CONFIG).policiesAllDelete({
 | 
			
		||||
                    return new PoliciesApi(DEFAULT_CONFIG).policiesAllDestroy({
 | 
			
		||||
                        policyUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -98,7 +98,7 @@ export class PropertyMappingListPage extends TablePage<PropertyMapping> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Property Mapping`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsAllDelete({
 | 
			
		||||
                    return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsAllDestroy({
 | 
			
		||||
                        pmUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -91,7 +91,7 @@ export class ProviderListPage extends TablePage<Provider> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Provider`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new ProvidersApi(DEFAULT_CONFIG).providersAllDelete({
 | 
			
		||||
                    return new ProvidersApi(DEFAULT_CONFIG).providersAllDestroy({
 | 
			
		||||
                        id: item.pk || 0
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -87,7 +87,7 @@ export class SourceListPage extends TablePage<Source> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Source`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new SourcesApi(DEFAULT_CONFIG).sourcesAllDelete({
 | 
			
		||||
                    return new SourcesApi(DEFAULT_CONFIG).sourcesAllDestroy({
 | 
			
		||||
                        slug: item.slug || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -102,7 +102,7 @@ export class StageListPage extends TablePage<Stage> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${item.verboseName || ""}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesAllDelete({
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesAllDestroy({
 | 
			
		||||
                        stageUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ export class InvitationListPage extends TablePage<Invitation> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Prompt`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsDelete({
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsDestroy({
 | 
			
		||||
                        inviteUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@ export class PromptListPage extends TablePage<Prompt> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Prompt`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsDelete({
 | 
			
		||||
                    return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsDestroy({
 | 
			
		||||
                        promptUuid: item.pk || ""
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ export class TokenListPage extends TablePage<Token> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Token`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreTokensDelete({
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreTokensDestroy({
 | 
			
		||||
                        identifier: item.identifier
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ export class SourceSettingsOAuth extends BaseUserSettings {
 | 
			
		||||
                return html`<p>${t`Connected.`}</p>
 | 
			
		||||
                <button class="pf-c-button pf-m-danger"
 | 
			
		||||
                    @click=${() => {
 | 
			
		||||
                        return new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsDelete({
 | 
			
		||||
                        return new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsDestroy({
 | 
			
		||||
                            id: connection.results[0].pk || 0
 | 
			
		||||
                        });
 | 
			
		||||
                    }}>
 | 
			
		||||
 | 
			
		||||
@ -28,7 +28,7 @@ export class UserSettingsAuthenticatorStatic extends BaseUserSettings {
 | 
			
		||||
                                return;
 | 
			
		||||
                            }
 | 
			
		||||
                            // TODO: Handle multiple devices, currently we assume only one TOTP Device
 | 
			
		||||
                            return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsTotpDelete({
 | 
			
		||||
                            return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsTotpDestroy({
 | 
			
		||||
                                id: devices.results[0].pk || 0
 | 
			
		||||
                            });
 | 
			
		||||
                        });
 | 
			
		||||
 | 
			
		||||
@ -43,7 +43,7 @@ export class UserSettingsAuthenticatorTOTP extends BaseUserSettings {
 | 
			
		||||
                                return;
 | 
			
		||||
                            }
 | 
			
		||||
                            // TODO: Handle multiple devices, currently we assume only one TOTP Device
 | 
			
		||||
                            return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsStaticDelete({
 | 
			
		||||
                            return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsStaticDestroy({
 | 
			
		||||
                                id: devices.results[0].pk || 0
 | 
			
		||||
                            });
 | 
			
		||||
                        });
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
 | 
			
		||||
            .obj=${device}
 | 
			
		||||
            objectLabel=${t`Authenticator`}
 | 
			
		||||
            .delete=${() => {
 | 
			
		||||
                return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDelete({
 | 
			
		||||
                return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDestroy({
 | 
			
		||||
                    id: device.pk || 0
 | 
			
		||||
                });
 | 
			
		||||
            }}>
 | 
			
		||||
 | 
			
		||||
@ -120,7 +120,7 @@ export class UserTokenList extends Table<Token> {
 | 
			
		||||
                .obj=${item}
 | 
			
		||||
                objectLabel=${t`Token`}
 | 
			
		||||
                .delete=${() => {
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreTokensDelete({
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreTokensDestroy({
 | 
			
		||||
                        identifier: item.identifier
 | 
			
		||||
                    });
 | 
			
		||||
                }}>
 | 
			
		||||
 | 
			
		||||
@ -31,11 +31,11 @@ export class UserForm extends ModelForm<User, number> {
 | 
			
		||||
        if (this.instance) {
 | 
			
		||||
            return new CoreApi(DEFAULT_CONFIG).coreUsersUpdate({
 | 
			
		||||
                id: this.instance.pk || 0,
 | 
			
		||||
                data: data
 | 
			
		||||
                userRequest: data
 | 
			
		||||
            });
 | 
			
		||||
        } else {
 | 
			
		||||
            return new CoreApi(DEFAULT_CONFIG).coreUsersCreate({
 | 
			
		||||
                data: data
 | 
			
		||||
                userRequest: data
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -94,7 +94,7 @@ export class UserListPage extends TablePage<User> {
 | 
			
		||||
                            .delete=${() => {
 | 
			
		||||
                                return new CoreApi(DEFAULT_CONFIG).coreUsersPartialUpdate({
 | 
			
		||||
                                    id: item.pk || 0,
 | 
			
		||||
                                    data: {
 | 
			
		||||
                                    patchedUserRequest: {
 | 
			
		||||
                                        username: item.username,
 | 
			
		||||
                                        name: item.name,
 | 
			
		||||
                                        isActive: !item.isActive,
 | 
			
		||||
@ -112,7 +112,7 @@ export class UserListPage extends TablePage<User> {
 | 
			
		||||
                            .obj=${item}
 | 
			
		||||
                            objectLabel=${t`User`}
 | 
			
		||||
                            .delete=${() => {
 | 
			
		||||
                                return new CoreApi(DEFAULT_CONFIG).coreUsersDelete({
 | 
			
		||||
                                return new CoreApi(DEFAULT_CONFIG).coreUsersDestroy({
 | 
			
		||||
                                    id: item.pk || 0
 | 
			
		||||
                                });
 | 
			
		||||
                            }}>
 | 
			
		||||
@ -125,7 +125,7 @@ export class UserListPage extends TablePage<User> {
 | 
			
		||||
            </ak-dropdown>
 | 
			
		||||
            <ak-action-button
 | 
			
		||||
                .apiRequest=${() => {
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreUsersRecovery({
 | 
			
		||||
                    return new CoreApi(DEFAULT_CONFIG).coreUsersRecoveryRetrieve({
 | 
			
		||||
                        id: item.pk || 0,
 | 
			
		||||
                    }).then(rec => {
 | 
			
		||||
                        showMessage({
 | 
			
		||||
 | 
			
		||||
@ -154,7 +154,7 @@ export class UserViewPage extends LitElement {
 | 
			
		||||
                            <div class="pf-c-card__footer">
 | 
			
		||||
                                <ak-action-button
 | 
			
		||||
                                    .apiRequest=${() => {
 | 
			
		||||
                                        return new CoreApi(DEFAULT_CONFIG).coreUsersRecovery({
 | 
			
		||||
                                        return new CoreApi(DEFAULT_CONFIG).coreUsersRecoveryRetrieve({
 | 
			
		||||
                                            id: this.user?.pk || 0,
 | 
			
		||||
                                        }).then(rec => {
 | 
			
		||||
                                            showMessage({
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user