Commit d083cfd0 by 杨琪琪

parent 8dff59c0
......@@ -104,7 +104,7 @@ var defaultXBarOptions = {
}
var defaultYBarOptions = {
title: {
text: '服务器资源实时监控',
text: 'OCR服务器资源实时监控',
textStyle: {fontSize: '14px', color: "#fff"},
left: 'center'
},
......
......@@ -199,7 +199,6 @@
initChart('court-bar', 'Xbar', 'courtBarChart');
initChart('ocr-hardware-chart', 'Ybar', 'hardwareBarChart')
callInterval();
// 表单初始赋值
form.val('areaForm', {
isRegion: true,
......@@ -278,11 +277,14 @@
form.on('radio(radio-time)', function (data) {
restartBrokenLineInterval();
});
callInterval();
restartBrokenLineInterval();
getServerMonitoring(true);
monitorInterval = setInterval(function () {
getServerMonitoring();
}, 5000)
// 表格初始
table.render({
elem: '#call-table',
......@@ -854,8 +856,7 @@
}, 5000)
}
// 页面即将销毁
$(window).on('beforeunload', function () {
function stopInterval() {
if (monitorInterval) {
clearInterval(monitorInterval)
}
......@@ -868,6 +869,11 @@
if (tableInterval) {
clearInterval(tableInterval)
}
}
// 页面即将销毁
$(window).on('beforeunload', function () {
stopInterval();
window.removeEventListener('resize', function () {
if (timeLineChart && timeLineChart.resize) {
timeLineChart.resize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment