Commit 3c083c94 authored by jose's avatar jose

update 6.6.7 [Add OpenLiteSpeed compatibility, optimize online editor]

parent 382daa37
# Default ignored files
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData">
<serverData>
<paths name="root@192.168.1.198:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="root@192.168.1.199:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7 (test)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/aaPanel_github.iml" filepath="$PROJECT_DIR$/.idea/aaPanel_github.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
#!/usr/bin/python
#!/www/server/panel/pyenv/bin/python
#coding: utf-8
# +-------------------------------------------------------------------
# | 宝塔Linux面板
......@@ -7,13 +7,27 @@
# +-------------------------------------------------------------------
# | Author: 黄文良 <287962566@qq.com>
# +-------------------------------------------------------------------
from gevent import monkey
from gevent import monkey,__version__ as gevent_version
monkey.patch_all()
import os,ssl
import os,sys,ssl
os.chdir('/www/server/panel')
from BTPanel import app,sys
from BTPanel import app,sys,public
if __name__ == '__main__':
pid = os.fork()
if pid: sys.exit(0)
#os.umask(0)
os.setsid()
_pid = os.fork()
if _pid:
public.writeFile('logs/panel.pid',str(_pid))
sys.exit(0)
sys.stdout.flush()
sys.stderr.flush()
f = open('data/port.pl')
PORT = int(f.read())
HOST = '0.0.0.0'
......@@ -21,21 +35,33 @@ if __name__ == '__main__':
HOST = "0:0:0:0:0:0:0:0"
f.close()
#app.threaded=True
#app.jinja_env.auto_reload = True
from gevent.pywsgi import WSGIServer
from geventwebsocket.handler import WebSocketHandler
is_debug = os.path.exists('data/debug.pl')
keyfile = 'ssl/privateKey.pem'
certfile = 'ssl/certificate.pem'
if os.path.exists('data/debug.pl'):
is_ssl = False
if os.path.exists('data/ssl.pl') and os.path.exists(keyfile) and os.path.exists(certfile):
is_ssl = True
if not is_ssl or is_debug:
err_f = open('logs/error.log','a+')
os.dup2(err_f.fileno(),sys.stderr.fileno())
err_f.close()
if is_debug:
ssl_context = None
if os.path.exists('data/ssl.pl'): ssl_context=(certfile,keyfile)
if is_ssl: ssl_context=(certfile,keyfile)
app.run(host=HOST,port=PORT,threaded=True,debug=True,ssl_context=ssl_context)
else:
if os.path.exists('data/ssl.pl'):
http_server = WSGIServer((HOST, PORT), app,handler_class=WebSocketHandler,keyfile=keyfile,certfile=certfile,log=None,error_log = None)
if is_ssl:
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_context.load_cert_chain(certfile=certfile,keyfile=keyfile)
ssl_context.options |= (ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
ssl_context.set_ciphers("ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE")
http_server = WSGIServer((HOST, PORT), app,handler_class=WebSocketHandler,ssl_context = ssl_context)
else:
http_server = WSGIServer((HOST, PORT), app,handler_class=WebSocketHandler)
http_server.serve_forever()
\ No newline at end of file
#!/www/server/panel/pyenv/bin/python
#coding: utf-8
# +-------------------------------------------------------------------
# | 宝塔Linux面板
# +-------------------------------------------------------------------
# | Copyright (c) 2015-2099 宝塔软件(http://bt.cn) All rights reserved.
# +-------------------------------------------------------------------
# | Author: 黄文良 <287962566@qq.com>
# +-------------------------------------------------------------------
import os,sys
os.chdir('/www/server/panel')
import task
task.main()
This diff is collapsed.
{"supportedModes":{"Apache_Conf":["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],"BatchFile":["bat|cmd"],"C_Cpp":["cpp|c|cc|cxx|h|hh|hpp|ino"],"CSharp":["cs"],"CSS":["css"],"Dockerfile":["^Dockerfile"],"golang":["go"],"HTML":["html|htm|xhtml|vue|we|wpy"],"Java":["java"],"JavaScript":["js|jsm|jsx"],"JSON":["json"],"JSP":["jsp"],"LESS":["less"],"Lua":["lua"],"Makefile":["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],"Markdown":["md|markdown"],"MySQL":["mysql"],"Nginx":["nginx|conf"],"INI":["ini|conf|cfg|prefs"],"ObjectiveC":["m|mm"],"Perl":["pl|pm"],"Perl6":["p6|pl6|pm6"],"pgSQL":["pgsql"],"PHP_Laravel_blade":["blade.php"],"PHP":["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],"Powershell":["ps1"],"Python":["py"],"R":["r"],"Ruby":["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],"Rust":["rs"],"SASS":["sass"],"SCSS":["scss"],"SH":["sh|bash|^.bashrc"],"SQL":["sql"],"SQLServer":["sqlserver"],"Swift":["swift"],"Text":["txt"],"Typescript":["ts|typescript|str"],"VBScript":["vbs|vb"],"Verilog":["v|vh|sv|svh"],"XML":["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],"YAML":["yaml|yml"],"Compress":["tar|zip|7z|rar|gz|arj|z"],"images":["icon|jpg|jpeg|png|bmp|gif|tif|emf"]},"nameOverrides":{"ObjectiveC":"Objective-C","CSharp":"C#","golang":"Go","C_Cpp":"C and C++","PHP_Laravel_blade":"PHP (Blade Template)","Perl6":"Perl 6"},"encodingList":["ASCII","UTF-8","GBK","GB2312","BIG5"],"themeList":["chrome","monokai"],"aceEditor":{"editorTheme":"monokai","fontSize":13,"softLabel":false,"useSoftTabs":false,"tabSize":4,"wrap":true,"enableSnippets":true,"enableLiveAutocompletion":true,"highlightActiveLine":true,"highlightSelectedWord":true,"animatedScroll":false,"showInvisibles":false,"showFoldWidgets":true,"showLineNumbers":true,"showGutter":true,"displayIndentGuides":false},"showUpdate":true}
\ No newline at end of file
This diff is collapsed.
{"fontSize":"12px","theme":"monokai"}
\ No newline at end of file
{"fontSize":"13px","theme":"monokai"}
\ No newline at end of file
......@@ -22,6 +22,12 @@
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: octicons;
src: url("../icons/octicons.woff2");
font-weight: normal;
font-style: normal;
}
.binary-icon:before {
font-family: "Octicons Regular";
font-size: 16px;
......@@ -110,12 +116,6 @@
top: 1px;
content: "\f0b0";
}
.markdown-icon:before {
font-family: "Octicons Regular";
font-size: 16px;
top: 1px;
content: "\f0c9";
}
.package-icon:before {
font-family: "Octicons Regular";
font-size: 16px;
......@@ -698,7 +698,8 @@
top: 3px;
content: "\e618";
}
.perl-icon:before {
.perl-icon:before{
color: #ff9800;
font-family: Devicons;
font-size: 16px;
top: 3px;
......@@ -4911,3 +4912,31 @@
content: "\1b6";
top: 2px;
}
.sh-icon:before{
color: #aa759f;
content: '\f0c8';
font-family: file-icons;
font-size: 14px;
}
.text-icon:before{
color: #cccccc;
content: '\f011';
font-family: octicons;
}
.compress-icon:before{
color: #46788d;
content: '\f013';
font-family: octicons;
}
.images-icon:before{
color: #d28445;
content: '\f012';
font-family: octicons;
}
.markdown-icon:before {
color: #6a9fb5;
font-family: octicons;
content: "\f0c9";
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
BTPanel/static/img/soft_ico/ico-ftp.png

515 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-ftp.png

1.61 KB | W: | H:

BTPanel/static/img/soft_ico/ico-ftp.png
BTPanel/static/img/soft_ico/ico-ftp.png
BTPanel/static/img/soft_ico/ico-ftp.png
BTPanel/static/img/soft_ico/ico-ftp.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-mysql.png

515 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-mysql.png

1.42 KB | W: | H:

BTPanel/static/img/soft_ico/ico-mysql.png
BTPanel/static/img/soft_ico/ico-mysql.png
BTPanel/static/img/soft_ico/ico-mysql.png
BTPanel/static/img/soft_ico/ico-mysql.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-nginx.png

501 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-nginx.png

1.71 KB | W: | H:

BTPanel/static/img/soft_ico/ico-nginx.png
BTPanel/static/img/soft_ico/ico-nginx.png
BTPanel/static/img/soft_ico/ico-nginx.png
BTPanel/static/img/soft_ico/ico-nginx.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-php.png

987 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-php.png

1.5 KB | W: | H:

BTPanel/static/img/soft_ico/ico-php.png
BTPanel/static/img/soft_ico/ico-php.png
BTPanel/static/img/soft_ico/ico-php.png
BTPanel/static/img/soft_ico/ico-php.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-pm2.png

1017 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-pm2.png

2.21 KB | W: | H:

BTPanel/static/img/soft_ico/ico-pm2.png
BTPanel/static/img/soft_ico/ico-pm2.png
BTPanel/static/img/soft_ico/ico-pm2.png
BTPanel/static/img/soft_ico/ico-pm2.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-rsync.png

996 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-rsync.png

1.11 KB | W: | H:

BTPanel/static/img/soft_ico/ico-rsync.png
BTPanel/static/img/soft_ico/ico-rsync.png
BTPanel/static/img/soft_ico/ico-rsync.png
BTPanel/static/img/soft_ico/ico-rsync.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-score.png

608 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-score.png

1.97 KB | W: | H:

BTPanel/static/img/soft_ico/ico-score.png
BTPanel/static/img/soft_ico/ico-score.png
BTPanel/static/img/soft_ico/ico-score.png
BTPanel/static/img/soft_ico/ico-score.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-syssafe.png

1007 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-syssafe.png

1.68 KB | W: | H:

BTPanel/static/img/soft_ico/ico-syssafe.png
BTPanel/static/img/soft_ico/ico-syssafe.png
BTPanel/static/img/soft_ico/ico-syssafe.png
BTPanel/static/img/soft_ico/ico-syssafe.png
  • 2-up
  • Swipe
  • Onion skin
BTPanel/static/img/soft_ico/ico-webssh.png

659 Bytes | W: | H:

BTPanel/static/img/soft_ico/ico-webssh.png

1.42 KB | W: | H:

BTPanel/static/img/soft_ico/ico-webssh.png
BTPanel/static/img/soft_ico/ico-webssh.png
BTPanel/static/img/soft_ico/ico-webssh.png
BTPanel/static/img/soft_ico/ico-webssh.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -100,12 +100,12 @@ var database = {
layer.open({
type: 1,
title: lan.database.mysql_tools_box+"" + db_name + "",
area: ['780px', '580px'],
area: ['824px', '580px'],
closeBtn: 2,
shadeClose: false,
content: '<div class="pd15">\
content: '<div class="plr15 mt10">\
<div class="db_list">\
<span><a>'+lan.database.db_name+''+ db_name + '</a>\
<span><a style="width: 205px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block;vertical-align: bottom;margin-right: 11px;" title="'+ db_name + '">'+lan.database.db_name+''+ db_name + '</a>\
<a class="tools_size">'+lan.database.size+''+ rdata.data_size + '</a></span>\
<span id="db_tools" style="float: right;"></span>\
</div >\
......@@ -118,7 +118,7 @@ var database = {
<th>'+lan.database.tb_name+'</th>\
<th>'+lan.database.engine+'</th>\
<th>'+lan.database.character+'</th>\
<th>'+lan.database.row_num+'</th>\
<th width="80">'+lan.database.row_num+'</th>\
<th>'+lan.database.size+'</th>\
<th style="text-align: right;">'+lan.database.operation+'</th>\
</tr>\
......@@ -324,6 +324,7 @@ var database = {
$('#btn_data_backup').unbind('click').click(function () {
bt.database.backup_data(id, dataname, function (rdata) {
if (rdata.status) database.database_detail(id, dataname);
database.get_list();
})
})
}, 100)
......
This diff is collapsed.
......@@ -127,15 +127,15 @@ var index = {
})
_this.get_data_info(function (loadbox, rdata) {
loadbox.hover(function () {
loadbox.find('.cicle').hover(function () {
var _this = $(this);
var d = _this.parents('ul').data('data').load;
layer.tips(lan.index.avg_load_atlast_onemin + d.one + '</br>'+ lan.index.avg_load_atlast_fivemin + d.five + '</br>'+ lan.index.avg_load_atlast_fifteenmin + d.fifteen + '', _this.find('.cicle'), { time: 0, tips: [1, '#999'] });
layer.tips(lan.index.avg_load_atlast_onemin + d.one + '</br>'+ lan.index.avg_load_atlast_fivemin + d.five + '</br>'+ lan.index.avg_load_atlast_fifteenmin + d.fifteen + '', _this, { time: 0, tips: [1, '#999'] });
}, function () {
layer.closeAll('tips');
})
$('.cpubox').hover(function () {
$('.cpubox').find('.cicle').hover(function () {
var _this = $(this);
var d = _this.parents('ul').data('data').cpu;
var crs = '';
......@@ -511,7 +511,7 @@ var index = {
content: '<div class="setchmod bt-form" style="padding-bottom:50px;">\
<div class="update_title"><i class="layui-layer-ico layui-layer-ico0"></i><span>'+lan.index.have_new_version+'</span></div>\
<div class="update_conter">\
<div class="update_version">'+lan.index.last_version+'<a href="https://forum.aapanel.com/d/9-aapanel-linux-panel-6-1-5-installation-tutorial/36" target="_blank" class="btlink" title="'+lan.index.check_version_log+'">'+lan.index.bt_linux+ (is_beta === 1 ? lan.index.test_version : lan.index.final_version) + rdata.version + '</a>&nbsp;&nbsp;'+lan.index.update_date + (result.msg.is_beta == 1 ? result.msg.beta.uptime : result.msg.uptime) + '</div>\
<div class="update_version">'+lan.index.last_version+'<a href="https://forum.aapanel.com/d/9-aapanel-linux-panel-6-1-5-installation-tutorial/36" target="_blank" class="btlink" title="'+lan.index.check_version_log+'">'+lan.index.bt_linux+ (is_beta === 1 ? lan.index.test_version : lan.index.final_version) + rdata.version + '</a></br>'+lan.index.update_date + (result.msg.is_beta == 1 ? result.msg.beta.uptime : result.msg.uptime) + '</div>\
<div class="update_logs">'+ rdata.updateMsg + '</div>\
</div>\
<!--div class="update_conter">\
......@@ -524,7 +524,7 @@ var index = {
</div>\
</div>\
<style>\
.update_title{overflow: hidden;position: relative;vertical-align: middle;margin-top: 10px;}.update_title .layui-layer-ico{display: block;left: 60px !important;top: 1px !important;}.update_title span{display: inline-block;color: #333;height: 30px;margin-left: 105px;margin-top: 3px;font-size: 20px;}.update_conter{background: #f9f9f9;border-radius: 4px;padding: 20px;margin: 15px 37px;margin-top: 15px;}.update_version{font-size: 13.5px; margin-bottom: 10px;font-weight: 600;}.update_logs{margin-bottom:10px;}.update_tips{font-size: 13px;color:#666;}.update_conter span{display: block;font-size:13px;color:#666}\
.update_title{overflow: hidden;position: relative;vertical-align: middle;margin-top: 10px;}.update_title .layui-layer-ico{display: block;left: 71px !important;top: 1px !important;}.update_title span{display: inline-block;color: #333;height: 30px;margin-left: 117px;margin-top: 3px;font-size: 20px;}.update_conter{background: #f9f9f9;border-radius: 4px;padding: 20px;margin: 15px 37px;margin-top: 15px;}.update_version{font-size: 13.5px; margin-bottom: 10px;font-weight: 600;}.update_logs{margin-bottom:10px;}.update_tips{font-size: 13px;color:#666;}.update_conter span{display: block;font-size:13px;color:#666}\
</style>'
});
}
......@@ -534,7 +534,7 @@ var index = {
layer.closeAll();
bt.system.to_update(function (rdata) {
if (rdata.status) {
bt.msg({ msg: lan.index.update_ok, icon: 1 })
bt.msg({ msg: rdata.msg, icon: 1 })
$("#btversion").html(rdata.version);
$("#toUpdate").html('');
bt.system.reload_panel();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment