web/admin: trigger refresh after syncing ldap
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
c85484fc00
commit
dd290e264c
|
@ -205,11 +205,18 @@ export class LDAPSourceViewPage extends LitElement {
|
|||
<div class="pf-c-card__footer">
|
||||
<ak-action-button
|
||||
.apiRequest=${() => {
|
||||
return new SourcesApi(
|
||||
DEFAULT_CONFIG,
|
||||
).sourcesLdapPartialUpdate({
|
||||
return new SourcesApi(DEFAULT_CONFIG)
|
||||
.sourcesLdapPartialUpdate({
|
||||
slug: this.source?.slug || "",
|
||||
patchedLDAPSourceRequest: this.source,
|
||||
})
|
||||
.then(() => {
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -10,6 +10,7 @@ import { TableColumn } from "../../elements/table/Table";
|
|||
import { AdminApi, Task, StatusEnum } from "@goauthentik/api";
|
||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { PFColor } from "../../elements/Label";
|
||||
import { EVENT_REFRESH } from "../../constants";
|
||||
|
||||
@customElement("ak-system-task-list")
|
||||
export class SystemTaskListPage extends TablePage<Task> {
|
||||
|
@ -104,8 +105,17 @@ export class SystemTaskListPage extends TablePage<Task> {
|
|||
this.taskStatus(item),
|
||||
html`<ak-action-button
|
||||
.apiRequest=${() => {
|
||||
return new AdminApi(DEFAULT_CONFIG).adminSystemTasksRetryCreate({
|
||||
return new AdminApi(DEFAULT_CONFIG)
|
||||
.adminSystemTasksRetryCreate({
|
||||
id: item.taskName,
|
||||
})
|
||||
.then(() => {
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
|
Reference in New Issue