mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.7 KiB
44 lines
1.7 KiB
4 years ago
|
<div class="bt-form">
|
||
|
<div class="bt-w-main">
|
||
|
<div class="bt-w-menu">
|
||
|
<p class="bgw" onclick="pluginService('mongodb');">服务</p>
|
||
|
<p onclick="pluginInitD('mongodb');">自启动</p>
|
||
|
<p onclick="pluginConfig('mongodb');">配置修改</p>
|
||
|
<p onclick="redisStatus();">负载状态</p>
|
||
|
<p onclick="pluginLogs('mongodb','','run_log');">日志</p>
|
||
|
</div>
|
||
|
<div class="bt-w-con pd15">
|
||
|
<div class="soft-man-con"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
pluginService('mongodb');
|
||
|
|
||
|
//redis负载状态 start
|
||
|
function redisStatus() {
|
||
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
||
|
$.post('/plugins/run', {name:'mongodb', func:'run_info'}, function(data) {
|
||
|
layer.close(loadT);
|
||
|
if (!data.status){
|
||
|
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var rdata = $.parseJSON(data.data);
|
||
|
hit = (parseInt(rdata.keyspace_hits) / (parseInt(rdata.keyspace_hits) + parseInt(rdata.keyspace_misses)) * 100).toFixed(2);
|
||
|
var Con = '<div class="divtable">\
|
||
|
<table class="table table-hover table-bordered" style="width: 490px;">\
|
||
|
<thead><th>字段</th><th>当前值</th><th>说明</th></thead>\
|
||
|
<tbody>\
|
||
|
<tr><th>version</th><td>' + rdata.version + '</td><td>版本</td></tr>\
|
||
|
<tr><th>uptime</th><td>' + rdata.uptime + '</td><td>已运行秒</td></tr>\
|
||
|
<tr><th>connections</th><td>' + rdata.connections + '</td><td>当前链接数</td></tr>\
|
||
|
<tr><th>collections</th><td>' + rdata.collections + '</td><td>文档数</td></tr>\
|
||
|
<tbody>\
|
||
|
</table></div>'
|
||
|
$(".soft-man-con").html(Con);
|
||
|
},'json');
|
||
|
}
|
||
|
//mongodb end
|
||
|
</script>
|