Skip to content
Permalink
Browse files

6.9.5

  • Loading branch information
showpy committed Jun 17, 2019
1 parent 1197870 commit 355a1a6b5b62bfd24ea9ee7f42a875f6a77240df
Showing with 20,125 additions and 8,992 deletions.
  1. +249 −7 BTPanel.pyproj
  2. +384 −121 BTPanel/__init__.py
  3. +1 −1 BTPanel/static/bootstrap-3.3.5/css/bootstrap.min.css
  4. +491 −83 BTPanel/static/css/site.css
  5. +561 −0 BTPanel/static/img/dep_ico/bfz.png
  6. BIN BTPanel/static/img/dep_ico/wordpress.png
  7. +562 −0 BTPanel/static/img/dep_ico/wp.png
  8. +561 −0 BTPanel/static/img/dep_ico/z-blog.png
  9. BIN BTPanel/static/img/soft_ico/ico-backup.png
  10. BIN BTPanel/static/img/soft_ico/ico-baidu.png
  11. BIN BTPanel/static/img/soft_ico/ico-btco.png
  12. BIN BTPanel/static/img/soft_ico/ico-clear.png
  13. BIN BTPanel/static/img/soft_ico/ico-demo.png
  14. BIN BTPanel/static/img/soft_ico/ico-disk.png
  15. BIN BTPanel/static/img/soft_ico/ico-diskquota.png
  16. BIN BTPanel/static/img/soft_ico/ico-dns_manager.png
  17. BIN BTPanel/static/img/soft_ico/ico-dnsext.png
  18. BIN BTPanel/static/img/soft_ico/ico-domains.png
  19. BIN BTPanel/static/img/soft_ico/ico-frpc.png
  20. BIN BTPanel/static/img/soft_ico/ico-idown.png
  21. BIN BTPanel/static/img/soft_ico/ico-jiokong.png
  22. BIN BTPanel/static/img/soft_ico/ico-liuliangtongji.png
  23. BIN BTPanel/static/img/soft_ico/ico-loganalyse.png
  24. BIN BTPanel/static/img/soft_ico/ico-lvs.png
  25. 0 data/8527fbc36057371eb425b559769aa218 → BTPanel/static/img/soft_ico/ico-mail.png
  26. BIN BTPanel/static/img/soft_ico/ico-mail_sys.png
  27. BIN BTPanel/static/img/soft_ico/ico-mfsearch.png
  28. BIN BTPanel/static/img/soft_ico/ico-msg_push.png
  29. BIN BTPanel/static/img/soft_ico/ico-nfsserver.png
  30. BIN BTPanel/static/img/soft_ico/ico-openfogos.png
  31. BIN BTPanel/static/img/soft_ico/ico-ossfs.png
  32. BIN BTPanel/static/img/soft_ico/ico-pgsql_manager.png
  33. BIN BTPanel/static/img/soft_ico/ico-psync_api.png
  34. BIN BTPanel/static/img/soft_ico/ico-pythonmamager.png
  35. BIN BTPanel/static/img/soft_ico/ico-qiankeji.png
  36. BIN BTPanel/static/img/soft_ico/ico-redisutil.png
  37. BIN BTPanel/static/img/soft_ico/ico-safeip.png
  38. BIN BTPanel/static/img/soft_ico/ico-sitecount.png
  39. BIN BTPanel/static/img/soft_ico/ico-sshkey.png
  40. BIN BTPanel/static/img/soft_ico/ico-syssafe.png
  41. BIN BTPanel/static/img/soft_ico/ico-tomcat2.png
  42. BIN BTPanel/static/img/soft_ico/ico-w7_assistant.png
  43. BIN BTPanel/static/img/soft_ico/ico-w7assistant.png
  44. BIN BTPanel/static/img/soft_ico/ico-webshell.png
  45. BIN BTPanel/static/img/soft_ico/ico_idown.png
  46. +8 −0 BTPanel/static/js/bootstrap-select.min.js
  47. +2 −0 BTPanel/static/js/bt_upload.js
  48. +78 −0 BTPanel/static/js/config.js
  49. +7 −3 BTPanel/static/js/control.js
  50. +19 −8 BTPanel/static/js/crontab.js
  51. +423 −0 BTPanel/static/js/database.js
  52. +238 −80 BTPanel/static/js/files.js
  53. +3 −0 BTPanel/static/js/idown_index.js
  54. +750 −0 BTPanel/static/js/index.js
  55. +283 −0 BTPanel/static/js/md5.js
  56. +51 −20 BTPanel/static/js/public.js
  57. +483 −1,339 BTPanel/static/js/public_backup.js
  58. +2,388 −2,685 BTPanel/static/js/site.js
  59. +2,186 −0 BTPanel/static/js/soft.js
  60. +10 −6 BTPanel/static/js/upload.js
  61. +17 −4 BTPanel/static/language/Simplified_Chinese/lan.js
  62. +122 −121 BTPanel/static/language/Simplified_Chinese/log.json
  63. +326 −301 BTPanel/static/language/Simplified_Chinese/public.json
  64. +3 −3 BTPanel/static/language/Simplified_Chinese/template.json
  65. +14 −5 BTPanel/templates/default/config.html
  66. +1 −1 BTPanel/templates/default/crontab.html
  67. +2 −393 BTPanel/templates/default/database.html
  68. +13 −0 BTPanel/templates/default/error.html
  69. +15 −0 BTPanel/templates/default/error2.html
  70. +4 −0 BTPanel/templates/default/files.html
  71. +101 −0 BTPanel/templates/default/files_test.html
  72. +2 −1 BTPanel/templates/default/firewall.html
  73. +1 −1 BTPanel/templates/default/ftp.html
  74. +31 −587 BTPanel/templates/default/index.html
  75. +58 −0 BTPanel/templates/default/install.html
  76. +140 −8 BTPanel/templates/default/layout.html
  77. +4 −4 BTPanel/templates/default/login.html
  78. +25 −1,622 BTPanel/templates/default/site.html
  79. +37 −252 BTPanel/templates/default/soft.html
  80. +179 −45 class/ajax.py
  81. +155 −0 class/apache.py
  82. +39 −4 class/common.py
  83. +266 −12 class/config.py
  84. +31 −12 class/crontab.py
  85. +57 −0 class/crontab_ssl.py
  86. +3 −2 class/data.py
  87. +120 −12 class/database.py
  88. +13 −12 class/datatool.py
  89. +80 −26 class/db.py
  90. +14 −5 class/downloadFile.py
  91. +297 −128 class/files.py
  92. +10 −5 class/firewalls.py
  93. +14 −2 class/jobs.py
  94. +249 −0 class/letsencrypt.py
  95. +108 −0 class/nginx.py
  96. +11 −8 class/page.py
  97. +90 −0 class/panelApi.py
  98. +20 −0 class/panelAuth.py
  99. +228 −0 class/panelAuth_backup.py
  100. +87 −0 class/panelPing.py
  101. +295 −94 class/panelPlugin.py
  102. +1,569 −0 class/panelPlugin_backup.py
  103. +40 −0 class/panelPort.py
  104. +499 −0 class/panelRedirect.py
  105. +131 −18 class/panelSSL.py
  106. +150 −0 class/panelSafe.py
  107. +1,244 −551 class/panelSite.py
  108. +454 −0 class/panelTask.py
  109. +474 −0 class/plugin_deployment.py
  110. +224 −38 class/public.py
  111. +1,010 −0 class/sewer_Usage.py
  112. +228 −0 class/sites.py
  113. +48 −11 class/system.py
  114. +4 −4 class/tomcat.py
  115. +556 −0 class/tools.py
  116. +40 −29 class/userlogin.py
  117. +9 −5 class/wxapp.py
  118. +69 −0 config/dns_api.json
  119. +1 −1 config/menu.json
  120. +0 −1 data/502Task.pl
  121. +0 −1 data/admin_path.pl
  122. 0 data/aliossAs.conf
  123. 0 data/betaAs.conf
  124. +0 −1 data/control.conf
  125. BIN data/default.db
  126. +0 −4 data/default.sql
  127. +33 −17 data/defaultDoc.html
  128. 0 data/domain.conf
  129. +0 −1 data/edate.pl
  130. +0 −88 data/fpm.json
  131. +0 −1 data/iplist.txt
  132. +0 −1 data/language.pl
  133. +0 −14 data/libList.conf
  134. 0 data/limitip.conf
  135. +1 −1 data/list.json
  136. +0 −1 data/moveTo.pl
  137. +24 −3 data/node.json
  138. +0 −1 data/os.pl
  139. +0 −1 data/osname.pl
  140. +1 −1 data/phplib.conf
  141. BIN data/plugin.db
  142. +0 −1 data/plugin.json
  143. +0 −26 data/plugin.sql
  144. +0 −1 data/product_bay.pl
  145. +0 −1 data/product_list.pl
  146. 0 data/qiniuAs.conf
  147. +0 −22 data/ruleList.conf
  148. BIN data/session.db
  149. +0 −5 data/session.sql
  150. +0 −9 data/site_list.sql
  151. +1 −1 data/softList.conf
  152. BIN data/system.db
  153. +0 −1 data/tempToken.json
  154. +0 −1 data/token.pl
  155. 0 data/txcos.conf
  156. +1 −1 data/type.json
  157. +0 −1 data/user.json
  158. +0 −1 data/userInfo.json
  159. +1 −1 data/warning.json
  160. +45 −21 init.sh
  161. +44 −1 install/public.sh
  162. +54 −0 license.txt
  163. +4 −12 rewrite/nginx/wordpress.conf
  164. +17 −8 runconfig.py
  165. +0 −1 runserver.py
  166. +5 −6 script/backup.py
  167. +1 −1 script/logsBackup
  168. +1 −1 script/logsBackup.py
  169. +8 −0 script/rememory.sh
  170. +68 −20 task.py
  171. +46 −32 tools.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more.

