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">
|
<div class="pf-c-card__footer">
|
||||||
<ak-action-button
|
<ak-action-button
|
||||||
.apiRequest=${() => {
|
.apiRequest=${() => {
|
||||||
return new SourcesApi(
|
return new SourcesApi(DEFAULT_CONFIG)
|
||||||
DEFAULT_CONFIG,
|
.sourcesLdapPartialUpdate({
|
||||||
).sourcesLdapPartialUpdate({
|
|
||||||
slug: this.source?.slug || "",
|
slug: this.source?.slug || "",
|
||||||
patchedLDAPSourceRequest: this.source,
|
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 { AdminApi, Task, StatusEnum } from "@goauthentik/api";
|
||||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
import { PFColor } from "../../elements/Label";
|
import { PFColor } from "../../elements/Label";
|
||||||
|
import { EVENT_REFRESH } from "../../constants";
|
||||||
|
|
||||||
@customElement("ak-system-task-list")
|
@customElement("ak-system-task-list")
|
||||||
export class SystemTaskListPage extends TablePage<Task> {
|
export class SystemTaskListPage extends TablePage<Task> {
|
||||||
|
@ -104,8 +105,17 @@ export class SystemTaskListPage extends TablePage<Task> {
|
||||||
this.taskStatus(item),
|
this.taskStatus(item),
|
||||||
html`<ak-action-button
|
html`<ak-action-button
|
||||||
.apiRequest=${() => {
|
.apiRequest=${() => {
|
||||||
return new AdminApi(DEFAULT_CONFIG).adminSystemTasksRetryCreate({
|
return new AdminApi(DEFAULT_CONFIG)
|
||||||
|
.adminSystemTasksRetryCreate({
|
||||||
id: item.taskName,
|
id: item.taskName,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new CustomEvent(EVENT_REFRESH, {
|
||||||
|
bubbles: true,
|
||||||
|
composed: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
Reference in New Issue