web: pass 2 migration

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-16 17:53:59 +02:00
parent 1f05484e3c
commit dde1dabf97
29 changed files with 32 additions and 32 deletions

View File

@ -45,7 +45,7 @@ export class UserOAuthCodeList extends Table<ExpiringBaseGrantModel> {
.obj=${item} .obj=${item}
objectLabel=${t`Authorization Code`} objectLabel=${t`Authorization Code`}
.delete=${() => { .delete=${() => {
return new Oauth2Api(DEFAULT_CONFIG).oauth2AuthorizationCodesDelete({ return new Oauth2Api(DEFAULT_CONFIG).oauth2AuthorizationCodesDestroy({
id: item.pk || 0, id: item.pk || 0,
}); });
}}> }}>

View File

@ -45,7 +45,7 @@ export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
.obj=${item} .obj=${item}
objectLabel=${t`Refresh Code`} objectLabel=${t`Refresh Code`}
.delete=${() => { .delete=${() => {
return new Oauth2Api(DEFAULT_CONFIG).oauth2RefreshTokensDelete({ return new Oauth2Api(DEFAULT_CONFIG).oauth2RefreshTokensDestroy({
id: item.pk || 0, id: item.pk || 0,
}); });
}}> }}>

View File

@ -41,7 +41,7 @@ export class UserConsentList extends Table<UserConsent> {
.obj=${item} .obj=${item}
objectLabel=${t`Consent`} objectLabel=${t`Consent`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUserConsentDelete({ return new CoreApi(DEFAULT_CONFIG).coreUserConsentDestroy({
id: item.pk || 0, id: item.pk || 0,
}); });
}}> }}>

View File

@ -104,7 +104,7 @@ export class ApplicationListPage extends TablePage<Application> {
.obj=${item} .obj=${item}
objectLabel=${t`Application`} objectLabel=${t`Application`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreApplicationsDelete({ return new CoreApi(DEFAULT_CONFIG).coreApplicationsDestroy({
slug: item.slug || "" slug: item.slug || ""
}); });
}}> }}>

View File

@ -80,7 +80,7 @@ export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
.obj=${item} .obj=${item}
objectLabel=${t`Certificate-Key Pair`} objectLabel=${t`Certificate-Key Pair`}
.delete=${() => { .delete=${() => {
return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsDelete({ return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsDestroy({
kpUuid: item.pk || "" kpUuid: item.pk || ""
}); });
}}> }}>

View File

