2018-11-11 12:41:48 +00:00
|
|
|
{% extends "administration/base.html" %}
|
|
|
|
|
|
|
|
{% load i18n %}
|
2020-10-05 20:09:57 +00:00
|
|
|
{% load static %}
|
2018-11-11 12:41:48 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2020-02-21 13:20:16 +00:00
|
|
|
<section class="pf-c-page__main-section pf-m-light">
|
|
|
|
<div class="pf-c-content">
|
|
|
|
<h1>{% trans 'System Overview' %}</h1>
|
|
|
|
</div>
|
|
|
|
</section>
|
2020-02-19 20:03:39 +00:00
|
|
|
<section class="pf-c-page__main-section">
|
|
|
|
<div class="pf-l-gallery pf-m-gutter">
|
2020-10-16 18:26:09 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-4-col" style="grid-column-end: span 3;grid-row-end: span 2;">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header">
|
|
|
|
<div class="pf-c-card__header-main">
|
2020-10-05 20:09:57 +00:00
|
|
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Logins over the last 24 hours' %}
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
2019-02-21 15:06:57 +00:00
|
|
|
</div>
|
2020-11-20 22:42:14 +00:00
|
|
|
<div class="pf-c-card__body">
|
|
|
|
<pb-admin-logins-chart url="{% url 'passbook_api:admin_metrics-list' %}"></pb-admin-logins-chart>
|
2019-02-21 15:06:57 +00:00
|
|
|
</div>
|
2020-10-05 20:09:57 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-4-col" style="grid-column-end: span 2;grid-row-end: span 3;">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header">
|
|
|
|
<div class="pf-c-card__header-main">
|
2020-10-05 20:09:57 +00:00
|
|
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Apps with most usage' %}
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
2019-02-21 15:06:57 +00:00
|
|
|
</div>
|
2020-02-19 20:03:39 +00:00
|
|
|
<div class="pf-c-card__body">
|
2020-10-05 20:09:57 +00:00
|
|
|
<table class="pf-c-table pf-m-compact" role="grid">
|
|
|
|
<thead>
|
|
|
|
<tr role="row">
|
|
|
|
<th role="columnheader" scope="col">{% trans 'Application' %}</th>
|
|
|
|
<th role="columnheader" scope="col">{% trans 'Logins' %}</th>
|
|
|
|
<th role="columnheader" scope="col"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody role="rowgroup">
|
|
|
|
{% for app in most_used_applications %}
|
|
|
|
<tr role="row">
|
|
|
|
<td role="cell">
|
|
|
|
{{ app.application.name }}
|
|
|
|
</td>
|
|
|
|
<td role="cell">
|
|
|
|
{{ app.total_logins }}
|
|
|
|
</td>
|
|
|
|
<td role="cell">
|
|
|
|
<progress value="{{ app.total_logins }}" max="{{ most_used_applications.0.total_logins }}"></progress>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-02-19 20:03:39 +00:00
|
|
|
</div>
|
2020-10-05 20:09:57 +00:00
|
|
|
</div>
|
2020-02-19 20:03:39 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-plugged"></i> {% trans 'Providers' %}
|
|
|
|
</div>
|
2020-10-16 18:00:17 +00:00
|
|
|
<a href="{% url 'passbook_admin:providers' %}">
|
|
|
|
<i class="fa fa-external-link-alt"> </i>
|
|
|
|
</a>
|
2020-02-19 20:03:39 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card__body">
|
|
|
|
{% if providers_without_application.exists %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-exclamation-triangle"></i> {{ provider_count }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
<p>{% trans 'Warning: At least one Provider has no application assigned.' %}</p>
|
2020-02-19 20:03:39 +00:00
|
|
|
{% else %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-check-circle"></i> {{ provider_count }}
|
|
|
|
</p>
|
2020-02-19 20:03:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-10-05 20:09:57 +00:00
|
|
|
</div>
|
2020-05-23 23:17:11 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-infrastructure"></i> {% trans 'Policies' %}
|
|
|
|
</div>
|
2020-10-16 18:00:17 +00:00
|
|
|
<a href="{% url 'passbook_admin:policies' %}">
|
|
|
|
<i class="fa fa-external-link-alt"> </i>
|
|
|
|
</a>
|
2019-02-21 15:06:57 +00:00
|
|
|
</div>
|
2020-02-21 13:20:16 +00:00
|
|
|
<div class="pf-c-card__body">
|
|
|
|
{% if policies_without_binding %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-exclamation-triangle"></i> {{ policy_count }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
<p>{% trans 'Policies without binding exist.' %}</p>
|
|
|
|
{% else %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-check-circle"></i> {{ policy_count }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
{% endif %}
|
2019-02-21 15:06:57 +00:00
|
|
|
</div>
|
2020-10-05 20:09:57 +00:00
|
|
|
</div>
|
2020-02-21 13:20:16 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-user"></i> {% trans 'Users' %}
|
|
|
|
</div>
|
2020-10-16 18:00:17 +00:00
|
|
|
<a href="{% url 'passbook_admin:users' %}">
|
|
|
|
<i class="fa fa-external-link-alt"> </i>
|
|
|
|
</a>
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card__body">
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-check-circle"></i> {{ user_count }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
2020-10-05 20:09:57 +00:00
|
|
|
</div>
|
2020-02-21 13:20:16 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-bundle"></i> {% trans 'Version' %}
|
|
|
|
</div>
|
2020-10-16 18:00:17 +00:00
|
|
|
<a href="https://github.com/BeryJu/passbook/releases" target="_blank">
|
|
|
|
<i class="fa fa-external-link-alt"> </i>
|
|
|
|
</a>
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card__body">
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
{% if version >= version_latest %}
|
|
|
|
<i class="fa fa-check-circle"></i> {{ version }}
|
|
|
|
{% else %}
|
|
|
|
<i class="fa fa-exclamation-triangle"></i> {{ version }}
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
2020-06-30 08:23:39 +00:00
|
|
|
{% if version >= version_latest %}
|
2020-07-07 11:13:15 +00:00
|
|
|
{% blocktrans %}
|
|
|
|
Up-to-date!
|
2020-06-30 08:23:39 +00:00
|
|
|
{% endblocktrans %}
|
|
|
|
{% else %}
|
2020-07-07 11:13:15 +00:00
|
|
|
{% blocktrans with latest=version_latest %}
|
|
|
|
{{ latest }} is available!
|
2020-06-30 08:23:39 +00:00
|
|
|
{% endblocktrans %}
|
|
|
|
{% endif %}
|
2019-02-25 16:52:51 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-21 13:20:16 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header">
|
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Workers' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-04 11:01:55 +00:00
|
|
|
<fetch-fill-slot class="pf-c-card__body" url="{% url 'passbook_api:admin_overview-list' %}" key="worker_count">
|
|
|
|
<div slot="value < 1">
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-10-04 11:01:55 +00:00
|
|
|
<i class="fa fa-exclamation-triangle"></i> <span data-value></span>
|
|
|
|
</p>
|
|
|
|
<p>{% trans 'No workers connected.' %}</p>
|
|
|
|
</div>
|
|
|
|
<div slot="value >= 1">
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-10-04 11:01:55 +00:00
|
|
|
<i class="fa fa-check-circle"></i> <span data-value></span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<span class="pf-c-spinner" role="progressbar" aria-valuetext="Loading...">
|
|
|
|
<span class="pf-c-spinner__clipper"></span>
|
|
|
|
<span class="pf-c-spinner__lead-ball"></span>
|
|
|
|
<span class="pf-c-spinner__tail-ball"></span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</fetch-fill-slot>
|
2019-04-29 18:37:44 +00:00
|
|
|
</div>
|
2020-02-21 13:20:16 +00:00
|
|
|
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-06-09 11:39:44 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
2020-02-21 13:20:16 +00:00
|
|
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Policies' %}
|
|
|
|
</div>
|
2020-11-21 18:10:05 +00:00
|
|
|
<pb-modal-button href="{% url 'passbook_admin:overview-clear-policy-cache' %}">
|
|
|
|
<a slot="trigger">
|
|
|
|
<i class="fa fa-trash"> </i>
|
|
|
|
</a>
|
|
|
|
<div slot="modal"></div>
|
|
|
|
</pb-modal-button>
|
2020-02-21 13:20:16 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card__body">
|
|
|
|
{% if cached_policies < 1 %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-exclamation-triangle"></i> {{ cached_policies }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
<p>{% trans 'No policies cached. Users may experience slow response times.' %}</p>
|
|
|
|
{% else %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-check-circle"></i> {{ cached_policies }}
|
|
|
|
</p>
|
2020-02-21 13:20:16 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-10-16 18:00:17 +00:00
|
|
|
</div>
|
2020-07-07 11:13:15 +00:00
|
|
|
|
2020-10-05 20:09:57 +00:00
|
|
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-compact">
|
2020-10-16 18:00:17 +00:00
|
|
|
<div class="pf-c-card__header pf-l-flex pf-m-justify-content-space-between">
|
2020-07-07 11:13:15 +00:00
|
|
|
<div class="pf-c-card__header-main">
|
|
|
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Flows' %}
|
|
|
|
</div>
|
2020-11-21 18:10:05 +00:00
|
|
|
<pb-modal-button href="{% url 'passbook_admin:overview-clear-flow-cache' %}">
|
|
|
|
<a slot="trigger">
|
|
|
|
<i class="fa fa-trash"> </i>
|
|
|
|
</a>
|
|
|
|
<div slot="modal"></div>
|
|
|
|
</pb-modal-button>
|
2020-07-07 11:13:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="pf-c-card__body">
|
|
|
|
{% if cached_flows < 1 %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<span class="fa fa-exclamation-triangle"></span> {{ cached_flows }}
|
|
|
|
</p>
|
|
|
|
<p>{% trans 'No flows cached.' %}</p>
|
|
|
|
{% else %}
|
2020-10-16 18:00:17 +00:00
|
|
|
<p class="pb-aggregate-card">
|
2020-07-07 11:13:15 +00:00
|
|
|
<i class="fa fa-check-circle"></i> {{ cached_flows }}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-18 22:46:31 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
2019-02-16 09:24:31 +00:00
|
|
|
{% endblock %}
|