Files
authentik/web/src/admin/flows/FlowDiagram.ts
Jens L 4c606fb0ba web/admin: more diagrams (#3630)
* separate diagram element

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

* add more

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2022-09-22 21:27:29 +02:00

26 lines
738 B
TypeScript

import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { Diagram } from "@goauthentik/elements/Diagram";
import "@goauthentik/elements/EmptyState";
import { customElement, property } from "lit/decorators.js";
import { FlowsApi } from "@goauthentik/api";
@customElement("ak-flow-diagram")
export class FlowDiagram extends Diagram {
@property()
flowSlug?: string;
refreshHandler = (): void => {
this.diagram = undefined;
new FlowsApi(DEFAULT_CONFIG)
.flowsInstancesDiagramRetrieve({
slug: this.flowSlug || "",
})
.then((data) => {
this.diagram = data.diagram;
this.requestUpdate();
});
};
}