mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 05:59:25 +08:00
update
This commit is contained in:
@@ -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
|
||||
|
||||
+6
-1
@@ -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 ''
|
||||
|
||||
+1
-13
@@ -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(){
|
||||
|
||||
+3
-2
@@ -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 = '';
|
||||
|
||||
@@ -11,13 +11,8 @@
|
||||
</div>
|
||||
<div class="clearfix bgw mtb15 pd15">
|
||||
<div class="safe-port pull-left">
|
||||
<div class="ss-text pull-left mr50">
|
||||
<em>关闭面板</em>
|
||||
<div class='ssh-item'>
|
||||
<input class='btswitch btswitch-ios' id='closePl' type='checkbox'>
|
||||
<label class='btswitch-btn' for='closePl' onclick='ClosePanel()'></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ss-text pull-left mr50">
|
||||
<em>自动更新</em>
|
||||
<div class='ssh-item'>
|
||||
@@ -39,7 +34,7 @@
|
||||
<h3 class="f16">设置</h3>
|
||||
<button class="btn btn-default btn-sm" style="float: right;margin-top: 10px;display: none;" onclick="apiSetup()">$data['lan']['C2']</button>
|
||||
</div>
|
||||
<div class="important-title" style="margin: 20px 30px 0px;">
|
||||
<div class="info-title-tips" style="margin: 20px 30px 0px;">
|
||||
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>为了提高安全,请修改别名、默认端口、面板用户和密码!</p>
|
||||
</div>
|
||||
<div class="setting-con pd15">
|
||||
@@ -91,10 +86,6 @@
|
||||
<span class="set-tit text-right" title="面板密码">面板密码</span>
|
||||
<input name="password_" class="inputtxt bt-input-text disable" type="text" value="******" disabled><span class="modify btn btn-xs btn-success" onclick="setPassword()">修改</span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
<div class="bt-submit set-submit">保存</div>
|
||||
</div>
|
||||
@@ -214,7 +205,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/js/config.js?date=20180530"></script>
|
||||
<script src="/static/js/config.js?v={{config.version}}"></script>
|
||||
<script type="text/javascript">
|
||||
// setCookie('serverType','$web.ctx.session.webserver');
|
||||
</script>
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
</div>
|
||||
<div class="search pull-right">
|
||||
<form target="hid" onsubmit='getWeb(1,$$("#SearchValue").prop("value"))'>
|
||||
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="$tData['lan']['SEARCH']"/>
|
||||
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="网站搜索"/>
|
||||
<button type="button" class="ser-sub pull-left" onclick='getWeb(1,$$("#SearchValue").prop("value"))'></button>
|
||||
</form>
|
||||
<iframe name='hid' id="hid" style="display:none"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="safe bgw mtb15 pd15">
|
||||
<div class="important-title">
|
||||
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>使用MDWEB Linux面板创建站点时会自动创建权限配置,统一使用www用户。</p>
|
||||
<div class="info-title-tips">
|
||||
<p><span class="glyphicon glyphicon-alert" style="color:#f39c12; margin-right:10px;"></span>使用mdserver-web|linux面板创建站点时会自动创建权限配置,统一使用www用户。</p>
|
||||
</div>
|
||||
<button onclick="webAdd(0)" class="btn btn-success btn-sm btn-title" type="button">添加站点</button>
|
||||
<button onclick="SiteDefaultPage()" class="btn btn-default btn-sm btn-title" type="button">修改默认页</button>
|
||||
@@ -53,13 +53,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/static/laydate/laydate.js?date=20180301"></script>
|
||||
<script type="text/javascript" src="/static/js/ftp.js?date=20180124"></script>
|
||||
<script type="text/javascript" src="/static/js/site.js?date=20180912"></script>
|
||||
<script type="text/javascript" src="/static/laydate/laydate.js?v={{config.version}}"></script>
|
||||
<script type="text/javascript" src="/static/js/ftp.js?v={{config.version}}"></script>
|
||||
<script type="text/javascript" src="/static/js/site.js?v={{config.version}}"></script>
|
||||
<script type="text/javascript">
|
||||
$if not tData['isSetup']:
|
||||
layer.msg('$tData["lan"]["JS1"]<a href="/soft" style="color:#20a53a; float: right;">$tData["lan"]["JS2"]</a>',{icon:7,shade: [0.3, '#000'],time:0});
|
||||
$$(".layui-layer-shade").css("margin-left","180px");
|
||||
// $if not tData['isSetup']:
|
||||
// layer.msg('$tData["lan"]["JS1"]<a href="/soft" style="color:#20a53a; float: right;">$tData["lan"]["JS2"]</a>',{icon:7,shade: [0.3, '#000'],time:0});
|
||||
// $(".layui-layer-shade").css("margin-left","180px");
|
||||
|
||||
setTimeout(function(){
|
||||
getWeb(1);
|
||||
|
||||
Reference in New Issue
Block a user