update
This commit is contained in:
parent
d7b7c572b0
commit
5e53c637c3
|
|
@ -160,6 +160,18 @@ def set_status_code():
|
|||
mw.writeLog('面板设置', '将未授权响应状态码设置为:{0}:{1}'.format(status_code,info['text']))
|
||||
return mw.returnData(True, '设置成功!')
|
||||
|
||||
# 设置面板调式模式
|
||||
@blueprint.route('/open_debug', endpoint='open_debug', methods=['POST'])
|
||||
@panel_login_required
|
||||
def open_debug():
|
||||
debug = model.getOption('debug',default='close')
|
||||
if debug == 'open':
|
||||
model.setOption('debug','close')
|
||||
return mw.returnData(True, '开发模式关闭!')
|
||||
model.setOption('debug','open')
|
||||
return mw.returnData(True, '开发模式开启!')
|
||||
|
||||
|
||||
# 设置站点状态
|
||||
@blueprint.route('/set_port', endpoint='set_port', methods=['POST'])
|
||||
@panel_login_required
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ function network(b,e){
|
|||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: lan.index.unit+':KB/s',
|
||||
name: '单位:KB/s',
|
||||
boundaryGap: [0, '100%'],
|
||||
splitLine:{ lineStyle:{ color:"#ddd" } },
|
||||
axisLine:{ lineStyle:{ color:"#666" } }
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<div class="ss-text pull-left mr50">
|
||||
<em>开发模式</em>
|
||||
<div class="ssh-item">
|
||||
<input class="btswitch btswitch-ios" id="debugMode" type="checkbox" {{data['debug']}}>
|
||||
<input class="btswitch btswitch-ios" id="debugMode" type="checkbox" {%if data['debug']=='open'%}checked{%endif%}>
|
||||
<label class="btswitch-btn" for="debugMode" onclick="debugMode()"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ def getGlobalVar():
|
|||
data['site_path'] = model.getOption('site_path', default=mw.getFatherDir()+'/wwwroot')
|
||||
data['backup_path'] = model.getOption('backup_path', default=mw.getFatherDir()+'/backup')
|
||||
data['admin_path'] = '/'+model.getOption('admin_path', default='')
|
||||
data['debug'] = model.getOption('debug', default='close')
|
||||
data['site_count'] = model.getSitesCount()
|
||||
data['port'] = mw.getHostPort()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue