From 919c61df3a67dff613fddc498f2101f7fde4a65c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 25 Nov 2018 18:11:30 +0800 Subject: [PATCH] Update index.js --- static/js/index.js | 65 ++-------------------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 95da9256c..3aa42d6f1 100755 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,10 +1,3 @@ -//检测是否安装环境 -$.post("/plugins/check_installed", function(rdata) { - if (rdata == false) { - RecInstall(); - } -}); - $(function() { $(".mem-release").hover(function() { $(this).addClass("shine_green"); @@ -131,11 +124,8 @@ function GetPercent(num, total) { return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00); } - - - function GetDiskInfo() { - $.get('/system/disknfo', function(rdata) { + $.get('/system/disk_info', function(rdata) { var dBody for (var i = 0; i < rdata.length; i++) { if (rdata[i].path == '/' || rdata[i].path == '/www') { @@ -821,55 +811,6 @@ function WarningTo(to_url, def) { if (rdata.status && def) setTimeout(function() { location.reload(); }, 1000); }); } -//企业运维版 -function IsYunwei() { - $.get("/plugin?action=a&name=safelogin&s=GetServerInfo", function(rdata) { - $.get("/plugin?action=a&name=safelogin&s=get_ssh_errorlogin", function(tdata) { - var html = '' - if (rdata.status) { - var endtime = getLocalTime(rdata.data.timeout).split(" ")[0]; - html = '
\ - 企业运维版\ -

98元/月

\ - \ -
'; - if (rdata.data.timeout < rdata.data.time && tdata.intrusion_total != undefined) { - html += '

到期时间:' + endtime + '

\ -

黑客爆破次数 ' + tdata.intrusion_total + '

\ -

安全隔离服务已到期

\ -
'; - } else { - html += '

到期时间:' + endtime + '

\ -

已拦截 ' + tdata.defense_total + ' 次爆破

\ -

当前安全隔离保护中

\ - '; - } - } else { - html = '
\ - 企业运维版\ -

98元/月

\ - \ -
\ -
\ -

1、一对一运维人员对接

\ -

2、提供每月3次运维服务

\ -

3、双重安全隔离登录

\ -
'; - GetWarning(); - if (tdata.intrusion_total != undefined && tdata.intrusion_total > 1000 && tdata.ssh.status !== false && tdata.ssh.port == '22' && getCookie('safeMsg') != '1') { - var dangerhtmltable = ''; - var dangerhtml = '

检测到 ' + tdata.intrusion_total + ' 次失败的登陆,您的服务器可能存在暴破风险 [暂时忽略] [查看]

'; - $("#messageError").append(dangerhtml).show(); - for (var i = 0; i < tdata.intrusion.length; i++) { - dangerhtmltable += '' + tdata.intrusion[i].address + '' + tdata.intrusion[i].user + '' + tdata.intrusion[i].date + ''; - } - $("body").append("" + dangerhtmltable + ""); - } - } - $(".btvipbox").html(html); - }); - }); -} function SetSafeHide() { setCookie('safeMsg', '1'); @@ -911,6 +852,4 @@ function showDangerIP() { shift: 5, content: '
' + body + '
源IP地址用户时间

*以上记录来源于本服务器日志,查看命令:cat /var/log/secure

' }); -} - -IsYunwei(); \ No newline at end of file +} \ No newline at end of file