Skip to content

Commit

Permalink
7.5.31
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Jan 5, 2021
1 parent 2124ec7 commit 2ae12d7
Show file tree
Hide file tree
Showing 117 changed files with 17,155 additions and 4,991 deletions.
1,467 changes: 809 additions & 658 deletions BTPanel/__init__.py

Large diffs are not rendered by default.

Binary file added BTPanel/static/ace/icons/iconfont.woff
Binary file not shown.
126 changes: 125 additions & 1 deletion BTPanel/static/ace/styles/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: iconfont;
src: url("../icons/iconfont.woff");
font-weight: normal;
font-style: normal;
}

.binary-icon:before {
font-family: "Octicons Regular";
font-size: 16px;
Expand Down Expand Up @@ -4939,4 +4946,121 @@
color: #6a9fb5;
font-family: octicons;
content: "\f0c9";
}
}




/* 文件目录图标 */
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.icon-houtui:before {
content: "\e60f";
}

.icon-search1:before {
content: "\e60e";
}

.icon-lishi:before {
content: "\e652";
}

.icon-shoucang:before {
content: "\e648";
}

.icon-wenjian:before {
content: "\e6ab";
}

.icon-vscode:before {
content: "\e609";
}

.icon-fenxiang:before {
content: "\e62a";
}

.icon-tishi:before {
content: "\e63f";
}

.icon-guanbi:before {
content: "\e60c";
}

.icon-favorites:before {
content: "\e66c";
}

.icon-share1:before {
content: "\e607";
}

.icon-authority:before {
content: "\e606";
}

.icon-dir_kill:before {
content: "\e643";
}

.icon-zhixiang-zuo:before {
content: "\e6fd";
}

.icon-next:before {
content: "\e772";
}

.icon-prev:before {
content: "\e7b4";
}

.icon-lajitong-copy:before {
content: "\e605";
}

.icon-xingxing:before {
content: "\e602";
}

.icon-triangle-right:before {
content: "\e601";
}

.icon-search:before {
content: "\e60d";
}

.icon-arrow-down:before {
content: "\e7b2";
}

.icon-arrow-right:before {
content: "\e743";
}

.icon-arrow-lift:before {
content: "\e744";
}

.icon-terminal:before {
content: "\e600";
}

.icon-iconfont53:before {
content: "\e75e";
}

.icon-xiala:before {
content: "\e62e";
}

1 change: 1 addition & 0 deletions BTPanel/static/css/files_style.min.css

Large diffs are not rendered by default.

2,311 changes: 2,268 additions & 43 deletions BTPanel/static/css/site.css

Large diffs are not rendered by default.

Binary file added BTPanel/static/images/iconfont-file.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/btyonghu.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/file_icon/access.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/file_icon/apk.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/file_icon/avi.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/file_icon/bmp.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/file_icon/cdr.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/file_icon/compress.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/file_icon/css.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/file_icon/doc.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/file_icon/file.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/file_icon/file_menu_icon.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/file_icon/file_text2.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/file_icon/folder.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/file_icon/folder_win10.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/file_icon/gif.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/file_icon/html.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/file_icon/ico-cmd.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/file_icon/ico.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/file_icon/image.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/file_icon/image_ico.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/file_icon/java.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/file_icon/javascript.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/file_icon/jpeg.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/file_icon/jpg.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/file_icon/json.png
Binary file added BTPanel/static/img/file_icon/log.png
Binary file added BTPanel/static/img/file_icon/lua.png
Binary file added BTPanel/static/img/file_icon/mkv.png
Binary file added BTPanel/static/img/file_icon/mov.png
Binary file added BTPanel/static/img/file_icon/mp4.png
Binary file added BTPanel/static/img/file_icon/mpeg.png
Binary file added BTPanel/static/img/file_icon/mpg.png
Binary file added BTPanel/static/img/file_icon/pdf.png
Binary file added BTPanel/static/img/file_icon/php.png
Binary file added BTPanel/static/img/file_icon/png.png
Binary file added BTPanel/static/img/file_icon/power_file_icon.png
Binary file added BTPanel/static/img/file_icon/ppt.png
Binary file added BTPanel/static/img/file_icon/py.png
Binary file added BTPanel/static/img/file_icon/python.png
Binary file added BTPanel/static/img/file_icon/rar.png
Binary file added BTPanel/static/img/file_icon/recycle.png
Binary file added BTPanel/static/img/file_icon/rm.png
Binary file added BTPanel/static/img/file_icon/rmvb.png
Binary file added BTPanel/static/img/file_icon/shell.png
Binary file added BTPanel/static/img/file_icon/sql.png
Binary file added BTPanel/static/img/file_icon/swf.png
Binary file added BTPanel/static/img/file_icon/tar.png
Binary file added BTPanel/static/img/file_icon/text_icon.png
Binary file added BTPanel/static/img/file_icon/webm.png
Binary file added BTPanel/static/img/file_icon/webp.png
Binary file added BTPanel/static/img/file_icon/wma.png
Binary file added BTPanel/static/img/file_icon/wmv.png
Binary file added BTPanel/static/img/file_icon/xls.png
Binary file added BTPanel/static/img/file_icon/xml.png
Binary file added BTPanel/static/img/file_icon/zip.png
Binary file added BTPanel/static/img/ico/bt.ico
Binary file not shown.
Binary file added BTPanel/static/img/jietu.png
Binary file added BTPanel/static/img/liaotian.png
Binary file not shown.
22 changes: 18 additions & 4 deletions BTPanel/static/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,22 @@ $('#show_recommend').click(function(){
},function(){
that.prop("checked",status);
});

})
});

