From d4518807885d2cde1fa106aa6fb466d7b580242e Mon Sep 17 00:00:00 2001 From: "bt.cn" <287962566@qq.com> Date: Fri, 21 Jun 2019 16:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E9=94=AE=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E4=B8=AD=E5=AF=BC=E5=85=A5=E7=9A=84=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=88=A0=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BTPanel/static/js/soft.js | 18 ++++++++++++++++-- BTPanel/templates/default/firewall.html | 4 ++-- class/config.py | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/BTPanel/static/js/soft.js b/BTPanel/static/js/soft.js index 225c90fc..7e9c1492 100644 --- a/BTPanel/static/js/soft.js +++ b/BTPanel/static/js/soft.js @@ -350,17 +350,21 @@ var soft = { 简介\ 支持PHP版本\ 提供者\ - 操作\ + 操作\ \ '; for (var i = 0; i < rdata.list.length; i++) { + var remove_opt = ''; + if (rdata.list[i].id === 0) { + remove_opt = ' | 删除'; + } zbody += '' + '' + rdata.list[i].title + '' + '' + rdata.list[i].version + '' + '' + rdata.list[i].ps + '' + '' + rdata.list[i].php + '' + '' + (rdata.list[i].author == '宝塔' ? rdata.list[i].title : rdata.list[i].author) + '' - + '一键部署' + + '一键部署' + remove_opt+'' + '' } $("#softList").html(zbody); @@ -368,6 +372,16 @@ var soft = { }); }, + remove_other_dep: function (name) { + bt.show_confirm('删除自定义项目', '您真的要删除[' + name + ']吗?', function () { + var loadT = layer.msg('正在删除,请稍候...', { icon: 16, time: 0, shade: 0.3 }); + $.post('/deployment?action=DelPackage', { dname: name }, function (rdata) { + layer.close(loadT); + if (rdata.status) soft.get_dep_list(); + setTimeout(function () { layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); }, 1000); + }); + }); + }, input_package: function () { var con = '
\
英文名\ diff --git a/BTPanel/templates/default/firewall.html b/BTPanel/templates/default/firewall.html index ba19c7f2..8e9b84f9 100644 --- a/BTPanel/templates/default/firewall.html +++ b/BTPanel/templates/default/firewall.html @@ -308,7 +308,7 @@

{{data['lan']['H4']}}

content: '
' + '
' + (rdata.msg == '' ? '当前日志为空' : rdata.msg) + '
' + '
' - + '' + + '' + '' + '
' + '
' @@ -328,7 +328,7 @@

{{data['lan']['H4']}}

layer.msg(lan.public.the_get, { icon: 16, time: 0, shade: [0.3, '#000'] }); $.post('/config?action=clean_panel_error_logs', {}, function (rdata) { layer.closeAll(); - layer.msg(rdata.msg, { icon: 2 }); + layer.msg(rdata.msg, { icon: 1 }); }); } } diff --git a/class/config.py b/class/config.py index a76094a0..50c3dec0 100644 --- a/class/config.py +++ b/class/config.py @@ -900,4 +900,4 @@ def clean_panel_error_logs(self,get): filename = 'logs/error.log' public.writeFile(filename,'') public.WriteLog('面板配置','清空面板运行日志') - public.returnMsg(True,'已清空!') \ No newline at end of file + return public.returnMsg(True,'已清空!') \ No newline at end of file