136 lines
6.1 KiB
HTML
136 lines
6.1 KiB
HTML
{% extends "administration/base.html" %}
|
|
|
|
{% load i18n %}
|
|
{% load passbook_utils %}
|
|
|
|
{% block content %}
|
|
<section class="pf-c-page__main-section pf-m-light">
|
|
<div class="pf-c-content">
|
|
<h1>
|
|
<i class="pf-icon pf-icon-process-automation"></i>
|
|
{% trans 'Flows' %}
|
|
</h1>
|
|
<p>{% trans "Flows describe a chain of Stages to authenticate, enroll or recover a user. Stages are chosen based on policies applied to them." %}</p>
|
|
</div>
|
|
</section>
|
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
|
<div class="pf-c-card">
|
|
{% if object_list %}
|
|
<div class="pf-c-toolbar">
|
|
<div class="pf-c-toolbar__content">
|
|
{% include 'partials/toolbar_search.html' %}
|
|
<div class="pf-c-toolbar__bulk-select">
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
|
{% trans 'Create' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
|
{% trans 'Import' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
|
{% trans 'Refresh' %}
|
|
</button>
|
|
</div>
|
|
{% include 'partials/pagination.html' %}
|
|
</div>
|
|
</div>
|
|
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
|
|
<thead>
|
|
<tr role="row">
|
|
<th role="columnheader" scope="col">{% trans 'Identifier' %}</th>
|
|
<th role="columnheader" scope="col">{% trans 'Designation' %}</th>
|
|
<th role="columnheader" scope="col">{% trans 'Stages' %}</th>
|
|
<th role="columnheader" scope="col">{% trans 'Policies' %}</th>
|
|
<th role="cell"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody role="rowgroup">
|
|
{% for flow in object_list %}
|
|
<tr role="row">
|
|
<th role="columnheader">
|
|
<div>
|
|
<div><code>{{ flow.slug }}</code></div>
|
|
<small>{{ flow.name }}</small>
|
|
</div>
|
|
</th>
|
|
<td role="cell">
|
|
<span>
|
|
{{ flow.designation }}
|
|
</span>
|
|
</td>
|
|
<td role="cell">
|
|
<span>
|
|
{{ flow.stages.all|length }}
|
|
</span>
|
|
</td>
|
|
<td role="cell">
|
|
<span>
|
|
{{ flow.policies.all|length }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-update' pk=flow.pk %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
|
{% trans 'Edit' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-delete' pk=flow.pk %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
|
{% trans 'Delete' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
|
|
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-export' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Export' %}</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<div class="pf-c-pagination pf-m-bottom">
|
|
{% include 'partials/pagination.html' %}
|
|
</div>
|
|
{% else %}
|
|
<div class="pf-c-toolbar">
|
|
<div class="pf-c-toolbar__content">
|
|
{% include 'partials/toolbar_search.html' %}
|
|
</div>
|
|
</div>
|
|
<div class="pf-c-empty-state">
|
|
<div class="pf-c-empty-state__content">
|
|
<i class="pf-icon pf-icon-process-automation pf-c-empty-state__icon" aria-hidden="true"></i>
|
|
<h1 class="pf-c-title pf-m-lg">
|
|
{% trans 'No Flows.' %}
|
|
</h1>
|
|
<div class="pf-c-empty-state__body">
|
|
{% if request.GET.search != "" %}
|
|
{% trans "Your search query doesn't match any flows." %}
|
|
{% else %}
|
|
{% trans 'Currently no flows exist. Click the button below to create one.' %}
|
|
{% endif %}
|
|
</div>
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
|
{% trans 'Create' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
|
|
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
|
{% trans 'Import' %}
|
|
</pb-spinner-button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|