-
Notifications
You must be signed in to change notification settings - Fork 48
/
inspect.html
141 lines (129 loc) · 5.46 KB
/
inspect.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{% extends "admin/base_site.html" %}
{% load i18n admin_static admin_modify %}
{% load url from future %}
{% load admin_urls %}
{% block title %}Inspect {{ original }}{% endblock %}
{% block extrahead %}{{ block.super }}
{% url 'admin:jsi18n' as jsi18nurl %}
<script type="text/javascript" src="{{ jsi18nurl|default:"../../../jsi18n/" }}"></script>
{{ media }}
{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "redisboard/admin.css" %}" />
{% endblock %}
{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} inspect-form{% endblock %}
{% if is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label='redisboard' %}">{{ 'redisboard'|capfirst|escape }}</a>
› <a href="{% url 'admin:redisboard_redisserver_changelist' %}">{{ 'redisserver'|capfirst }}</a>
› {% trans 'Inspect' %} {{ original|truncatewords:"18" }}
</div>
{% endblock %}
{% endif %}
{% block content %}
{% spaceless %}
<div id="content-main">
<table class="server-status">
<tr>
<th>{% trans "Status" %}</th>
<th>{% trans "Memory" %}</th>
<th>{% trans "Clients" %}</th>
<th>{% trans "Details" %}</th>
</tr>
<tr>
<td>{{ stats.status }}</td>
<td>{{ stats.memory }}</td>
<td>{{ stats.clients }}</td>
<td>
<table>
{% for key, value in stats.brief_details.items %}
<tr><td>{{ key }}</td><td>{{ value }}</td></tr>
{% endfor %}
</table>
</td>
</tr>
</table>
{% for db, db_detail in databases.items %}
<fieldset class="module aligned database-details">
<h2>{% trans "Database" %} {{ db }}</h2>
<table>
<tr>
<th rowspan="2">{% trans "Keys" %} ({{ db_detail|length }})</th>
<th colspan="7">{% trans "Details" %}</th>
</tr>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "TTL" %}</th>
<th>{% trans "Encoding" %}</th>
<th>{% trans "Length" %}</th>
<th>{% trans "Items" %}</th>
<th>{% trans "LRU" %}</th>
<th>{% trans "Refs" %}</th>
<th>{% trans "Other" %}</th>
</tr>
{% for key, key_detail in db_detail.items %}
<tr>
<td><a href="{% url 'admin:redisboard_redisserver_inspect' original.id %}?key={{ key|escape }}&db={{ db }}">{{ key }}</td>
{% if key_detail.error %}
<td class="error" colspan="7">{% trans "ERROR:" %} {{ key_detail.error }}</td>
{% else %}
<td>{{ key_detail.type }}</td>
<td>{{ key_detail.ttl }}</td>
<td>{{ key_detail.details.encoding }}</td>
<td>{{ key_detail.details.serializedlength }}</td>
<td>{{ key_detail.length }}</td>
<td>{{ key_detail.details.lru|default:"n/a" }} (idle: {{ key_detail.details.lru_seconds_idle|default:"n/a" }})</td>
<td>{{ key_detail.details.refcount }}</td>
<td>At: {{ key_detail.details.at }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
</fieldset>
{% endfor %}
{% if key_details %}
<fieldset class="module aligned key-details">
<h2>{% trans "Key details" %}: {{ key_details.name }}</h2>
<table>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "TTL" %}</th>
<th>{% trans "Encoding" %}</th>
<th>{% trans "Length" %}</th>
<th>{% trans "Items" %}</th>
<th>{% trans "LRU" %}</th>
<th>{% trans "Refs" %}</th>
<th>{% trans "Other" %}</th>
</tr>
<tr>
{% if key_details.error %}
<td class="error" colspan="7">{% trans "ERROR:" %} {{ key_detail.error }}</td>
{% else %}
<td>{{ key_details.type }}</td>
<td>{{ key_details.ttl }}</td>
<td>{{ key_details.details.encoding }}</td>
<td>{{ key_details.details.serializedlength }}</td>
<td>{{ key_details.length }}</td>
<td>{{ key_details.details.lru|default:"n/a" }} (idle: {{ key_details.details.lru_seconds_idle|default:"n/a" }})</td>
<td>{{ key_details.details.refcount }}</td>
<td>At: {{ key_details.details.at }}</td>
{% endif %}
</tr>
</table>
</fieldset>
<fieldset class="module aligned key-data">
<h2>{% trans "Key data" %}: {{ key_details.name }}</h2>
<table>
{% for key, value in key_details.data %}
<tr><td>{{ key }}</td><td>{{ value }}</td></tr>
{% endfor %}
</table>
</fieldset>
{% endif %}
</div>
{% endspaceless %}
{% endblock %}