diff --git a/plugins/redis/index.html b/plugins/redis/index.html
index a2b0ad7c2..ec400b9cc 100755
--- a/plugins/redis/index.html
+++ b/plugins/redis/index.html
@@ -19,6 +19,7 @@
diff --git a/plugins/redis/index.py b/plugins/redis/index.py
index bf55b08b5..6493446a9 100755
--- a/plugins/redis/index.py
+++ b/plugins/redis/index.py
@@ -393,6 +393,21 @@ def clusterInfo():
return mw.getJson(result)
+def clusterNodes():
+ s = status()
+ if s == 'stop':
+ return mw.returnJson(False, '未启动')
+
+ cmd = getRedisCmd()
+ cmd = cmd + 'cluster nodes'
+
+ # print(cmd)
+ data = mw.execShell(cmd)[0]
+ # print(data)
+
+ data = data.strip().split("\n")
+ return mw.getJson(data)
+
def initdStatus():
current_os = mw.getOs()
if current_os == 'darwin':
@@ -539,6 +554,8 @@ if __name__ == "__main__":
print(infoReplication())
elif func == 'cluster_info':
print(clusterInfo())
+ elif func == 'cluster_nodes':
+ print(clusterNodes())
elif func == 'conf':
print(getConf())
elif func == 'run_log':
diff --git a/plugins/redis/js/redis.js b/plugins/redis/js/redis.js
index 80ab79e89..70835a7c6 100755
--- a/plugins/redis/js/redis.js
+++ b/plugins/redis/js/redis.js
@@ -165,8 +165,8 @@ function clusterStatus(version){
'cluster_stats_messages_received':'接收',
'cluster_current_epoch':'集群当前epoch',
'cluster_my_epoch':'当前我的epoch',
- 'cluster_slots_pfail':'处于PFAIL状态的节点槽数',
- 'cluster_slots_fail':'处于FAIL状态的节点槽数',
+ 'cluster_slots_pfail':'处于PFAIL状态的槽数',
+ 'cluster_slots_fail':'处于FAIL状态的槽数',
'total_cluster_links_buffer_limit_exceeded':'超出缓冲区总数',
}
@@ -196,6 +196,35 @@ function clusterStatus(version){
$(".soft-man-con").html(con);
});
}
+
+function clusterNodes(version){
+ redisPost('cluster_nodes', version, {},function(data){
+ var rdata = $.parseJSON(data.data);
+
+ if ('status' in rdata && !rdata.status){
+ layer.msg(rdata.msg,{icon:0,time:2000,shade: [0.3, '#000']});
+ return;
+ }
+
+ // console.log(rdata);
+ var tbody_text = '';
+ for (k in rdata){
+ tbody_text += '
'+ rdata[k] +' |
';
+ }
+
+ if (tbody_text == ''){
+ tbody_text += '
无数据/未设置集群 |
';
+ }
+
+ var con = '
\
+
\
+ 节点信息 | \
+ '+tbody_text+'\
+
';
+ $(".soft-man-con").html(con);
+ });
+}
+
//redis状态 end
//配置修改
diff --git a/plugins/redis/tpl/redis_cluster.conf b/plugins/redis/tpl/redis_cluster.conf
index c002bfec6..7c2364132 100644
--- a/plugins/redis/tpl/redis_cluster.conf
+++ b/plugins/redis/tpl/redis_cluster.conf
@@ -10,7 +10,6 @@ tcp-keepalive 0
bind 127.0.0.1
port 6379
-requirepass {$REDIS_PASS}
################################ SNAPSHOTTING #################################