@@ -441,4 +441,82 @@ function bt_init() {
$('.wxapp_p .inputtxt').val("未绑定宝塔账号");
$('.wxapp_p .modify').attr("onclick", "");
}
}



function GetPanelApi() {
var loadT = layer.msg('正在获取API接口信息...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=get_token', {}, function (rdata) {
layer.close(loadT);
isOpen = rdata.open ? 'checked' : '';
layer.open({
type: 1,
area: "500px",
title: "配置面板API",
closeBtn: 2,
shift: 5,
shadeClose: false,
content: ' <div class="bt-form bt-form" style="padding:15px 25px">\
<div class="line">\
<span class="tname">API接口</span>\
<div class="info-r" style="height:28px;">\
<input class="btswitch btswitch-ios" id="panelApi_s" type="checkbox" '+ isOpen+'>\
<label style="position: relative;top: 5px;" class="btswitch-btn" for="panelApi_s" onclick="SetPanelApi(2)"></label>\
</div>\
</div>\
<div class="line">\
<span class="tname">接口密钥</span>\
<div class="info-r">\
<input disabled="disabled" name="panel_token_value" class="bt-input-text mr5 disable" type="text" style="width: 310px" value="'+rdata.token+'" disable>\
<button class="btn btn-xs btn-success btn-sm" style="margin-left: -50px;" onclick="SetPanelApi(1)">重置</button>\
</div>\
</div>\
<div class="line ">\
<span class="tname" style="overflow: initial;height:20px;line-height:20px;">IP白名单</br>(每行1个)</span>\
<div class="info-r">\
<textarea name="api_limit_addr" class="bt-input-text mr5" type="text" style="width: 310px;height:80px;line-height: 20px;padding: 5px 8px;margin-bottom:10px;">'+ rdata.limit_addr +'</textarea>\
<button class="btn btn-success btn-sm" onclick="SetPanelApi(3)">保存</button>\
</div>\
</div>\
<ul class="help-info-text c7">\
<li>开启API后,必需在IP白名单列表中的IP才能访问面板API接口</li>\
<li>接口密钥只要重置时显示1次,之后不再显示,请保管好您的密钥</li>\
<li>API接口文档在这里:<a class="btlink" href="https://www.bt.cn/bbs/thread-20376-1-1.html" target="_blank">https://www.bt.cn/bbs/thread-20376-1-1.html</a></li>\
</ul>\
</div>'
})
});
}


