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,12 +205,19 @@ export class LDAPSourceViewPage extends LitElement {
|
|||
<div class="pf-c-card__footer">
|
||||
<ak-action-button
|
||||
.apiRequest=${() => {
|
||||
return new SourcesApi(
|
||||
DEFAULT_CONFIG,
|
||||
).sourcesLdapPartialUpdate({
|
||||
slug: this.source?.slug || "",
|
||||
patchedLDAPSourceRequest: this.source,
|
||||
});
|
||||
return new SourcesApi(DEFAULT_CONFIG)
|
||||
.sourcesLdapPartialUpdate({
|
||||
slug: this.source?.slug || "",
|
||||
patchedLDAPSourceRequest: this.source,
|
||||
})
|
||||
.then(() => {
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
${t`Run sync again`}
|
||||
|
|
|
@ -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,9 +105,18 @@ export class SystemTaskListPage extends TablePage<Task> {
|
|||
this.taskStatus(item),
|
||||
html`<ak-action-button
|
||||
.apiRequest=${() => {
|
||||
return new AdminApi(DEFAULT_CONFIG).adminSystemTasksRetryCreate({
|
||||
id: item.taskName,
|
||||
});
|
||||
return new AdminApi(DEFAULT_CONFIG)
|
||||
.adminSystemTasksRetryCreate({
|
||||
id: item.taskName,
|
||||
})
|
||||
.then(() => {
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
${t`Retry Task`}
|
||||
|
|
Reference in a new issue