Skip to content

Commit

Permalink
7.1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Feb 14, 2020
1 parent 42f171b commit 87460d1
Show file tree
Hide file tree
Showing 108 changed files with 2,454 additions and 1,432 deletions.
44 changes: 28 additions & 16 deletions BT-Panel
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,61 @@
# +-------------------------------------------------------------------
# | Author: 黄文良 <[email protected]>
# +-------------------------------------------------------------------
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'
if os.path.exists('data/ipv6.pl'):
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'
is_ssl = False
if os.path.exists('data/ssl.pl') and os.path.exists(keyfile) and os.path.exists(certfile):
is_ssl = True
if os.path.exists('data/debug.pl'):

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 is_ssl: ssl_context=(certfile,keyfile)
app.run(host=HOST,port=PORT,threaded=True,debug=True,ssl_context=ssl_context)
else:
if is_ssl:
my_ssl = {
'certfile': certfile,
'keyfile': keyfile,
'ciphers': 'ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE',
'ssl_version':ssl.OP_NO_SSLv3,
'suppress_ragged_eofs':False
}
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_SSLv3

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()
183 changes: 119 additions & 64 deletions BTPanel/__init__.py

Large diffs are not rendered by default.

87 changes: 70 additions & 17 deletions BTPanel/static/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,15 @@ html {
width: 3em;
height: 1.8em;
position: relative;
cursor: pointer
cursor: pointer;
}

