|
|
@ -121,7 +121,7 @@ function GetToday(){ |
|
|
|
|
|
|
|
|
|
|
|
//取监控状态
|
|
|
|
//取监控状态
|
|
|
|
function getStatus(){ |
|
|
|
function getStatus(){ |
|
|
|
loadT = layer.msg(lan.public.read,{icon:16,time:0}) |
|
|
|
loadT = layer.msg('正在读取,请稍候...',{icon:16,time:0}) |
|
|
|
$.post('/system/set_control','type=-1',function(rdata){ |
|
|
|
$.post('/system/set_control','type=-1',function(rdata){ |
|
|
|
// console.log(rdata);
|
|
|
|
// console.log(rdata);
|
|
|
|
layer.close(loadT); |
|
|
|
layer.close(loadT); |
|
|
@ -140,7 +140,7 @@ getStatus(); |
|
|
|
function setControl(act){ |
|
|
|
function setControl(act){ |
|
|
|
var day = $("#saveDay").val() |
|
|
|
var day = $("#saveDay").val() |
|
|
|
if(day < 1){ |
|
|
|
if(day < 1){ |
|
|
|
layer.msg(lan.control.save_day_err,{icon:2}); |
|
|
|
layer.msg('保存天数不合法!',{icon:2}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if(act){ |
|
|
|
if(act){ |
|
|
@ -149,7 +149,7 @@ function setControl(act){ |
|
|
|
var type = $("#ctswitch").prop('checked')?'0':'1'; |
|
|
|
var type = $("#ctswitch").prop('checked')?'0':'1'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
loadT = layer.msg(lan.public.the,{icon:16,time:0}) |
|
|
|
loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0}) |
|
|
|
$.post('/system/set_control','type='+type+'&day='+day,function(rdata){ |
|
|
|
$.post('/system/set_control','type='+type+'&day='+day,function(rdata){ |
|
|
|
layer.close(loadT); |
|
|
|
layer.close(loadT); |
|
|
|
layer.msg(rdata.msg,{icon:rdata.status?1:2}); |
|
|
|
layer.msg(rdata.msg,{icon:rdata.status?1:2}); |
|
|
@ -158,8 +158,8 @@ function setControl(act){ |
|
|
|
|
|
|
|
|
|
|
|
//清理记录
|
|
|
|
//清理记录
|
|
|
|
function closeControl(){ |
|
|
|
function closeControl(){ |
|
|
|
layer.confirm(lan.control.close_log_msg,{title:lan.control.close_log,icon:3,closeBtn:2}, function() { |
|
|
|
layer.confirm('您真的清空所有监控记录吗?',{title:'清空记录',icon:3,closeBtn:2}, function() { |
|
|
|
loadT = layer.msg(lan.public.the,{icon:16,time:0}) |
|
|
|
loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0}) |
|
|
|
$.post('/system/set_control','type=del',function(rdata){ |
|
|
|
$.post('/system/set_control','type=del',function(rdata){ |
|
|
|
layer.close(loadT); |
|
|
|
layer.close(loadT); |
|
|
|
// $.get('/system?action=ReWeb',function(){});
|
|
|
|
// $.get('/system?action=ReWeb',function(){});
|
|
|
@ -169,16 +169,6 @@ function closeControl(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//字节单位转换MB
|
|
|
|
|
|
|
|
function ToSizeG(bytes){ |
|
|
|
|
|
|
|
var c = 1024 * 1024; |
|
|
|
|
|
|
|
var b = 0; |
|
|
|
|
|
|
|
if(bytes > 0){ |
|
|
|
|
|
|
|
var b = (bytes/c).toFixed(2); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return b; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//定义周期时间
|
|
|
|
//定义周期时间
|
|
|
|
function getBeforeDate(n){ |
|
|
|
function getBeforeDate(n){ |
|
|
|
var n = n; |
|
|
|
var n = n; |
|
|
@ -406,7 +396,7 @@ function disk(b,e){ |
|
|
|
formatter:"时间:{b0}<br />{a0}: {c0} Kb/s<br />{a1}: {c1} Kb/s",
|
|
|
|
formatter:"时间:{b0}<br />{a0}: {c0} Kb/s<br />{a1}: {c1} Kb/s",
|
|
|
|
}, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
legend: { |
|
|
|
data:[lan.control.disk_read_bytes,lan.control.disk_write_bytes] |
|
|
|
data:['读取字节数','写入字节数'] |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
type: 'category', |
|
|
@ -420,7 +410,7 @@ function disk(b,e){ |
|
|
|
}, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
|
type: 'value', |
|
|
|
name: lan.index.unit+':KB/s', |
|
|
|
name: '单位:KB/s', |
|
|
|
boundaryGap: [0, '100%'], |
|
|
|
boundaryGap: [0, '100%'], |
|
|
|
splitLine:{ |
|
|
|
splitLine:{ |
|
|
|
lineStyle:{ |
|
|
|
lineStyle:{ |
|
|
@ -453,7 +443,7 @@ function disk(b,e){ |
|
|
|
}], |
|
|
|
}], |
|
|
|
series: [ |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name:lan.control.disk_read_bytes, |
|
|
|
name:'读取字节数', |
|
|
|
type:'line', |
|
|
|
type:'line', |
|
|
|
smooth:true, |
|
|
|
smooth:true, |
|
|
|
symbol: 'none', |
|
|
|
symbol: 'none', |
|
|
@ -466,7 +456,7 @@ function disk(b,e){ |
|
|
|
data: rData |
|
|
|
data: rData |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name:lan.control.disk_write_bytes, |
|
|
|
name:'写入字节数', |
|
|
|
type:'line', |
|
|
|
type:'line', |
|
|
|
smooth:true, |
|
|
|
smooth:true, |
|
|
|
symbol: 'none', |
|
|
|
symbol: 'none', |
|
|
|