$('#show_workorder').click(function(){
var status = !$(this).prop("checked"),that = $(this);
layer.confirm(status?'关闭BUG反馈,将无法实时向宝塔技术人员反馈问题?':'开启BUG反馈,实时向宝塔技术人员反馈问题?',{title:status?'关闭活动推荐':'开启活动推荐',closeBtn:2,icon:13,cancel:function(){
that.prop("checked",status);
}}, function() {
$.post('/config?action=show_workorder',function(rdata){
layer.msg(rdata.msg,{icon:rdata.status?1:2});
window.location.reload();
});
},function(){
that.prop("checked",status);
});
});

$('#panel_verification').click(function(){
var _checked = $(this).prop('checked');
if(_checked){
Expand Down Expand Up @@ -346,7 +360,6 @@ function set_auth_path() {


function syncDate() {

var loadT = layer.msg(lan.config.config_sync,{icon:16,time:0,shade: [0.3, '#000']});
$.post('/config?action=syncDate','',function(rdata){
layer.close(loadT);
Expand All @@ -363,7 +376,7 @@ function Set502(){
$.post('/config?action=Set502','',function(rdata){
layer.close(loadT);
layer.msg(rdata.msg,{icon:rdata.status?1:2});
});
});
}

//绑定修改宝塔账号
Expand Down Expand Up @@ -407,6 +420,7 @@ function UnboundBt(){
$.get("/ssl?action=DelToken",function(b){
layer.msg(b.msg,{icon:b.status? 1:2})
$("input[name='btusername']").val('');
bt.clear_cookie('bt_user_info');
})
})
}
Expand Down
88 changes: 71 additions & 17 deletions BTPanel/static/js/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ $('.time_range_submit').click(function(){
var e = (new Date($(this).parent().find(".etime").val()).getTime())/1000;
b = Math.round(b);
e = Math.round(e);
console.log(b,e);
eval($(this).attr('data-type')+'('+ b +','+ e +')');
});
//指定天数
Expand Down Expand Up @@ -280,7 +279,6 @@ $.get('/ajax?action=GetCpuIo&start='+b+'&end='+e,function(rdata){
type: 'cross'
},
formatter:function(config){
console.log(config);
return config[0].axisValueLabel +'</br>' + config[0].seriesName+':'+config[0].value.toFixed(2) +'%'
}
},
Expand Down Expand Up @@ -360,11 +358,24 @@ function disk(b, e) {
var wData = [];
var xData = [];
//var yData = [];
//var zData = [];
//var zData = [];
var unit_size = 1;
var _unit = getCookie('disk-unitType');
switch (_unit) {
case 'MB/s':
unit_size = 1024;
break;
case 'GB/s':
unit_size = 1024*1024;
break;
default:
unit_size = 1;
break;
}

for (var i = 0; i < rdata.length; i++) {
rData.push((rdata[i].read_bytes / 1024 / 60).toFixed(3));
wData.push((rdata[i].write_bytes / 1024 / 60).toFixed(3));
rData.push((rdata[i].read_bytes / 1024 / 60).toFixed(3)/unit_size);
wData.push((rdata[i].write_bytes / 1024 / 60).toFixed(3)/unit_size);
xData.push(rdata[i].addtime);
//yData.push(rdata[i].read_count);
//zData.push(rdata[i].write_count);
Expand All @@ -378,9 +389,8 @@ function disk(b, e) {
formatter:function(config){
var _config = config,_tips = '';
for(var i=0;i<config.length;i++){
_tips += '<span style="display: inline-block;width: 10px;height: 10px;margin-rigth:10px;border-radius: 50%;background: '+ config[i].color +';"></span> '+ config[i].seriesName +':'+ parseInt(config[i].data).toFixed(2) + 'KB/s' + ( config.length-1 !== i?'<br />':'')
_tips += '<span style="display: inline-block;width: 10px;height: 10px;margin-rigth:10px;border-radius: 50%;background: '+ config[i].color +';"></span> '+ config[i].seriesName +':'+ config[i].data.toFixed(2) + _unit + ( config.length-1 !== i?'<br />':'')
}
console.log(config);
return "时间:"+ _config[0].axisValue +"<br />" + _tips;
},
},
Expand All @@ -399,7 +409,7 @@ function disk(b, e) {
},
yAxis: {
type: 'value',
name: lan.index.unit + ':KB/s',
//name: lan.index.unit + ':KB/s',
boundaryGap: [0, '100%'],
splitLine: {
lineStyle: {
Expand Down Expand Up @@ -477,15 +487,27 @@ $.get('/ajax?action=GetNetWorkIo&start='+b+'&end='+e,function(rdata){
var xData = [];
var yData = [];
var zData = [];

var unit_size = 1;
var _unit = getCookie('network-unitType');
switch (_unit) {
case 'MB/s':
unit_size = 1024;
break;
case 'GB/s':
unit_size = 1024*1024;
break;
default:
unit_size = 1;
break;
}
for(var i = 0; i < rdata.length; i++){
aData.push(rdata[i].total_up);
bData.push(rdata[i].total_down);
cData.push(rdata[i].down_packets);
dData.push(rdata[i].up_packets);
xData.push(rdata[i].addtime);
yData.push(rdata[i].up);
zData.push(rdata[i].down);
yData.push(rdata[i].up/unit_size);
zData.push(rdata[i].down/unit_size);
}
option = {
tooltip: {
Expand All @@ -496,9 +518,8 @@ $.get('/ajax?action=GetNetWorkIo&start='+b+'&end='+e,function(rdata){
formatter:function(config){
var _config = config,_tips = '';
for(var i=0;i<config.length;i++){
_tips += '<span style="display: inline-block;width: 10px;height: 10px;margin-rigth:10px;border-radius: 50%;background: '+ config[i].color +';"></span> '+ config[i].seriesName +':'+ parseInt(config[i].data).toFixed(2) + 'KB/s' + ( config.length-1 !== i?'<br />':'')
_tips += '<span style="display: inline-block;width: 10px;height: 10px;margin-rigth:10px;border-radius: 50%;background: '+ config[i].color +';"></span> '+ config[i].seriesName +':'+ config[i].data.toFixed(2) + _unit + ( config.length-1 !== i?'<br />':'')
}
console.log(config);
return "时间:"+ _config[0].axisValue +"<br />" + _tips;
}
},
Expand All @@ -517,7 +538,7 @@ $.get('/ajax?action=GetNetWorkIo&start='+b+'&end='+e,function(rdata){
},
yAxis: {
type: 'value',
name: lan.index.unit+':KB/s',
//name: lan.index.unit+':KB/s',
boundaryGap: [0, '100%'],
splitLine:{
lineStyle:{
Expand Down Expand Up @@ -736,7 +757,39 @@ function getload(b,e){
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
formatter:function(config){
var _line = config[0].axisValueLabel,
line_color = '';
for (var i = 0; i < config.length; i++) {
switch (config[i].seriesName) {
case '1分钟':
line_color = 'rgb(30, 144, 255)';
break;
case '5分钟':
line_color = 'rgb(0, 178, 45)';
break;
case '15分钟':
line_color = 'rgb(147, 38, 255)';
break;
default:
line_color = 'rgb(255, 140, 0)';
break;
}
var color_line = '</br><span style="width: 8px;display: inline-block;height: 8px;background: '+line_color+';border-radius: 100px;margin-right: 7px;"></span>',
text_line = config[i].seriesName+': '+config[i].value.toFixed(2) +'%';
if (config[i].seriesName == '资源使用率') {
if (i == 0) {
_line += color_line+text_line+'</br></br>'+config[0].axisValueLabel;
} else {
_line += '</br></br>'+config[0].axisValueLabel+color_line+text_line+'</br>';
}
} else {
_line += color_line+text_line;
}
}
return _line;
}
},
legend: {
data:['1分钟','5分钟','15分钟'],
Expand Down Expand Up @@ -788,7 +841,8 @@ function getload(b,e){
],
yAxis: [{
scale: true,
name: '资源使用率%',
name: '资源使用率',
boundaryGap: [0, '100%'],
splitLine: { // y轴网格显示
show: true,
lineStyle:{
Expand Down Expand Up @@ -853,7 +907,7 @@ function getload(b,e){
}],
series: [
{
name: '资源使用率%',
name: '资源使用率',
type: 'line',
lineStyle: {
normal: {
Expand Down
1 change: 1 addition & 0 deletions BTPanel/static/js/crontab.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ function planAdd(){
$.post('/crontab?action=AddCrontab',data,function(rdata){
layer.closeAll();
getCronData();
$(".dropdown ul li:first a").click();
setTimeout(function () {
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
}, 1000)
Expand Down
Loading

0 comments on commit 2ae12d7

Please sign in to comment.