.table-hover>tbody>tr:hover .btswitch+.btswitch-btn{
z-index: auto;
}
.index-item .btswitch-ios+.btswitch-btn{
z-index: auto;
}
.btswitch+.btswitch-btn:after,
.btswitch+.btswitch-btn:before {
position: relative;
Expand Down Expand Up @@ -575,7 +581,7 @@ html {
.task {
position: absolute;
right: 6px;
top: 14px;
top: 15px;
height: 20px;
width: 20px;
line-height: 20px;
Expand Down Expand Up @@ -813,15 +819,16 @@ html {
}

.sidebar-scroll .mypcip {
display: block;
display: inline-block;
padding: 0 10px;
position: relative;
transition-duration: 500ms;
transition-property: background;
transition-timing-function: ease;
width: 100%;
width: 180px;
height: 50px;
line-height: 50px;
cursor: pointer;
margin: 1px 0
}

.sidebar-scroll .mypcip:hover {
Expand All @@ -832,10 +839,10 @@ html {
.sidebar-scroll .mypcip span {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQCAYAAAAS7Y8mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAGPSURBVDiNldQ9ixRBEAbgZ3Zn1fVOuQU/wK9AMDDS1MvuRxj5CwTBP2CiYmYmGBsYGRsaa2qkkSiCgRd4y3ri3XqzbdDV7Lgs7uwLRc90V1dXv29VVymluxiiRoVkNaoYG7wN+9chpTTBBn7jKA5YhYR+JPQEDxYd6rAPeIwDnOgQuMEIz3F8mUMdC9/wqkPAxb1P0Yv/6ziLX/hTy9c6jXPYXSPwBQywF+Mz7GCCSRGMbqK1Ufwbmb4beI9TuNZFqFWoZCH7Mp0XcaX33y3dUDKfmRdD1bM+BYuoWtaEKeIdyqSvg5+RZSWX6Ri3ZUqmRbxjcqnsx3cyF7Utbpmf4YxcapXcWFNcjiSbOk7Yxhu5BocRaGBeoyXYNII32MTJsJ7cvR/D92aN1xFsFA6HYZ/iiiWjTVyVGyrhBz7jXSQxxq3wPahxJ7JuX30sd9IoshviC77KzdSmag+XYm4QNq0tF+0e7sc1SwPs4xFeLPHvt2ibsfwl24rFl/KLV/jdCho2ZC3a+I6HOB9rR38B10ZjDE49T6kAAAAASUVORK5CYII=") no-repeat 0 center;
display: inline-block;
line-height: 46px;
padding-left: 30px;
white-space: nowrap;
max-width: 146px;
padding-left: 30px;
white-space: nowrap;
min-width: 145px;
text-overflow:ellipsis;
overflow: hidden;
}

Expand Down Expand Up @@ -871,7 +878,8 @@ html {
}

.sidebar-scroll .sidebar-auto .menu {
background-color: #353d44
background-color: #353d44;
margin-top: -3px;
}

.sidebar-scroll .menu li {
Expand All @@ -882,8 +890,9 @@ html {
.sidebar-scroll .menu li a {
font-size: 15px;
color: #d6d7d9;
display: block;
display: inline-block;
line-height: 44px;
width: 180px;
padding-left: 52px;
background-repeat: no-repeat;
background-size: 16px auto;
Expand Down Expand Up @@ -1053,9 +1062,9 @@ html .menu .menu_exit:hover {

.position {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAFZSURBVDiNpdO9a1VBEAXw3zOioIUQEdFGkQdWVtr6D1ikERtRppLU6awUsUkh2CgoBNwhoPhsLESxERR7wcI2XSBNMAHRNFmLbB6Xa64RXFjYOXvmzMfOjmqt/mcd2I+QmUuZOcgbDWWQmTN4iFms4wGu4jC+RMT7wQwy8xBe4FtE3MBXPMdqE5sfLCEzj+Il3kXEE4iIJTzFFbzB9z0FMvMYJphExLPuXUQs4y1eYfmPHmTmbHN+FBGv92zMDm+ulXAzItZHtVaZeRH3sBgRn4ecOyKXcRt3dkuYwyJOZeaJfZyP42TjX1Nrne5SyqSUMu5ho559tpQy2bUP9gL8wHYnzbtYzczTuB8RHzs8/H0Sz+ETbuEDxg3f7pL6AhW/2vknNiNiCxvY6uDT8e2XMINLmbmC89js3I0z8wLOdP36Aht43KIcwULD1+w82/WGT+dk8DP96/oNlqecb6uu8YEAAAAASUVORK5CYII=");
background-position: 17px 14px;
background-position: 22px 16px;
background-repeat: no-repeat;
background-size: 20px auto;
background-size: 16px auto;
line-height: 50px;
padding-left: 30px;
}
Expand Down Expand Up @@ -2147,9 +2156,11 @@ html .menu .menu_exit:hover {
}

.softlist td img {
width: 24px;
height: 20px;
margin-right: 5px
max-width: 25px;
max-height: 25px;
margin-right: 5px;
margin-top: -1px;
margin-bottom: -1px;
}

.softlist .glyphicon-folder-open {
Expand Down Expand Up @@ -6324,4 +6335,46 @@ select[disabled]{
}
.php_info_group:last-child{
margin-bottom: 15px;
}
}

.ace_config_editor_scroll ::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.ace_config_editor_scroll ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px;
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
background : #999;
}
.ace_config_editor_scroll ::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background : #ededed;
border-radius: 5px;
}
/*外链分享 */
.checkbox_grourd input {
margin-right: 2px;
height: 16px;
width: 16px;
}
.checkbox_grourd {
height: 30px;
line-height: 32px;
margin-right: 20px;
font-size: 14px;
font-weight: initial;
color:#666;
}
.external_link button{
padding: 2px 8px;
vertical-align: sub;

}
.external_link button .icon{
font-size:17px;
}

Binary file added BTPanel/static/img/dep_ico/vatfs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-alios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-alioss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-apache.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-backup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-btgitea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-btwaf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-btwaf_httpd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BTPanel/static/img/soft_ico/ico-chafenba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-clear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-coll_admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-dns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-dns_manager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-fail2ban.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-ftp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-gcloud_storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-gdrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-gitlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-linuxsys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-load_leveling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-mail_sys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BTPanel/static/img/soft_ico/ico-masterslave.png
Binary file modified BTPanel/static/img/soft_ico/ico-memcached.png
Binary file modified BTPanel/static/img/soft_ico/ico-mongodb.png
Binary file modified BTPanel/static/img/soft_ico/ico-msg_push.png
Binary file modified BTPanel/static/img/soft_ico/ico-mysql.png
Binary file modified BTPanel/static/img/soft_ico/ico-nginx.png
Binary file added BTPanel/static/img/soft_ico/ico-openrasp.png
Binary file modified BTPanel/static/img/soft_ico/ico-pgsql_manager.png
Binary file modified BTPanel/static/img/soft_ico/ico-php.png
Binary file modified BTPanel/static/img/soft_ico/ico-phpguard.png
Binary file modified BTPanel/static/img/soft_ico/ico-phpmyadmin.png
Binary file added BTPanel/static/img/soft_ico/ico-phpok.png
Binary file modified BTPanel/static/img/soft_ico/ico-pm2.png
Binary file modified BTPanel/static/img/soft_ico/ico-psync_api.png
Binary file modified BTPanel/static/img/soft_ico/ico-pureftpd.png
Binary file modified BTPanel/static/img/soft_ico/ico-pythonmamager.png
Binary file modified BTPanel/static/img/soft_ico/ico-qiniu.png
Binary file modified BTPanel/static/img/soft_ico/ico-redis.png
Binary file modified BTPanel/static/img/soft_ico/ico-rsync.png
Binary file modified BTPanel/static/img/soft_ico/ico-safelogin.png
Binary file modified BTPanel/static/img/soft_ico/ico-score.png
Binary file modified BTPanel/static/img/soft_ico/ico-supervisor.png
Binary file modified BTPanel/static/img/soft_ico/ico-syssafe.png
Binary file modified BTPanel/static/img/soft_ico/ico-tamper_proof.png
Binary file modified BTPanel/static/img/soft_ico/ico-task_manager.png
Binary file modified BTPanel/static/img/soft_ico/ico-tomcat.png
Binary file modified BTPanel/static/img/soft_ico/ico-tomcat2.png
Binary file modified BTPanel/static/img/soft_ico/ico-total.png
Binary file modified BTPanel/static/img/soft_ico/ico-txcos.png
Binary file modified BTPanel/static/img/soft_ico/ico-upyun.png
Binary file added BTPanel/static/img/soft_ico/ico-urlpush.png
Binary file modified BTPanel/static/img/soft_ico/ico-webhook.png
Binary file modified BTPanel/static/img/soft_ico/ico-webssh.png
Loading

0 comments on commit 87460d1

Please sign in to comment.