web/admin: improve diagram api for flows

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-13 18:01:40 +02:00
parent f9f2e00913
commit 3c23ad340f
2 changed files with 9 additions and 8 deletions

View File

@ -210,6 +210,7 @@ class FlowViewSet(ModelViewSet):
request.user, "authentik_policies.view_policybinding" request.user, "authentik_policies.view_policybinding"
) )
.filter(target=stage_binding) .filter(target=stage_binding)
.exclude(policy__isnull=True)
.order_by("order") .order_by("order")
): ):
body.append( body.append(

View File

@ -58,14 +58,6 @@ export class FlowViewPage extends LitElement {
<ak-tabs> <ak-tabs>
<div slot="page-overview" data-tab-title="${t`Flow Overview`}" class="pf-c-page__main-section pf-m-no-padding-mobile"> <div slot="page-overview" data-tab-title="${t`Flow Overview`}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-l-gallery pf-m-gutter"> <div class="pf-l-gallery pf-m-gutter">
<div class="pf-c-card pf-l-gallery__item" style="grid-column-end: span 4;grid-row-end: span 2;">
<div class="pf-c-card">
<div class="pf-c-card__body">
<ak-flow-diagram flowSlug=${this.flow.slug}>
</ak-flow-diagram>
</div>
</div>
</div>
<div class="pf-c-card pf-l-gallery__item"> <div class="pf-c-card pf-l-gallery__item">
<div class="pf-c-card__title">${t`Related`}</div> <div class="pf-c-card__title">${t`Related`}</div>
<div class="pf-c-card__body"> <div class="pf-c-card__body">
@ -94,6 +86,14 @@ export class FlowViewPage extends LitElement {
</dl> </dl>
</div> </div>
</div> </div>
<div class="pf-c-card pf-l-gallery__item" style="grid-column-end: span 4;grid-row-end: span 2;">
<div class="pf-c-card">
<div class="pf-c-card__body">
<ak-flow-diagram flowSlug=${this.flow.slug}>
</ak-flow-diagram>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div slot="page-stage-bindings" data-tab-title="${t`Stage Bindings`}" class="pf-c-page__main-section pf-m-no-padding-mobile"> <div slot="page-stage-bindings" data-tab-title="${t`Stage Bindings`}" class="pf-c-page__main-section pf-m-no-padding-mobile">