pull/109/head
midoks 7 years ago
parent 38310e91a0
commit d81a069d94
  1. 3
      class/core/plugin_api.py
  2. 16
      plugins/openresty/install.sh
  3. 4
      route/plugins.py
  4. 6
      static/js/soft.js

@ -8,10 +8,11 @@ import re
import json
class plugin:
class plugin_api:
__tasks = None
__plugin_dir = "plugins"
__type = "data/json/type.json"
__index = 'data/json/index.json'
setupPath = None
def __init__(self):

@ -9,27 +9,27 @@ serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/bt_install.pl
openrestyDir=${serverPath}/source/openresty
Install_openresty()
{
mkdir -p $serverPath/tmp
mkdir -p ${openrestyDir}
echo '正在安装脚本文件...' > $install_tmp
if [ ! -d $serverPath/tmp/openresty.tar.gz ];then
wget -O $serverPath/tmp/openresty.tar.gz https://openresty.org/download/openresty-1.13.6.2.tar.gz
if [ ! -f ${openrestyDir}/openresty-1.13.6.2.tar.gz ];then
wget -O ${openrestyDir}/openresty-1.13.6.2.tar.gz https://openresty.org/download/openresty-1.13.6.2.tar.gz
fi
cd $serverPath/tmp && tar -zxvf openresty.tar.gz
cd ${openrestyDir} && tar -zxvf openresty-1.13.6.2.tar.gz
mkdir -p $serverPath/openresty
cd $serverPath/tmp/openresty* && ./configure --prefix=$serverPath/openresty \
--with-openssl=$serverPath/tmp/openssl-1.0.2q && make && make install
cd ${openrestyDir}/openresty* && ./configure --prefix=$serverPath/openresty \
--with-openssl=$serverPath/source/lib/openssl-1.0.2q && make && make install
echo '安装完成' > $install_tmp
}
Uninstall_openresty()
{
rm -f $serverPath/openresty
rm -rf $serverPath/openresty
echo '卸载完成' > $install_tmp
}

@ -12,7 +12,7 @@ import json
sys.path.append("class/core")
import public
import plugin
import plugin_api
plugins = Blueprint('plugins', __name__, template_folder='templates')
@ -41,7 +41,7 @@ def file():
@plugins.route('/list', methods=['GET', 'POST'])
def list():
typeVal = request.args.get('type', '0')
data = plugin.plugin().getPluginList(typeVal, 1)
data = plugin_api.plugin_api().getPluginList(typeVal, 1)
return public.getJson(data)

@ -262,8 +262,7 @@ function oneInstall(name, version) {
closeBtn: 2,
shadeClose: true,
content: "<div class='bt-form pd20 pb70 c6'>\
<div class='version line'>" + lan.soft.install_version + "<span style='margin-left:30px'>" + name + " " + version + "</span>" + optw + "</div>\
<div class='fangshi line'>" + lan.bt.install_type + "<label data-title='" + lan.bt.install_rpm_title + "'>极速安装<input type='checkbox' checked></label><label data-title='" + lan.bt.install_src_title + "'><input type='checkbox'></label></div>\
<div class='version line'>安装版本<span style='margin-left:30px'>" + name + " " + version + "</span>" + optw + "</div>\
<div class='bt-form-submit-btn'>\
<button type='button' class='btn btn-danger btn-sm btn-title one-close'>关闭</button>\
<button type='button' id='bi-btn' class='btn btn-success btn-sm btn-title bi-btn'>提交</button>\
@ -359,8 +358,7 @@ function AddVersion(name, ver, type, obj, title) {
closeBtn: 2,
shadeClose: true,
content: "<div class='bt-form pd20 pb70 c6'>\
<div class='version line'>" + lan.soft.install_version + "<select id='SelectVersion' class='bt-input-text' style='margin-left:30px'>" + SelectVersion + "</select></div>\
<div class='fangshi line'>" + lan.bt.install_type + "<label data-title='" + lan.bt.install_rpm_title + "'>" + lan.bt.install_rpm + "<input type='checkbox' checked></label><label data-title='" + lan.bt.install_src_title + "'>" + lan.bt.install_src + "<input type='checkbox'></label></div>\
<div class='version line'>安装版本<select id='SelectVersion' class='bt-input-text' style='margin-left:30px'>" + SelectVersion + "</select></div>\
<div class='bt-form-submit-btn'>\
<button type='button' class='btn btn-danger btn-sm btn-title' onclick='layer.closeAll()'>" + lan.public.close + "</button>\
<button type='button' id='bi-btn' class='btn btn-success btn-sm btn-title bi-btn'>" + lan.public.submit + "</button>\

Loading…
Cancel
Save