mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-05-16 07:23:04 +00:00
69 lines
2 KiB
HTML
69 lines
2 KiB
HTML
{% extends 'settings/layout.html' %}
|
|
{% load humanize %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "Redis Status" %}{% endblock %}
|
|
|
|
{% block header %}{% trans "Redis Status" %}{% endblock %}
|
|
|
|
{% block panel %}
|
|
|
|
{% if info %}
|
|
<section class="block content">
|
|
<h2>{% trans "Info" %}</h2>
|
|
<div class="columns has-text-centered is-multiline">
|
|
<div class="column is-4">
|
|
<div class="notification">
|
|
<p class="header">{% trans "Used memory" %}</p>
|
|
<p class="title is-5">{{ info.used_memory_human }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="column is-4">
|
|
<div class="notification">
|
|
<p class="header">{% trans "Total system memory" %}</p>
|
|
<p class="title is-5">{{ info.total_system_memory_human }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="column is-4">
|
|
<div class="notification">
|
|
<p class="header">{% trans "Keys" %}</p>
|
|
<p class="title is-5">{{ info.db0.keys | intcomma }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
{{ dead_key_count }}
|
|
<form name="erase-keys" method="POST" action="{% url 'settings-redis' %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="button">go</button>
|
|
</form>
|
|
<form name="erase-keys" method="POST" action="{% url 'settings-redis' %}">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="dry_run" value="True">
|
|
<button type="submit" class="button">dry run</button>
|
|
</form>
|
|
</section>
|
|
{% else %}
|
|
<div class="notification is-danger is-flex is-align-items-start">
|
|
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
|
|
<span>
|
|
{% trans "Could not connect to Redis Activity" %}
|
|
</span>
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if errors %}
|
|
<div class="block content">
|
|
<h2>{% trans "Errors" %}</h2>
|
|
{% for error in errors %}
|
|
<pre>{{ error }}</pre>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|