Skip to content

Commit f174606

Browse files
committed
File manager add drag and drop upload folder
Add website list to show SSL certificate expiration time Optimization of other functions
1 parent f7b8c3b commit f174606

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1583
-247
lines changed

BTPanel/__init__.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# +-------------------------------------------------------------------
55
# | Copyright (c) 2015-2099 宝塔软件(http://bt.cn) All rights reserved.
66
# +-------------------------------------------------------------------
7-
# | Author: 黄文良 <[email protected]>
7+
# | Author: hwliang <[email protected]>
88
# +-------------------------------------------------------------------
99
import sys
1010
import json
@@ -1159,8 +1159,11 @@ def down(token=None,fname=None):
11591159
"token":find['token'],
11601160
"expire":public.format_date(times=find['expire'])
11611161
}
1162+
session['down'] = True
11621163
return render_template('down.html',data = pdata)
1164+
11631165
if not find['password']:
1166+
session['down'] = True
11641167
session[token] = 1
11651168

11661169
if session[token] != 1:
@@ -1277,7 +1280,17 @@ def get_pd():
12771280
if tmp: tmp = int(tmp)
12781281

12791282
if ltd < 1:
1280-
if tmp == -1:
1283+
if ltd == -2:
1284+
tmp3 = public.to_string([60, 115, 112, 97, 110, 32, 99, 108, 97, 115, 115, 61, 34, 98, 116, 108, 116, 100,
1285+
45, 103, 114, 97, 121, 34, 62, 60, 115, 112, 97, 110, 32, 115, 116, 121, 108, 101,
1286+
61, 34, 99, 111, 108, 111, 114, 58, 32, 35, 102, 99, 54, 100, 50, 54, 59, 102, 111,
1287+
110, 116, 45, 119, 101, 105, 103, 104, 116, 58, 32, 98, 111, 108, 100, 59, 109, 97,
1288+
114, 103, 105, 110, 45, 114, 105, 103, 104, 116, 58, 53, 112, 120, 34, 62, 24050, 36807,
1289+
26399, 60, 47, 115, 112, 97, 110, 62, 60, 97, 32, 99, 108, 97, 115, 115, 61, 34, 98, 116,
1290+
108, 105, 110, 107, 34, 32, 111, 110, 99, 108, 105, 99, 107, 61, 34, 98, 116, 46, 115, 111,
1291+
102, 116, 46, 117, 112, 100, 97, 116, 97, 95, 108, 116, 100, 40, 41, 34, 62, 32493,
1292+
36153, 60, 47, 97, 62, 60, 47, 115, 112, 97, 110, 62])
1293+
elif tmp == -1:
12811294
tmp3 = public.to_string([60, 115, 112, 97, 110, 32, 99, 108, 97, 115, 115, 61, 34, 98,
12821295
116, 112, 114, 111, 45, 102, 114, 101, 101, 34, 32, 111, 110, 99, 108, 105, 99, 107,
12831296
61, 34, 98, 116, 46, 115, 111, 102, 116, 46, 117, 112, 100, 97, 116, 97, 95, 99,

BTPanel/static/css/site.css

+252-3
Original file line numberDiff line numberDiff line change
@@ -5787,10 +5787,8 @@ select[disabled]{
57875787
}
57885788
/* 取消按钮组 */
57895789
.ace-clear-btn {
5790-
padding: 8px 20px 15px;
5790+
padding: 15px 20px;
57915791
text-align: right;
5792-
position: absolute;
5793-
bottom: 0;
57945792
width: 100%;
57955793
}
57965794
.ace-clear-btn .btn-default:hover {
@@ -6732,4 +6730,255 @@ select[disabled]{
67326730
}
67336731
.minText{
67346732
white-space: nowrap;
6733+
}
6734+
.upload_tips_mask{
6735+
position: absolute;
6736+
z-index: 999;
6737+
background-color: #fff;
6738+
width: 100%;
6739+
left: 0;
6740+
top: 0;
6741+
height: 445px;
6742+
border: 2px dashed #e0e0e0;
6743+
text-align: center;
6744+
}
6745+
.upload_file_body{
6746+
position: relative;
6747+
}
6748+
.upload_file_body.active{
6749+
height: 445px;
6750+
border: 2px dashed #e0e0e0;
6751+
text-align: center;
6752+
}
6753+
.upload_tips_mask span,
6754+
.upload_file_body.active span{
6755+
font-size: 35px;
6756+
color: #999;
6757+
position: absolute;
6758+
width: 100%;
6759+
left: 0;
6760+
top: 50%;
6761+
margin-top: -40px;
6762+
}
6763+
.dropUpLoadFile{
6764+
position: relative;
6765+
overflow: auto;
6766+
height: 410px;
6767+
padding-top:0;
6768+
}
6769+
.dropUpLoadFile::-webkit-scrollbar {
6770+
/*滚动条整体样式*/
6771+
width : 15px; /*高宽分别对应横竖滚动条的尺寸*/
6772+
height: 1px;
6773+
}
6774+
.dropUpLoadFile::-webkit-scrollbar-thumb {
6775+
/*滚动条里面小方块*/
6776+
border-radius: 0;
6777+
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
6778+
background : #bbb;
6779+
}
6780+
.dropUpLoadFile::-webkit-scrollbar-track {
6781+
/*滚动条里面轨道*/
6782+
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
6783+
border-radius: 0;
6784+
background : #ededed;
6785+
}
6786+
.dropUpLoadFile li{
6787+
height: 40px;
6788+
line-height: 40px;
6789+
border-bottom: 1px solid #ececec;
6790+
position: relative;
6791+
}
6792+
.dropUpLoadFileHead{
6793+
border-bottom: 1px solid #dedede;
6794+
}
6795+
.dropUpLoadFileHead li.fileTitle{
6796+
border-color: #ccc;
6797+
}
6798+
.upload_btn_groud .file_upload_info{
6799+
height: 40px;
6800+
line-height: 40px;
6801+
font-size: 12px;
6802+
color: #fff;
6803+
padding-left: 5px;
6804+
font-weight: 400;
6805+
color: #3c763d;
6806+
background-color: #dff0d8;
6807+
border: 1px solid #d6e9c6;
6808+
border-radius: 2px;
6809+
position: relative;
6810+
}
6811+
.upload_btn_groud .file_upload_info .ico-tips-close{
6812+
height: 22px;
6813+
width: 22px;
6814+
background: #90bb81;
6815+
display: inline-block;
6816+
border-radius: 50%;
6817+
position: absolute;
6818+
right: 10px;
6819+
top: 50%;
6820+
margin-top: -11px;
6821+
cursor: pointer;
6822+
transition: all 500ms;
6823+
}
6824+
.upload_btn_groud .file_upload_info .ico-tips-close:hover{
6825+
background: #658859;
6826+
}
6827+
6828+
6829+
.upload_btn_groud .file_upload_info .ico-tips-close:after{
6830+
transform: rotate(45deg);
6831+
}
6832+
.upload_btn_groud .file_upload_info .ico-tips-close:before{
6833+
transform: rotate(-45deg);
6834+
}
6835+
.upload_btn_groud .file_upload_info .ico-tips-close:after,
6836+
.upload_btn_groud .file_upload_info .ico-tips-close:before{
6837+
content:'';
6838+
display: inline-block;
6839+
height: 12px;
6840+
width: 2px;
6841+
background:#ececec;
6842+
border-radius: 5px;
6843+
position: absolute;
6844+
left: 50%;
6845+
top: 50%;
6846+
margin-top: -6px;
6847+
margin-left: -1px;
6848+
}
6849+
.upload_btn_groud .file_upload_info i{
6850+
font-style: initial;
6851+
}
6852+
.upload_btn_groud .file_upload_info span{
6853+
margin-right: 10px;
6854+
font-size: 13px;
6855+
display: inline-block;
6856+
height: 38px;
6857+
line-height: 38px;
6858+
margin-right: 0;
6859+
padding-left: 10px;
6860+
}
6861+
.dropUpLoadFile li .fileItem{
6862+
position: relative;
6863+
z-index: 999;
6864+
}
6865+
.dropUpLoadFile li .fileLoading{
6866+
content: '';
6867+
width: 0%;
6868+
height: 40px;
6869+
background: #6fb9d621;
6870+
position: absolute;
6871+
left: 0;
6872+
top: 0;
6873+
transition: width 100ms;
6874+
z-index: 998;
6875+
}
6876+
.dropUpLoadFile li:hover{
6877+
cursor: pointer;
6878+
}
6879+
.upload_btn_groud .dropdown-menu{
6880+
width: 100%;
6881+
min-width: 120%;
6882+
font-size: 13px;
6883+
}
6884+
6885+
.upload_btn_groud .btn-group:hover .dropdown-menu{
6886+
display: block;
6887+
}
6888+
.dropdown-menu:before{
6889+
content: '';
6890+
width: 100%;
6891+
position: absolute;
6892+
top: -5px;
6893+
height: 5px;
6894+
}
6895+
.upload_btn_groud{
6896+
margin-bottom: 5px;
6897+
height: 40px;
6898+
line-height: 40px;
6899+
}
6900+
.upload_btn_groud .dropdown-toggle{
6901+
border-left-color: #3f51b5;
6902+
}
6903+
.upload_btn_groud .btn-primary{
6904+
background-color: #4592f0;
6905+
border-color: #367fa9;
6906+
}
6907+
.dropUpLoadFileHead li.fileTitle span{
6908+
color: #666;
6909+
font-size: 13px;
6910+
display: inline-block;
6911+
height: 35px;
6912+
line-height: 35px;
6913+
margin-right: 0;
6914+
padding-left: 10px;
6915+
font-weight: 500;
6916+
}
6917+
.dropUpLoadFileHead li.fileTitle span:nth-child(1){
6918+
width: 50%;
6919+
padding-left: 15px;
6920+
}
6921+
.dropUpLoadFileHead li.fileTitle span:nth-child(2){
6922+
width: 25%;
6923+
}
6924+
.dropUpLoadFileHead li.fileTitle span:nth-child(3){
6925+
width: 25%;
6926+
}
6927+
.dropUpLoadFile .fileItem > span{
6928+
color: #666;
6929+
font-size: 12px;
6930+
vertical-align: top;
6931+
padding-left: 10px;
6932+
height: 40px;
6933+
line-height: 40px;
6934+
display: inline-block;
6935+
}
6936+
.dropUpLoadFile li .filename{
6937+
display: inline-block;
6938+
overflow: hidden;
6939+
text-overflow: ellipsis;
6940+
white-space: nowrap;
6941+
width: 50%;
6942+
padding-left: 15px;
6943+
}
6944+
.dropUpLoadFile li .filename .ico {
6945+
height: 27px;
6946+
line-height: 27px;
6947+
background-size: 27px;
6948+
width: 25px;
6949+
vertical-align: middle;
6950+
margin-right: 10px;
6951+
float: initial;
6952+
}
6953+
.dropUpLoadFile li .filesize{
6954+
color: #999;
6955+
display: inline-block;
6956+
overflow: hidden;
6957+
text-overflow: ellipsis;
6958+
white-space: nowrap;
6959+
width: 25%;
6960+
}
6961+
.dropUpLoadFile li .fileStatus{
6962+
width: 25%;
6963+
overflow: hidden;
6964+
text-overflow: ellipsis;
6965+
white-space: nowrap;
6966+
}
6967+
.dropUpLoadFile li em{
6968+
font-style: normal;
6969+
color: #06F;
6970+
float: right;
6971+
margin-right: 10px;
6972+
}
6973+
.upload_success{
6974+
color:#20a53a !important;
6975+
}
6976+
.upload_error{
6977+
color:#F56C6C !important;
6978+
}
6979+
.upload_primary{
6980+
color:#409EFF !important;
6981+
}
6982+
.upload_warning{
6983+
color:#409EFF !important;
67356984
}

BTPanel/static/js/control.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ $.get('/ajax?action=GetCpuIo&start='+b+'&end='+e,function(rdata){
303303
for(var i = 0; i < rdata.length; i++){
304304
xData.push(rdata[i].addtime);
305305
//yData.push(rdata[i].pro);
306-
zData.push(rdata[i].mem);
306+
zData.push(rdata[i].mem.toFixed(2));
307307
}
308308
option = {
309309
tooltip: {

0 commit comments

Comments
 (0)