forked from HatBoy/RTask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredis.html
executable file
·101 lines (99 loc) · 4.38 KB
/
redis.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Redis状态</title>
<link rel="stylesheet" href="../static/bootstrap3.3/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="../static/bootstrap3.3/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../static/bootstrap3.3/css/justified-nav.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="../static/bootstrap3.3/js/jquery-3.1.1.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="../static/bootstrap3.3/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="masthead">
<h3 class="text-muted">RTask分布式任务监控面板</h3><br>
<ul class="nav nav-justified">
<li><a href="{{ url_for('index') }}">任务队列</a></li>
<li><a href="{{ url_for('node_lists') }}">工作节点</a></li>
<li><a href="{{ url_for('worker_lists') }}">运行进程</a></li>
<li class="active"><a href="{{ url_for('redis_list') }}">Redis状态</a></li>
</ul>
</div>
<br>
<div class="row">
{% for redis in redis_lists %}
<div class="col-md-6">
<table class="table table-hover table-striped table-bordered" style="text-align: center;">
<tr>
<td>描述</td>
<td colspan="3">{{ redis['dest'] }}</td>
</tr>
<tr>
<td>类型</td>
<td colspan="3">{{ redis['type'] }}</td>
</tr>
<tr>
<td>IP端口</td>
<td colspan="3">
{% if redis['type']=='集群' %}
{% for i in redis['ip_port'] %}
{{ i }} <br>
{% endfor %}
{% else %}
{{ redis['ip_port'] }}
{% endif %}
</td>
</tr>
<tr>
<td>占用内存</td>
<td colspan="3">
{% if redis['type']=='集群' %}
{% for i in redis['used_memory'] %}
{{ i }} <br>
{% endfor %}
{% else %}
{{ redis['used_memory'] }}
{% endif %}
</td>
</tr>
<tr>
<td>key数量</td>
<td colspan="3">
{% if redis['type']=='集群' %}
{% for i in redis['dbsize'] %}
{{ i }} <br>
{% endfor %}
{% else %}
{{ redis['dbsize'] }}
{% endif %}
</td>
</tr>
<tr>
<td>连接数</td>
<td colspan="3">
{% if redis['type']=='集群' %}
{% for i in redis['clients'] %}
{{ i }} <br>
{% endfor %}
{% else %}
{{ redis['clients'] }}
{% endif %}
</td>
</tr>
<tr>
<td>操作</td>
<td><a href="{{ url_for('redis_info') }}?name={{ redis['name'] }}" style="text-decoration: none; color: #31b0d5">详情</a></td>
<td><a href="{{ url_for('redis_save') }}?name={{ redis['name'] }}&save_type=save" style="text-decoration: none; color: #31b0d5">SAVE</a></td>
<td><a href="{{ url_for('redis_save') }}?name={{ redis['name'] }}&save_type=bgsave" style="text-decoration: none; color: #31b0d5">BGSAVE</a></td>
</tr>
</table>
</div>
{% endfor %}
</div>
</div>
</body>
</html>