pull/121/head
midoks 3 years ago
parent 56e6bc826c
commit d8f8cecacb
  1. 2
      plugins/mysql-ya/class/mysqlDb.py
  2. 1
      plugins/mysql-ya/conf/my8.0.cnf
  3. 5
      route/static/app/public.js
  4. 94
      route/static/app/soft.js
  5. 6
      scripts/install/centos.sh

@ -30,7 +30,7 @@ class mysqlDb:
'''连接MYSQL数据库''' '''连接MYSQL数据库'''
try: try:
import mw import mw
socket = '/www/server/mysql/mysql.sock' socket = '/www/server/mysql-ya/mysql.sock'
try: try:
import MySQLdb import MySQLdb
except Exception as ex: except Exception as ex:

@ -6,6 +6,7 @@ socket = {$SERVER_APP_PATH}/mysql.sock
default-character-set = UTF8MB4 default-character-set = UTF8MB4
[mysqld] [mysqld]
default_authentication_plugin=mysql_native_password
pid-file = {$SERVER_APP_PATH}/data/mysql.pid pid-file = {$SERVER_APP_PATH}/data/mysql.pid
user = mysql user = mysql
port = 3386 port = 3386

@ -794,10 +794,7 @@ function jump() {
function installTips() { function installTips() {
$(".fangshi label").mouseover(function() { $(".fangshi label").mouseover(function() {
var a = $(this).attr("data-title"); var a = $(this).attr("data-title");
layer.tips(a, this, { layer.tips(a, this, {tips: [1, "#787878"],time: 0});
tips: [1, "#787878"],
time: 0
})
}).mouseout(function() { }).mouseout(function() {
$(".layui-layer-tips").remove() $(".layui-layer-tips").remove()
}) })

@ -176,18 +176,30 @@ function installPreInspection(name, ver, callback){
} }
function runInstall(data){
var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post("/plugins/install", data, function(rdata) {
layer.closeAll();
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
getSList();
},'json');
installTips();
fly("bi-btn");
}
function addVersion(name, ver, type, obj, title, install_pre_inspection) { function addVersion(name, ver, type, obj, title, install_pre_inspection) {
var option = ''; var option = '';
var titlename = name; var titlename = name;
if (ver.indexOf('|') >= 0){ if (ver.indexOf('|') >= 0){
var veropt = ver.split("|"); var veropt = ver.split("|");
var SelectVersion = ''; var selectVersion = '';
for (var i = 0; i < veropt.length; i++) { for (var i = 0; i < veropt.length; i++) {
SelectVersion += '<option>' + name + ' ' + veropt[i] + '</option>'; selectVersion += '<option>' + name + ' ' + veropt[i] + '</option>';
} }
option = "<select id='SelectVersion' class='bt-input-text' style='margin-left:30px'>" + SelectVersion + "</select>"; option = "<select id='selectVersion' class='bt-input-text' style='margin-left:30px'>" + selectVersion + "</select>";
} else { } else {
option = '<span id="SelectVersion">' + name + ' ' + ver + '</span>'; option = '<span id="selectVersion">' + name + ' ' + ver + '</span>';
} }
layer.open({ layer.open({
@ -196,56 +208,38 @@ function addVersion(name, ver, type, obj, title, install_pre_inspection) {
area: '350px', area: '350px',
closeBtn: 2, closeBtn: 2,
shadeClose: true, shadeClose: true,
content: "<div class='bt-form pd20 pb70 c6'>\ btn: ['提交','关闭'],
content: "<div class='bt-form pd20 c6'>\
<div class='version line'>安装版本" + option + "</div>\ <div class='version line'>安装版本" + option + "</div>\
<div class='bt-form-submit-btn'>\ </div>",
<button type='button' class='btn btn-danger btn-sm btn-title' onclick='layer.closeAll()'>关闭</button>\ success:function(){
<button type='button' id='bi-btn' class='btn btn-success btn-sm btn-title bi-btn'>提交</button>\ $('.fangshi input').click(function() {
</div>\ $(this).attr('checked', 'checked').parent().siblings().find("input").removeAttr('checked');
</div>" });
}); },
yes:function(){
$('.fangshi input').click(function() { var info = $("#selectVersion").val().toLowerCase();
$(this).attr('checked', 'checked').parent().siblings().find("input").removeAttr('checked'); if (info == ''){
}); info = $("#selectVersion").text().toLowerCase();
$("#bi-btn").click(function() { }
var name = info.split(" ")[0];
var version = info.split(" ")[1];
var type = $('.fangshi input').prop("checked") ? '1' : '0';
var data = "name=" + name + "&version=" + version + "&type=" + type;
// console.log(data);
if (install_pre_inspection){
//安装检查
installPreInspection(name, version, function(){
runInstall(data);
});
return;
}
runInstall(data);
var info = $("#SelectVersion").val().toLowerCase(); // installTips();
if (info == ''){ // fly("bi-btn");
info = $("#SelectVersion").text().toLowerCase();
}
var name = info.split(" ")[0];
var version = info.split(" ")[1];
var type = $('.fangshi input').prop("checked") ? '1' : '0';
var data = "name=" + name + "&version=" + version + "&type=" + type;
if (install_pre_inspection){
//安装检查
installPreInspection(name,version, function(){
var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post("/plugins/install", data, function(rdata) {
layer.closeAll();
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
getSList();
},'json');
installTips();
fly("bi-btn");
});
return;
} }
var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post("/plugins/install", data, function(rdata) {
layer.closeAll();
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
getSList();
},'json');
installTips();
fly("bi-btn");
}); });
} }
//卸载软件 //卸载软件

@ -8,6 +8,7 @@ if [ ! -f /usr/bin/applydeltarpm ];then
yum -y install deltarpm yum -y install deltarpm
fi fi
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
setenforce 0 setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
@ -20,6 +21,8 @@ yum install -y vixie-cron
yum install -y curl-devel libmcrypt libmcrypt-devel yum install -y curl-devel libmcrypt libmcrypt-devel
yum install -y mysql-devel yum install -y mysql-devel
#https need #https need
if [ ! -d /root/.acme.sh ];then if [ ! -d /root/.acme.sh ];then
curl https://get.acme.sh | sh curl https://get.acme.sh | sh
@ -80,6 +83,9 @@ if [ "$?" != "0" ];then
dnf upgrade -y libmodulemd dnf upgrade -y libmodulemd
fi fi
yum install -y libzstd-devel yum install -y libzstd-devel
yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip
yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel pcre pcre-devel yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel pcre pcre-devel

Loading…
Cancel
Save