function SetPanelApi(t_type) {
var pdata = {}
pdata['t_type'] = t_type
if (t_type == 3) {
pdata['limit_addr'] = $("textarea[name='api_limit_addr']").val()
}
var loadT = layer.msg('正在提交...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=set_token', pdata, function (rdata) {
if (t_type == 1) {
if (rdata.status) {
$("input[name='panel_token_value']").val(rdata.msg);
layer.msg('接口密钥已生成,请保管好您的新密钥,此密钥只显示一次!', { icon: 1 });
return;
}
}

layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
if (rdata.msg == '开启成功!') {
GetPanelApi();
}
})
}

function SetIPv6() {
var loadT = layer.msg('正在配置,请稍候...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=set_ipv6_status', {}, function (rdata) {
layer.close(loadT);
bt.msg(rdata);
});
}
@@ -24,6 +24,7 @@ $(".st").hover(function(){
$(this).hide();
})
})

$(".searcTime .gt").click(function(){
$(this).addClass("on").siblings().removeClass("on");
})
@@ -392,8 +393,8 @@ function disk(b, e) {
//var zData = [];

for (var i = 0; i < rdata.length; i++) {
rData.push((rdata[i].read_bytes / 1024).toFixed(3));
wData.push((rdata[i].write_bytes / 1024).toFixed(3));
rData.push((rdata[i].read_bytes / 1024 / 60).toFixed(3));
wData.push((rdata[i].write_bytes / 1024 / 60).toFixed(3));
xData.push(rdata[i].addtime);
//yData.push(rdata[i].read_count);
//zData.push(rdata[i].write_count);
@@ -947,4 +948,7 @@ function getload(b,e){
myChartgetload.resize();
})
})
}
}