@ -74,7 +74,7 @@ export class RuleListPage extends TablePage<NotificationRule> {
.obj=${item} .obj=${item}
objectLabel=${t`Notification rule`} objectLabel=${t`Notification rule`}
.delete=${() => { .delete=${() => {
return new EventsApi(DEFAULT_CONFIG).eventsRulesDelete({ return new EventsApi(DEFAULT_CONFIG).eventsRulesDestroy({
pbmUuid: item.pk || "" pbmUuid: item.pk || ""
}); });
}}> }}>

View File

@ -78,7 +78,7 @@ export class TransportListPage extends TablePage<NotificationTransport> {
.obj=${item} .obj=${item}
objectLabel=${t`Notifications Transport`} objectLabel=${t`Notifications Transport`}
.delete=${() => { .delete=${() => {
return new EventsApi(DEFAULT_CONFIG).eventsTransportsDelete({ return new EventsApi(DEFAULT_CONFIG).eventsTransportsDestroy({
uuid: item.pk || "" uuid: item.pk || ""
}); });
}}> }}>

View File

@ -83,7 +83,7 @@ export class BoundStagesList extends Table<FlowStageBinding> {
.obj=${item} .obj=${item}
objectLabel=${t`Stage binding`} objectLabel=${t`Stage binding`}
.delete=${() => { .delete=${() => {
return new FlowsApi(DEFAULT_CONFIG).flowsBindingsDelete({ return new FlowsApi(DEFAULT_CONFIG).flowsBindingsDestroy({
fsbUuid: item.pk || "", fsbUuid: item.pk || "",
}); });
}}> }}>

View File

@ -78,7 +78,7 @@ export class FlowListPage extends TablePage<Flow> {
.obj=${item} .obj=${item}
objectLabel=${t`Flow`} objectLabel=${t`Flow`}
.delete=${() => { .delete=${() => {
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesDelete({ return new FlowsApi(DEFAULT_CONFIG).flowsInstancesDestroy({
slug: item.slug slug: item.slug
}); });
}}> }}>

View File

@ -73,7 +73,7 @@ export class GroupListPage extends TablePage<Group> {
.obj=${item} .obj=${item}
objectLabel=${t`Group`} objectLabel=${t`Group`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreGroupsDelete({ return new CoreApi(DEFAULT_CONFIG).coreGroupsDestroy({
groupUuid: item.pk || "" groupUuid: item.pk || ""
}); });
}}> }}>

View File

@ -76,7 +76,7 @@ export class OutpostListPage extends TablePage<Outpost> {
.obj=${item} .obj=${item}
objectLabel=${t`Outpost`} objectLabel=${t`Outpost`}
.delete=${() => { .delete=${() => {
return new OutpostsApi(DEFAULT_CONFIG).outpostsOutpostsDelete({ return new OutpostsApi(DEFAULT_CONFIG).outpostsOutpostsDestroy({
uuid: item.pk || "" uuid: item.pk || ""
}); });
}}> }}>

View File

@ -94,7 +94,7 @@ export class OutpostServiceConnectionListPage extends TablePage<ServiceConnectio
.obj=${item} .obj=${item}
objectLabel=${t`Outpost Service-connection`} objectLabel=${t`Outpost Service-connection`}
.delete=${() => { .delete=${() => {
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsAllDelete({ return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsAllDestroy({
uuid: item.pk || "" uuid: item.pk || ""
}); });
}}> }}>

View File

@ -138,7 +138,7 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
.obj=${item} .obj=${item}
objectLabel=${t`Policy binding`} objectLabel=${t`Policy binding`}
.delete=${() => { .delete=${() => {
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsDelete({ return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsDestroy({
policyBindingUuid: item.pk || "", policyBindingUuid: item.pk || "",
}); });
}}> }}>

View File

@ -107,7 +107,7 @@ export class PolicyListPage extends TablePage<Policy> {
.obj=${item} .obj=${item}
objectLabel=${t`Policy`} objectLabel=${t`Policy`}
.delete=${() => { .delete=${() => {
return new PoliciesApi(DEFAULT_CONFIG).policiesAllDelete({ return new PoliciesApi(DEFAULT_CONFIG).policiesAllDestroy({
policyUuid: item.pk || "" policyUuid: item.pk || ""
}); });
}}> }}>

View File

@ -98,7 +98,7 @@ export class PropertyMappingListPage extends TablePage<PropertyMapping> {
.obj=${item} .obj=${item}
objectLabel=${t`Property Mapping`} objectLabel=${t`Property Mapping`}
.delete=${() => { .delete=${() => {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsAllDelete({ return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsAllDestroy({
pmUuid: item.pk || "" pmUuid: item.pk || ""
}); });
}}> }}>

View File

@ -91,7 +91,7 @@ export class ProviderListPage extends TablePage<Provider> {
.obj=${item} .obj=${item}
objectLabel=${t`Provider`} objectLabel=${t`Provider`}
.delete=${() => { .delete=${() => {
return new ProvidersApi(DEFAULT_CONFIG).providersAllDelete({ return new ProvidersApi(DEFAULT_CONFIG).providersAllDestroy({
id: item.pk || 0 id: item.pk || 0
}); });
}}> }}>

View File

@ -87,7 +87,7 @@ export class SourceListPage extends TablePage<Source> {
.obj=${item} .obj=${item}
objectLabel=${t`Source`} objectLabel=${t`Source`}
.delete=${() => { .delete=${() => {
return new SourcesApi(DEFAULT_CONFIG).sourcesAllDelete({ return new SourcesApi(DEFAULT_CONFIG).sourcesAllDestroy({
slug: item.slug || "" slug: item.slug || ""
}); });
}}> }}>

View File

@ -102,7 +102,7 @@ export class StageListPage extends TablePage<Stage> {
.obj=${item} .obj=${item}
objectLabel=${item.verboseName || ""} objectLabel=${item.verboseName || ""}
.delete=${() => { .delete=${() => {
return new StagesApi(DEFAULT_CONFIG).stagesAllDelete({ return new StagesApi(DEFAULT_CONFIG).stagesAllDestroy({
stageUuid: item.pk || "" stageUuid: item.pk || ""
}); });
}}> }}>

View File

@ -59,7 +59,7 @@ export class InvitationListPage extends TablePage<Invitation> {
.obj=${item} .obj=${item}
objectLabel=${t`Prompt`} objectLabel=${t`Prompt`}
.delete=${() => { .delete=${() => {
return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsDelete({ return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsDestroy({
inviteUuid: item.pk || "" inviteUuid: item.pk || ""
}); });
}}> }}>

View File

@ -78,7 +78,7 @@ export class PromptListPage extends TablePage<Prompt> {
.obj=${item} .obj=${item}
objectLabel=${t`Prompt`} objectLabel=${t`Prompt`}
.delete=${() => { .delete=${() => {
return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsDelete({ return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsDestroy({
promptUuid: item.pk || "" promptUuid: item.pk || ""
}); });
}}> }}>

View File

@ -59,7 +59,7 @@ export class TokenListPage extends TablePage<Token> {
.obj=${item} .obj=${item}
objectLabel=${t`Token`} objectLabel=${t`Token`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreTokensDelete({ return new CoreApi(DEFAULT_CONFIG).coreTokensDestroy({
identifier: item.identifier identifier: item.identifier
}); });
}}> }}>

View File

@ -31,7 +31,7 @@ export class SourceSettingsOAuth extends BaseUserSettings {
return html`<p>${t`Connected.`}</p> return html`<p>${t`Connected.`}</p>
<button class="pf-c-button pf-m-danger" <button class="pf-c-button pf-m-danger"
@click=${() => { @click=${() => {
return new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsDelete({ return new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsDestroy({
id: connection.results[0].pk || 0 id: connection.results[0].pk || 0
}); });
}}> }}>

View File

@ -28,7 +28,7 @@ export class UserSettingsAuthenticatorStatic extends BaseUserSettings {
return; return;
} }
// TODO: Handle multiple devices, currently we assume only one TOTP Device // 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 id: devices.results[0].pk || 0
}); });
}); });

