diff --git a/class/core/system_api.py b/class/core/system_api.py index dec837773..b09ebbd67 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -556,8 +556,7 @@ class system_api: if stype == 'check' or stype == 'info' or stype == 'update': return public.returnJson(True, '正在安装中...', 'download') if stype == 'update_status': - if os.path.exists('mdserver-web.zip'): - return public.returnJson(True, '进度!', 100) + data = public.readFile('tmp/panelExec.log') if data == 'done': return public.returnJson(True, '进度!', 100) @@ -565,6 +564,9 @@ class system_api: _data = json.loads(data) return public.returnJson(True, '进度!', _data['pre']) + if os.path.exists('mdserver-web.zip'): + return public.returnJson(True, '进度!', 100) + if not public.isRestart(): return public.returnJson(False, '请等待所有安装任务完成再执行!') if stype == 'check': @@ -612,7 +614,7 @@ class system_api: return public.returnJson(True, '下载中...') if stype == 'update_install': - public.EexecShell('unzip -o mdserver-web.zip -d ./') + public.execShell('unzip -o mdserver-web.zip -d ./') public.execShell('rm -f mdserver-web.zip') return public.returnJson(True, '安装更新成功!') @@ -638,11 +640,3 @@ class system_api: if hasattr(web.ctx.session, 'getCloudPlugin'): del(web.ctx.session['getCloudPlugin']) return True - - # 升级到专业版 - def updatePro(self, get): - public.ExecShell("wget -O update.sh " + public.get_url() + - "/install/update_pro.sh && bash update.sh pro") - if hasattr(web.ctx.session, 'getCloudPlugin'): - del(web.ctx.session['getCloudPlugin']) - return True diff --git a/route/site.py b/route/site.py index b14ead989..4a28918a3 100644 --- a/route/site.py +++ b/route/site.py @@ -7,6 +7,11 @@ from flask import Blueprint, render_template site = Blueprint('site', __name__, template_folder='templates') -@site.route("/") +@site.route('/') def index(): return render_template('default/site.html') + + +@site.route('/list', methods=['POST']) +def list(): + return '' diff --git a/static/js/config.js b/static/js/config.js index 4f0d149ff..475d1ac1b 100755 --- a/static/js/config.js +++ b/static/js/config.js @@ -1,16 +1,4 @@ -//关闭面板 -function ClosePanel(){ - layer.confirm(lan.config.close_panel_msg,{title:lan.config.close_panel_title,closeBtn:2,icon:13,cancel:function(){ - $("#closePl").prop("checked",false); - }}, function() { - $.post('/config?action=ClosePanel','',function(rdata){ - layer.msg(rdata.msg,{icon:rdata.status?1:2}); - setTimeout(function(){window.location.reload();},1000); - }); - },function(){ - $("#closePl").prop("checked",false); - }); -} + //设置自动更新 function SetPanelAutoUpload(){ diff --git a/static/js/site.js b/static/js/site.js index fa99d6ce8..c24b3bc0a 100755 --- a/static/js/site.js +++ b/static/js/site.js @@ -12,11 +12,12 @@ function getWeb(page, search) { }else{ order = ''; } - var sUrl = '/data?action=getData' + var sUrl = '/site/list' var pdata = 'tojs=getWeb&table=sites&limit=15&p=' + page + '&search=' + search + order; var loadT = layer.load(); //取回数据 - $.post(sUrl,pdata, function(data) { + $.post(sUrl, pdata, function(data) { + console.log(data) layer.close(loadT); //构造数据列表 var Body = ''; diff --git a/templates/default/config.html b/templates/default/config.html index 62dbfdee2..f4a7ccba9 100755 --- a/templates/default/config.html +++ b/templates/default/config.html @@ -11,13 +11,8 @@
-
- 关闭面板 -
- - -
-
+ +
自动更新
@@ -39,7 +34,7 @@

设置

-
+

为了提高安全,请修改别名、默认端口、面板用户和密码!

@@ -91,10 +86,6 @@ 面板密码 修改

- - - -
保存
@@ -214,7 +205,7 @@ text-align: center; } - + diff --git a/templates/default/site.html b/templates/default/site.html index 9597cab23..3686f8ab0 100755 --- a/templates/default/site.html +++ b/templates/default/site.html @@ -10,15 +10,15 @@
-
-

使用MDWEB Linux面板创建站点时会自动创建权限配置,统一使用www用户。

+
+

使用mdserver-web|linux面板创建站点时会自动创建权限配置,统一使用www用户。

  @@ -53,13 +53,13 @@
- - - + + +