...
|
...
|
@@ -32,9 +32,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" style="margin-top: 60px;" id="myRedisProxyDetail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
<div class="modal fade" style="margin-top: 60px;" id="myRedisProxyDetail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-content" style="width:800px;">
|
|
|
<div class="modal-header">
|
|
|
<button type="button" class="close" data-dismiss="modal"
|
|
|
aria-hidden="true">×</button>
|
...
|
...
|
@@ -99,21 +99,23 @@ |
|
|
}
|
|
|
}
|
|
|
});
|
|
|
contentHtml='<div class="col-md-4" id="aws" style="height: 300px; width: 800px;">'+
|
|
|
contentHtml='<div class="col-md-4" id="aws" style="height: 360px; width: 800px;">'+
|
|
|
'<div class="panel panel-success-alt noborder" style="background-color: #5cb85c;">'+
|
|
|
'<div class="panel-heading noborder">'+
|
|
|
'<div>'+ '<div style="margin-left: 18px;"><img src="img/log_redis.png"><span style="font-size:28px;color: white;margin-left: 180px;">'+topNode+'</span></div>'+
|
|
|
'</div>'+
|
|
|
'<hr>'+
|
|
|
'<div class="clearfix mt15">'+
|
|
|
'<div style="width:350px; height: 100px;float: left; border: 1px solid white;word-break:break-all;">';
|
|
|
'<div style="width:350px; height: 130px;float: left; border: 1px solid white;word-break:break-all;">'+
|
|
|
'<h4 class="modal-title" style="text-align: center;color: white;">AWS</h4>';
|
|
|
if(awsIp==""){
|
|
|
contentHtml+="无";
|
|
|
}else{
|
|
|
contentHtml+=awsIp;
|
|
|
}
|
|
|
contentHtml+= '</div>'+
|
|
|
'<div style="width:350px; height: 100px;float: right; border: 1px solid white;word-break:break-all;">';
|
|
|
'<div style="width:350px; height: 130px;float: right; border: 1px solid white;word-break:break-all;">'+
|
|
|
'<h4 class="modal-title" style="text-align: center;color: white;" >QCloud</h4>';
|
|
|
if(qcoloudIp==""){
|
|
|
contentHtml+="无";
|
|
|
}else{
|
...
|
...
|
@@ -133,16 +135,17 @@ |
|
|
function displatyTetail(ip){
|
|
|
var detailListRedis=new Array();
|
|
|
$.each(myMasterRedis, function (i, myMasterObj) {
|
|
|
myMasterObj.slaveParam="";
|
|
|
if(ip==myMasterObj.nodeFrom){
|
|
|
detailListRedis.push(myMasterObj);
|
|
|
$.each(mySlaveRedis, function (j, mySlaveObj) {
|
|
|
if(myMasterObj.nodeTo==mySlaveObj.nodeFrom){
|
|
|
detailListRedis.push(mySlaveObj);
|
|
|
myMasterObj.slaveParam=mySlaveObj.paramMonitor+","+mySlaveObj.nodeTo;
|
|
|
}
|
|
|
});
|
|
|
detailListRedis.push(myMasterObj);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
console.log(detailListRedis);
|
|
|
$("#redislistDetail").table({
|
|
|
columnAutoWidth : false,
|
|
|
data : detailListRedis,
|
...
|
...
|
@@ -154,7 +157,7 @@ |
|
|
var ipport=value.split(":");
|
|
|
return ipport[0];
|
|
|
},
|
|
|
width : "12%"
|
|
|
width : "10%"
|
|
|
},{
|
|
|
title : "port",
|
|
|
field : "nodeTo",
|
...
|
...
|
@@ -162,54 +165,101 @@ |
|
|
var ipport=value.split(":");
|
|
|
return ipport[1];
|
|
|
},
|
|
|
width : "12%"
|
|
|
width : "8%"
|
|
|
},{
|
|
|
title : "角色",
|
|
|
field : "paramMonitor",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[0]==null){
|
|
|
if(paramMonitor[1]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
return paramMonitor[0];
|
|
|
return paramMonitor[1];
|
|
|
}
|
|
|
},
|
|
|
width : "12%"
|
|
|
width : "8%"
|
|
|
},{
|
|
|
title : "最大内存",
|
|
|
field : "paramMonitor",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[0]==null){
|
|
|
if(paramMonitor[2]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
return paramMonitor[1];
|
|
|
return paramMonitor[2];
|
|
|
}
|
|
|
},
|
|
|
width : "12%"
|
|
|
width : "8%"
|
|
|
},{
|
|
|
title : "使用内存",
|
|
|
field : "paramMonitor",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[0]==null){
|
|
|
if(paramMonitor[4]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
return paramMonitor[3];
|
|
|
return paramMonitor[4];
|
|
|
}
|
|
|
},
|
|
|
width : "12%"
|
|
|
width : "8%"
|
|
|
},{
|
|
|
title : "使用率",
|
|
|
field : "paramMonitor",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[3]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
return paramMonitor[3];
|
|
|
}
|
|
|
},
|
|
|
width : "6%"
|
|
|
},{
|
|
|
title : "状态",
|
|
|
field : "paramMonitor",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[0]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
return paramMonitor[2];
|
|
|
if(paramMonitor[0]=="0"){
|
|
|
|
|
|
return "ERROR";
|
|
|
}else if(paramMonitor[0]=="1"){
|
|
|
return "OK"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
styler : function(value, rowData, rowIndex) {
|
|
|
var paramMonitor=value.split(",");
|
|
|
if(paramMonitor[0]==null){
|
|
|
return "";
|
|
|
}else{
|
|
|
if(paramMonitor[0]=="0"){
|
|
|
return {
|
|
|
"background-color" : "red",
|
|
|
"color":"white"
|
|
|
};
|
|
|
}else if(paramMonitor[0]=="1"){
|
|
|
return {
|
|
|
"background-color" : "green",
|
|
|
"color":"white"
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
width : "6%"
|
|
|
},{
|
|
|
title : "主从",
|
|
|
field : "slaveParam",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
if(value!=""){
|
|
|
var slaveParam=value.split(",");
|
|
|
return "主从"+slaveParam[0]+"<br/>主IP:"+slaveParam[1];
|
|
|
}
|
|
|
return "无";
|
|
|
|
|
|
},
|
|
|
width : "12%"
|
|
|
}]
|
|
|
});
|
...
|
...
|
|