pull/121/head
midoks 3 years ago
parent f3c651ff6b
commit 616dd3d03f
  1. 3
      plugins/php-apt/index.py
  2. 24
      plugins/php-yum/index.py
  3. 68
      route/static/app/public.js
  4. 15
      route/static/app/soft.js

@ -624,6 +624,9 @@ def installPreInspection(version):
sys = mw.execShell(
"cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'")
if sys[1] != '':
return '不支持改系统'
sys_id = mw.execShell(
"cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'")

@ -619,18 +619,24 @@ def uninstallLib(version):
def installPreInspection(version):
sys = mw.execShell(
"cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'")
try:
sys = mw.execShell(
"cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'")
if sys[1] != '':
return '不支持该系统'
sys_id = mw.execShell(
"cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'")
sys_id = mw.execShell(
"cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'")
sysName = sys[0].strip().lower()
sysId = sys_id[0].strip()
sysName = sys[0].strip().lower()
sysId = sys_id[0].strip()
if not sysName in ('centos'):
return '暂时仅支持centos'
return 'ok'
except Exception as e:
return (str(e))
if not sysName in ('centos'):
return '暂时仅支持centos'
return 'ok'
if __name__ == "__main__":

@ -800,29 +800,55 @@ function installTips() {
})
}
function fly(a) {
// function fly(a) {
// var b = $("#task").offset();
// $("." + a).click(function(d) {
// var e = $(this);
// var c = $('<span class="yuandian"></span>');
// c.fly({
// start: {
// left: d.pageX,
// top: d.pageY
// },
// end: {
// left: b.left + 10,
// top: b.top + 10,
// width: 0,
// height: 0
// },
// onEnd: function() {
// layer.closeAll();
// layer.msg(lan.bt.task_add, {icon: 1});
// getTaskCount();
// }
// });
// });
// };
function fly(a,e) {
var b = $("#task").offset();
$("." + a).click(function(d) {
var e = $(this);
var c = $('<span class="yuandian"></span>');
c.fly({
start: {
left: d.pageX,
top: d.pageY
},
end: {
left: b.left + 10,
top: b.top + 10,
width: 0,
height: 0
},
onEnd: function() {
layer.closeAll();
layer.msg(lan.bt.task_add, {icon: 1});
getTaskCount();
}
});
var e = $("." + a);
var d = e;
var c = $('<span class="yuandian"></span>');
c.fly({
start: {
left: d.pageX,
top: d.pageY
},
end: {
left: b.left + 10,
top: b.top + 10,
width: 0,
height: 0
},
onEnd: function() {
layer.closeAll();
layer.msg(lan.bt.task_add, {icon: 1});
getTaskCount();
}
});
};
function readerTableChecked(){

@ -170,7 +170,7 @@ function installPreInspection(name, ver, callback){
layer.msg(rdata.data, { icon: 2 });
}
} else {
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
layer.msg(rdata.data, { icon: rdata.status ? 1 : 2 });
}
},'json');
@ -210,11 +210,13 @@ function addVersion(name, ver, type, obj, title, install_pre_inspection) {
<div class='version line'>安装版本" + option + "</div>\
</div>",
success:function(){
$('.fangshi input').click(function() {
$('.fangshi input').click(function() {
$(this).attr('checked', 'checked').parent().siblings().find("input").removeAttr('checked');
});
installTips();
// fly("layui-layer-btn0");
},
yes:function(){
yes:function(e){
var info = $("#selectVersion").val().toLowerCase();
if (info == ''){
info = $("#selectVersion").text().toLowerCase();
@ -228,17 +230,14 @@ function addVersion(name, ver, type, obj, title, install_pre_inspection) {
//安装检查
installPreInspection(name, version, function(){
runInstall(data);
fly("layui-layer-btn0");
fly("layui-layer-btn0",e);
});
return;
}
runInstall(data);
fly("layui-layer-btn0");
fly("layui-layer-btn0",e);
}
});
installTips();
fly("layui-layer-btn0");
}
//卸载软件

Loading…
Cancel
Save