Skip to content

Commit

Permalink
7.0.2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Oct 19, 2019
1 parent 6831ad7 commit 17cdd02
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion BTPanel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def request_check():
if request.path.find('/static/') != -1 or request.path == '/code':
if not 'login' in session and not 'admin_auth' in session:
session.clear()
if request.path == '/code': return abort(401)
return abort(401)
domain_check = public.check_domain_panel()
if domain_check: return domain_check
if public.is_local():
Expand Down
6 changes: 4 additions & 2 deletions BTPanel/static/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -2837,10 +2837,12 @@ html .menu .menu_exit:hover {
vertical-align: middle;
padding: 5px 10px;
height: 40px;
font-size: 12.5px;
font-size: 12px;
box-sizing: border-box;
}

.table>tbody{
border-bottom: 1px solid #ddd;
}
.showpicdiv {
max-height: 500px;
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion BTPanel/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var index = {
crs += 'CPU-' + i + ": " + d[2][i] + '%' + (n1 % 2 == 0?'</br>':' | ');

}
layer.tips(d[3] + "</br>" + d[5] + "个物理CPU," + d[4] + "个物理核心," + d[4]+"线程</br>"+ crs, _this.find('.cicle'), { time: 0, tips: [1, '#999'] });
layer.tips(d[3] + "</br>" + d[5] + "个物理CPU," + (d[5] * d[4]) + "个物理核心," + d[1]+"线程</br>"+ crs, _this.find('.cicle'), { time: 0, tips: [1, '#999'] });
}, function () {
layer.closeAll('tips');
});
Expand Down
2 changes: 1 addition & 1 deletion BTPanel/static/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,7 @@ function connect_io() {
socket.on('ssh_data', function (data) {
if (data === "\r服务器连接失败!\r" || data === "\r用户名或密码错误!\r") {
show_ssh_login(0);
return;
//return;
}

term.write(data);
Expand Down
6 changes: 4 additions & 2 deletions BTPanel/static/js/public_backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,15 @@ var bt =

//会话失效时自动跳转到登录页面
if (typeof (rdata) == 'string') {
if (rdata.indexOf('/static/favicon.ico') != -1 && rdata.indexOf('/static/img/qrCode.png') != -1) {
if ((rdata.indexOf('/static/favicon.ico') != -1 && rdata.indexOf('/static/img/qrCode.png') != -1) || rdata.indexOf('<!DOCTYPE html>') === 0) {
window.location.href = "/login"
return
}
}

if(callback) callback(rdata);
}).error(function () {
}).error(function (e, f) {
console.log(e,f)
if(callback) callback('error');
});
}
Expand Down
2 changes: 1 addition & 1 deletion BTPanel/templates/default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h4 class="c9 f15">{{data['lan']['S2']}}</h4>

<script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript" src="/static/js/echarts.min.js"></script>
<script type="text/javascript" src="/static/js/index.js?f={{g['version']}}"></script>
<script type="text/javascript" src="/static/js/index.js?f2={{g['version']}}"></script>
<script type="text/javascript" src="/static/js/soft.js?version={{g['version']}}"></script>
<script type="text/javascript">
$(".btpro span").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion class/plugin_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def SetupPackage(self,get):
self.WriteLogs(json.dumps({'name':'安装必要的PHP扩展','total':0,'used':0,'pre':0,'speed':0}));
import files
mfile = files.files();
if type(pinfo['php_ext']) == str : pinfo['php_ext'] = pinfo['php_ext'].strip().split(',')
if type(pinfo['php_ext']) != list : pinfo['php_ext'] = pinfo['php_ext'].strip().split(',')
for ext in pinfo['php_ext']:
if ext == 'pathinfo':
import config
Expand Down
2 changes: 2 additions & 0 deletions class/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,8 @@ def reload_mod(mod_name = None):


def de_hexb(data):
if sys.version_info[0] != 2:
if type(data) == str: data = data.encode('utf-8')
pdata = base64.b64encode(data);
if sys.version_info[0] != 2:
if type(pdata) == str: pdata = pdata.encode('utf-8')
Expand Down
1 change: 1 addition & 0 deletions class/ssh_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def send(self,c_data):
return
except:
self.close()
socketio.emit(self._room,'\r连接服务器失败!\r')
print(public.get_error_info())

def recv(self):
Expand Down

0 comments on commit 17cdd02

Please sign in to comment.