$('.btime').val(GetToday() + ' 00:00:00');
$('.etime').val(GetToday() + ' 23:59:59');
@@ -36,7 +36,7 @@ function getCronData(){
$.post('/crontab?action=GetCrontab',"",function(rdata){
layer.close(laid);
var cbody="";
if(rdata == ""){
if(rdata == []){
layer.close(laid);
cbody="<tr><td colspan='6'>"+lan.crontab.task_empty+"</td></tr>"
}
@@ -56,7 +56,7 @@ function getCronData(){
optName = ''
}
}
var arrs = ['site','database']
var arrs = ['site','database','path'];
if ($.inArray(rdata[i].sType, arrs) == -1) optName = "--";
cbody += "<tr>\
<td><input type='checkbox' onclick='checkSelect();' title='"+rdata[i].name+"' name='id' value='"+rdata[i].id+"'></td>\
@@ -122,7 +122,7 @@ function edit_task_info(id){
weekDom += '<li><a role="menuitem" href="javascript:;" value="'+ obj['weekArray'][i][0] +'">'+ obj['weekArray'][i][1] +'</a></li>';
}
if(obj.from.sType == 'site' || obj.from.sType == 'database' || obj.from.sType == 'path' || obj.from.sType == 'logs'){
$.post('/crontab?action=GetDataList',{type:obj.from.sType == 'databases'?'database':'sites'},function(rdata){
$.post('/crontab?action=GetDataList',{type:obj.from.sType == 'database'?'databases':'sites'},function(rdata){
obj.sNameArray = rdata.data;
obj.sNameArray.unshift({name:'ALL',ps:'所有'});
obj.backupsArray = rdata.orderOpt;
@@ -419,8 +419,8 @@ function planDel(id,name){
var data='id='+id;
$.post('/crontab?action=DelCrontab',data,function(rdata){
layer.closeAll();
layer.msg(rdata.msg,{icon:rdata.status?1:2});
getCronData();
getCronData();
setTimeout(function () { layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });},1000)
});
});
}
@@ -578,7 +578,7 @@ function planAdd(){
$("#set-Config input[name='sType']").val(sType);
$("#set-Config textarea[name='sBody']").val(decodeURIComponent(sBody));

if(sType == 'site' || sType == 'database'){
if(sType == 'site' || sType == 'database' || sType == 'path'){
var backupTo = $(".planBackupTo").find("b").attr("val");
$("#backupTo").val(backupTo);
}
@@ -611,8 +611,10 @@ function planAdd(){

$.post('/crontab?action=AddCrontab',data,function(rdata){
layer.closeAll();
layer.msg(rdata.msg,{icon:rdata.status?1:2});
getCronData();
getCronData();
setTimeout(function () {
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
}, 1000)
});
}

@@ -786,6 +788,15 @@ function toBackup(type){
}else{
$(".planname input[name='name']").val(sMsg+'[/www/wwwroot/]');
sOptBody = '<div class="info-r" style="display: inline-block;float: left;margin-right: 25px;"><input id="inputPath" class="bt-input-text mr5" type="text" name="path" value="/www/wwwroot/" placeholder="备份目录" style="width:208px;height:33px;"><span class="glyphicon glyphicon-folder-open cursor" onclick="ChangePath(&quot;inputPath&quot;)"></span></div>'
setCookie('default_dir_path','/www/wwwroot/');
setCookie('path_dir_change','/www/wwwroot/');
setInterval(function(){
if(getCookie('path_dir_change') != getCookie('default_dir_path')){
var path_dir_change = getCookie('path_dir_change')
$(".planname input").val('备份目录['+getCookie('path_dir_change')+']');
setCookie('default_dir_path',path_dir_change);
}
},500);
}
var orderOpt = ''
for (var i=0;i<rdata.orderOpt.length;i++){

0 comments on commit 355a1a6

Please sign in to comment.
You can’t perform that action at this time.