View File

@ -43,7 +43,7 @@ export class UserSettingsAuthenticatorTOTP extends BaseUserSettings {
return; return;
} }
// TODO: Handle multiple devices, currently we assume only one TOTP Device // 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 id: devices.results[0].pk || 0
}); });
}); });

View File

@ -29,7 +29,7 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
.obj=${device} .obj=${device}
objectLabel=${t`Authenticator`} objectLabel=${t`Authenticator`}
.delete=${() => { .delete=${() => {
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDelete({ return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDestroy({
id: device.pk || 0 id: device.pk || 0
}); });
}}> }}>

View File

@ -120,7 +120,7 @@ export class UserTokenList extends Table<Token> {
.obj=${item} .obj=${item}
objectLabel=${t`Token`} objectLabel=${t`Token`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreTokensDelete({ return new CoreApi(DEFAULT_CONFIG).coreTokensDestroy({
identifier: item.identifier identifier: item.identifier
}); });
}}> }}>

View File

@ -31,11 +31,11 @@ export class UserForm extends ModelForm<User, number> {
if (this.instance) { if (this.instance) {
return new CoreApi(DEFAULT_CONFIG).coreUsersUpdate({ return new CoreApi(DEFAULT_CONFIG).coreUsersUpdate({
id: this.instance.pk || 0, id: this.instance.pk || 0,
data: data userRequest: data
}); });
} else { } else {
return new CoreApi(DEFAULT_CONFIG).coreUsersCreate({ return new CoreApi(DEFAULT_CONFIG).coreUsersCreate({
data: data userRequest: data
}); });
} }
}; };

View File

@ -94,7 +94,7 @@ export class UserListPage extends TablePage<User> {
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUsersPartialUpdate({ return new CoreApi(DEFAULT_CONFIG).coreUsersPartialUpdate({
id: item.pk || 0, id: item.pk || 0,
data: { patchedUserRequest: {
username: item.username, username: item.username,
name: item.name, name: item.name,
isActive: !item.isActive, isActive: !item.isActive,
@ -112,7 +112,7 @@ export class UserListPage extends TablePage<User> {
.obj=${item} .obj=${item}
objectLabel=${t`User`} objectLabel=${t`User`}
.delete=${() => { .delete=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUsersDelete({ return new CoreApi(DEFAULT_CONFIG).coreUsersDestroy({
id: item.pk || 0 id: item.pk || 0
}); });
}}> }}>
@ -125,7 +125,7 @@ export class UserListPage extends TablePage<User> {
</ak-dropdown> </ak-dropdown>
<ak-action-button <ak-action-button
.apiRequest=${() => { .apiRequest=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUsersRecovery({ return new CoreApi(DEFAULT_CONFIG).coreUsersRecoveryRetrieve({
id: item.pk || 0, id: item.pk || 0,
}).then(rec => { }).then(rec => {
showMessage({ showMessage({

View File

@ -154,7 +154,7 @@ export class UserViewPage extends LitElement {
<div class="pf-c-card__footer"> <div class="pf-c-card__footer">
<ak-action-button <ak-action-button
.apiRequest=${() => { .apiRequest=${() => {
return new CoreApi(DEFAULT_CONFIG).coreUsersRecovery({ return new CoreApi(DEFAULT_CONFIG).coreUsersRecoveryRetrieve({
id: this.user?.pk || 0, id: this.user?.pk || 0,
}).then(rec => { }).then(rec => {
showMessage({ showMessage({