mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 19:59:26 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1a8c5c02f | ||
|
|
3ed0ceed70 | ||
|
|
6948d503c0 | ||
|
|
39bca95e62 | ||
|
|
063bc092e6 | ||
|
|
aa97982f6f | ||
|
|
af73ce7af8 | ||
|
|
e46ed828d9 | ||
|
|
f5ec3bba3d | ||
|
|
2f7ec60e89 | ||
|
|
5df4b9ee57 | ||
|
|
71dbfbf5d8 | ||
|
|
93fcdd2e27 | ||
|
|
a725220577 | ||
|
|
783c4ebc60 | ||
|
|
a06db0e8c3 | ||
|
|
d7c4dcda66 | ||
|
|
2866e1a602 | ||
|
|
77e4ee1053 |
@@ -92,16 +92,12 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
|
||||
```
|
||||
|
||||
|
||||
### 版本更新 0.10.1
|
||||
|
||||
* MySQL添加外部导入功能。
|
||||
* OpenResty添加性能调整功能。
|
||||
* 优化ubuntu22.04安装过程。
|
||||
* Debian9友好,【SSH终端 1.0】无法使用。
|
||||
* phpMyAdmin优化,需要卸载重装。
|
||||
* 文件管理解压直接覆盖FIX。
|
||||
* 优化文件多选的BUG。
|
||||
### 版本更新 0.10.2
|
||||
|
||||
* 修复上次更新的UI问题。
|
||||
* `FTP存储空间` 备份数据库修复。
|
||||
* 修复计划任务执行Python脚本的编码问题。
|
||||
* 添加,修改计划任务参数强校验。
|
||||
|
||||
### JSDelivr安装地址
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from flask import request
|
||||
|
||||
class config_api:
|
||||
|
||||
__version = '0.10.1'
|
||||
__version = '0.10.2'
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -115,6 +115,56 @@ class crontab_api:
|
||||
'id=?', (sid,)).field(self.field).find()
|
||||
return mw.getJson(data)
|
||||
|
||||
# 参数校验
|
||||
def cronCheck(self, params):
|
||||
|
||||
if params['stype'] == 'site' or params['stype'] == 'database' or params['stype'] == 'logs':
|
||||
if params['save'] == '':
|
||||
return False, '保留份数不能为空!'
|
||||
|
||||
if params['type'] == 'day':
|
||||
if params['hour'] == '':
|
||||
return False, '小时不能为空!'
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
if params['type'] == 'day-n':
|
||||
if params['where1'] == '':
|
||||
return False, '天不能为空!'
|
||||
if params['hour'] == '':
|
||||
return False, '小时不能为空!'
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
if params['type'] == 'hour':
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
if params['type'] == 'hour-n':
|
||||
if params['hour'] == '':
|
||||
return False, '小时不能为空!'
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
if params['type'] == 'minute-n':
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
if params['type'] == 'week':
|
||||
if params['hour'] == '':
|
||||
return False, '小时不能为空!'
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
if params['type'] == 'month':
|
||||
if params['where1'] == '':
|
||||
return False, '日不能为空!'
|
||||
if params['hour'] == '':
|
||||
return False, '小时不能为空!'
|
||||
if params['minute'] == '':
|
||||
return False, '分钟不能为空!'
|
||||
|
||||
return True, 'OK'
|
||||
|
||||
def modifyCrondApi(self):
|
||||
sid = request.form.get('id', '')
|
||||
iname = request.form.get('name', '')
|
||||
@@ -147,6 +197,11 @@ class crontab_api:
|
||||
'sbody': sbody,
|
||||
'urladdress': urladdress,
|
||||
}
|
||||
|
||||
is_check_pass, msg = self.cronCheck(params)
|
||||
if not is_check_pass:
|
||||
return mw.returnJson(is_check_pass, msg)
|
||||
|
||||
cuonConfig, get, name = self.getCrondCycle(params)
|
||||
cronInfo = mw.M('crontab').where(
|
||||
'id=?', (sid,)).field(self.field).find()
|
||||
@@ -210,6 +265,10 @@ class crontab_api:
|
||||
'urladdress': urladdress,
|
||||
}
|
||||
|
||||
is_check_pass, msg = self.cronCheck(params)
|
||||
if not is_check_pass:
|
||||
return mw.returnJson(is_check_pass, msg)
|
||||
|
||||
addData = self.add(params)
|
||||
if addData > 0:
|
||||
return mw.returnJson(True, '添加成功')
|
||||
@@ -419,6 +478,7 @@ class crontab_api:
|
||||
head = "#!/bin/bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n"
|
||||
|
||||
source_bin_activate = '''
|
||||
export LANG=en_US.UTF-8
|
||||
MW_PATH=%s/bin/activate
|
||||
if [ -f $MW_PATH ];then
|
||||
source $MW_PATH
|
||||
|
||||
@@ -249,7 +249,7 @@ class firewall_api:
|
||||
self.firewallReload()
|
||||
# mw.M('firewall').where(
|
||||
# "ps=?", ('SSH远程管理服务',)).setField('port', port)
|
||||
msg = mw.getInfo('改SSH端口为[{1}]成功!', port)
|
||||
msg = "改SSH端口为[{}]成功!".format(port)
|
||||
mw.writeLog("防火墙管理", msg)
|
||||
return mw.returnJson(True, '修改成功!')
|
||||
|
||||
|
||||
+1
-1
@@ -809,7 +809,7 @@ def makeConf():
|
||||
file = getRunDir() + '/data/json/config.json'
|
||||
if not os.path.exists(file):
|
||||
c = {}
|
||||
c['title'] = 'mdserver-web | linux面板'
|
||||
c['title'] = '祖龙面板'
|
||||
c['home'] = 'http://github/midoks/mdserver-web'
|
||||
c['recycle_bin'] = True
|
||||
c['template'] = 'default'
|
||||
|
||||
@@ -187,7 +187,7 @@ class FtpPSClient:
|
||||
}
|
||||
mw.writeFile(pg_file, json.dumps(progress_info))
|
||||
else:
|
||||
progress_info = json.loads(public.readFile(pg_file))
|
||||
progress_info = json.loads(mw.readFile(pg_file))
|
||||
if total_bytes == progress_info.get("total_bytes"):
|
||||
# 取远程文件大小
|
||||
_max_loop = 10
|
||||
@@ -352,7 +352,7 @@ class FtpPSClient:
|
||||
ftp.rmd(dir_name)
|
||||
return True
|
||||
except ftplib.error_perm as e:
|
||||
print(str(e) + ":" + dir_name)
|
||||
print("deleteDir:" + str(e) + ":" + dir_name)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return False
|
||||
|
||||
@@ -7,6 +7,11 @@ import time
|
||||
import re
|
||||
import json
|
||||
|
||||
# print(sys.platform)
|
||||
if sys.platform != "darwin":
|
||||
os.chdir("/www/server/mdserver-web")
|
||||
|
||||
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
import mw
|
||||
|
||||
@@ -192,10 +197,12 @@ def backupAllFunc(stype):
|
||||
prefix_dict[stype] + '_' + name
|
||||
|
||||
find_new_file = "ls " + find_path + \
|
||||
"_* | grep tar.gz | cut -d \ -f 1 | awk 'END {print}'"
|
||||
"_* | grep '.gz' | cut -d \ -f 1 | awk 'END {print}'"
|
||||
|
||||
filename = mw.execShell(find_new_file)[0].strip()
|
||||
# print("filename:", filename)
|
||||
if filename == "":
|
||||
print("not find upload file!")
|
||||
return False
|
||||
|
||||
ftp = FtpPSClient()
|
||||
ftp.uploadFile(filename, stype)
|
||||
|
||||
@@ -17,7 +17,7 @@ pluginService('clean');
|
||||
|
||||
function pRead(){
|
||||
var readme = '<ul class="help-info-text c7">';
|
||||
readme += '<li>启动后,假如到计划中[2:30]执行。</li>';
|
||||
readme += '<li>启动后,加入到计划中[2:30]执行。</li>';
|
||||
readme += '<li>【*】代表要删除。</li>';
|
||||
readme += '<li>添加/删除清除日志,可在`配置修改`中添加/删除。</li>';
|
||||
readme += '<li>如果是目录,会寻找【.log】后缀的文件清空。</li>';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"name":"op_waf",
|
||||
"type":"其他插件",
|
||||
"ps":"有效防止sql注入/xss/一句话木马等常见渗透攻击",
|
||||
"install_pre_inspection":true,
|
||||
"shell":"install.sh",
|
||||
"checks":"server/op_waf",
|
||||
"path":"server/op_waf",
|
||||
|
||||
+92
-113
@@ -26,12 +26,12 @@ function getLogs(id){
|
||||
shadeClose:false,
|
||||
closeBtn:1,
|
||||
content:'<div class="setchmod bt-form pd20 pb70">'
|
||||
+'<pre id="crontab-log" style="overflow: auto; border: 0px none; line-height:23px;padding: 15px; margin: 0px; white-space: pre-wrap; height: 405px; background-color: rgb(51,51,51);color:#f1f1f1;border-radius:0px;font-family:"></pre>'
|
||||
+'<div class="bt-form-submit-btn" style="margin-top: 0px;">'
|
||||
+'<button type="button" class="btn btn-success btn-sm" onclick="closeLogs('+id+')">清空</button>'
|
||||
+'<button type="button" class="btn btn-danger btn-sm" onclick="layer.closeAll()">关闭</button>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'<pre id="crontab-log" style="overflow: auto; border: 0px none; line-height:23px;padding: 15px; margin: 0px; white-space: pre-wrap; height: 405px; background-color: rgb(51,51,51);color:#f1f1f1;border-radius:0px;font-family:"></pre>'
|
||||
+'<div class="bt-form-submit-btn" style="margin-top: 0px;">'
|
||||
+'<button type="button" class="btn btn-success btn-sm" onclick="closeLogs('+id+')">清空</button>'
|
||||
+'<button type="button" class="btn btn-danger btn-sm" onclick="layer.closeAll()">关闭</button>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
@@ -68,26 +68,25 @@ function getCronData(page){
|
||||
}
|
||||
}
|
||||
|
||||
cbody += "<tr>\
|
||||
<td><input type='checkbox' onclick='checkSelect();' title='"+rdata.data[i].name+"' name='id' value='"+rdata.data[i].id+"'></td>\
|
||||
<td>"+rdata.data[i].name+"</td>\
|
||||
<td>"+status+"</td>\
|
||||
<td>"+rdata.data[i].type+"</td>\
|
||||
<td>"+rdata.data[i].cycle+"</td>\
|
||||
<td>"+cron_save +"</td>\
|
||||
<td>"+cron_backupto+"</td>\
|
||||
<td>"+rdata.data[i].addtime+"</td>\
|
||||
<td>\
|
||||
<a href=\"javascript:startTask("+rdata.data[i].id+");\" class='btlink'>执行</a> | \
|
||||
<a href=\"javascript:editTaskInfo('"+rdata.data[i].id+"');\" class='btlink'>编辑</a> | \
|
||||
<a href=\"javascript:getLogs("+rdata.data[i].id+");\" class='btlink'>日志</a> | \
|
||||
<a href=\"javascript:planDel("+rdata.data[i].id+" ,'"+rdata.data[i].name.replace('\\','\\\\').replace("'","\\'").replace('"','')+"');\" class='btlink'>删除</a>\
|
||||
</td>\
|
||||
</tr>";
|
||||
cbody += "<tr><td><input type='checkbox' onclick='checkSelect();' title='"+rdata.data[i].name+"' name='id' value='"+rdata.data[i].id+"'></td>\
|
||||
<td>"+rdata.data[i].name+"</td>\
|
||||
<td>"+status+"</td>\
|
||||
<td>"+rdata.data[i].type+"</td>\
|
||||
<td>"+rdata.data[i].cycle+"</td>\
|
||||
<td>"+cron_save +"</td>\
|
||||
<td>"+cron_backupto+"</td>\
|
||||
<td>"+rdata.data[i].addtime+"</td>\
|
||||
<td>\
|
||||
<a href=\"javascript:startTask("+rdata.data[i].id+");\" class='btlink'>执行</a> | \
|
||||
<a href=\"javascript:editTaskInfo('"+rdata.data[i].id+"');\" class='btlink'>编辑</a> | \
|
||||
<a href=\"javascript:getLogs("+rdata.data[i].id+");\" class='btlink'>日志</a> | \
|
||||
<a href=\"javascript:planDel("+rdata.data[i].id+" ,'"+rdata.data[i].name.replace('\\','\\\\').replace("'","\\'").replace('"','')+"');\" class='btlink'>删除</a>\
|
||||
</td>\
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
$('#cronbody').html(cbody);
|
||||
$('#softPage').html(rdata.list)
|
||||
$('#softPage').html(rdata.list);
|
||||
},'json');
|
||||
}
|
||||
|
||||
@@ -97,12 +96,18 @@ function setTaskStatus(id,status){
|
||||
if (index > 0) {
|
||||
var loadT = layer.msg('正在设置状态,请稍后...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
$.post('/crontab/set_cron_status',{id:id},function(rdata){
|
||||
layer.closeAll();
|
||||
layer.close(confirm);
|
||||
layer.msg(rdata.data,{icon:rdata.status?1:2});
|
||||
if(rdata.status) {
|
||||
getCronData(1);
|
||||
|
||||
if (!rdata.status){
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
return;
|
||||
}
|
||||
|
||||
showMsg(rdata.msg,function(){
|
||||
layer.close(loadT);
|
||||
layer.close(confirm);
|
||||
getCronData(1);
|
||||
},{icon:rdata.status?1:2},2000);
|
||||
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
@@ -110,22 +115,24 @@ function setTaskStatus(id,status){
|
||||
|
||||
//执行任务脚本
|
||||
function startTask(id){
|
||||
layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var data='id='+id;
|
||||
$.post('/crontab/start_task',data,function(rdata){
|
||||
layer.closeAll();
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
showMsg(rdata.msg, function(){
|
||||
layer.closeAll();
|
||||
},{icon:rdata.status?1:2,time:2000});
|
||||
},'json');
|
||||
}
|
||||
|
||||
|
||||
//清空日志
|
||||
function closeLogs(id){
|
||||
layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var data='id='+id;
|
||||
$.post('/crontab/del_logs',data,function(rdata){
|
||||
layer.closeAll();
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
showMsg(rdata.msg, function(){
|
||||
layer.closeAll();
|
||||
},{icon:rdata.status?1:2,time:2000});
|
||||
},'json');
|
||||
}
|
||||
|
||||
@@ -136,61 +143,13 @@ function planDel(id,name){
|
||||
var load = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var data='id='+id;
|
||||
$.post('/crontab/del',data,function(rdata){
|
||||
layer.close(load);
|
||||
showMsg(rdata.msg, function(){
|
||||
layer.closeAll();
|
||||
getCronData(1);
|
||||
},{icon:rdata.status?1:2,time:2000});
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除
|
||||
function allDeleteCron(){
|
||||
var checkList = $("input[name=id]");
|
||||
var dataList = new Array();
|
||||
for(var i=0;i<checkList.length;i++){
|
||||
if(!checkList[i].checked) continue;
|
||||
var tmp = new Object();
|
||||
tmp.name = checkList[i].title;
|
||||
tmp.id = checkList[i].value;
|
||||
dataList.push(tmp);
|
||||
}
|
||||
safeMessage('批量删除任务!',"<a style='color:red;'>"+lan.get('del_all_task',[dataList.length])+"</a>",function(){
|
||||
layer.closeAll();
|
||||
syncDeleteCron(dataList,0,'');
|
||||
});
|
||||
}
|
||||
|
||||
//模拟同步开始批量删除数据库
|
||||
function syncDeleteCron(dataList,successCount,errorMsg){
|
||||
if(dataList.length < 1) {
|
||||
layer.msg(lan.get('del_all_task_ok',[successCount]),{icon:1});
|
||||
return;
|
||||
}
|
||||
var loadT = layer.msg(lan.get('del_all_task_the',[dataList[0].name]),{icon:16,time:0,shade: [0.3, '#000']});
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/crontab?action=DelCrontab',
|
||||
data:'id='+dataList[0].id+'&name='+dataList[0].name,
|
||||
async: true,
|
||||
success:function(frdata){
|
||||
layer.close(loadT);
|
||||
if(frdata.status){
|
||||
successCount++;
|
||||
$("input[title='"+dataList[0].name+"']").parents("tr").remove();
|
||||
}else{
|
||||
if(!errorMsg){
|
||||
errorMsg = '<br><p>'+lan.crontab.del_task_err+'</p>';
|
||||
}
|
||||
errorMsg += '<li>'+dataList[0].name+' -> '+frdata.msg+'</li>'
|
||||
}
|
||||
|
||||
dataList.splice(0,1);
|
||||
syncDeleteCron(dataList,successCount,errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function isURL(str_url){
|
||||
var strRegex = '^(https|http|ftp|rtsp|mms)?://.+';
|
||||
@@ -234,15 +193,15 @@ function planAdd(){
|
||||
break;
|
||||
}
|
||||
|
||||
var where1 = $('#excode_week b').attr('val');
|
||||
$("#set-Config input[name='where1']").val(where1);
|
||||
|
||||
if(where1 > is1 || where1 < is2){
|
||||
$("#ptime input[name='where1']").focus();
|
||||
layer.msg('表单不合法,请重新输入!',{icon:2});
|
||||
return;
|
||||
}
|
||||
|
||||
where1 = $('#excode_week b').attr('val');
|
||||
$("#set-Config input[name='where1']").val(where1);
|
||||
|
||||
var hour = $("#ptime input[name='hour']").val();
|
||||
if(hour > 23 || hour < 0){
|
||||
$("#ptime input[name='hour']").focus();
|
||||
@@ -322,20 +281,32 @@ function planAdd(){
|
||||
var where1 = $("#ptime input[name='where1']").val();
|
||||
$("#set-Config input[name='where1']").val(where1);
|
||||
}
|
||||
|
||||
if (type == 'day-n'){
|
||||
var where1 = $("#ptime input[name='where1']").val();
|
||||
$("#set-Config input[name='where1']").val(where1);
|
||||
}
|
||||
|
||||
if (type == 'hour-n'){
|
||||
var where1 = $("#ptime input[name='where1']").val();
|
||||
$("#set-Config input[name='hour']").val(where1);
|
||||
}
|
||||
|
||||
$("#set-Config input[name='sName']").val(sName);
|
||||
layer.msg('正在添加,请稍候...!',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var data = $("#set-Config").serialize() + '&sBody='+sBody + '&urladdress=' + urladdress;
|
||||
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
$.post('/crontab/add',data,function(rdata){
|
||||
if(!rdata.status) {
|
||||
layer.msg(rdata.msg,{icon:2, time:2000});
|
||||
return;
|
||||
}
|
||||
layer.closeAll();
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
getCronData(1);
|
||||
|
||||
showMsg(rdata.msg, function(){
|
||||
layer.closeAll();
|
||||
getCronData(1);
|
||||
},{icon:rdata.status?1:2}, 2000);
|
||||
|
||||
},'json');
|
||||
}
|
||||
|
||||
@@ -362,25 +333,25 @@ function allAddCrontab(dataList,successCount,errorMsg){
|
||||
$("#set-Config input[name='sName']").val(dataList[0]);
|
||||
var pdata = $("#set-Config").serialize() + '&sBody=&urladdress=';
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'/crontab/add',
|
||||
data:pdata,
|
||||
async: true,
|
||||
success:function(frdata){
|
||||
layer.close(loadT);
|
||||
if(frdata.status){
|
||||
successCount++;
|
||||
getCronData(1);
|
||||
}else{
|
||||
if(!errorMsg){
|
||||
errorMsg = '<br><p>'+lan.crontab.backup_all_err+'</p>';
|
||||
}
|
||||
errorMsg += '<li>'+dataList[0]+' -> '+frdata.msg+'</li>'
|
||||
type:'POST',
|
||||
url:'/crontab/add',
|
||||
data:pdata,
|
||||
async: true,
|
||||
success:function(frdata){
|
||||
layer.close(loadT);
|
||||
if(frdata.status){
|
||||
successCount++;
|
||||
getCronData(1);
|
||||
}else{
|
||||
if(!errorMsg){
|
||||
errorMsg = '<br><p>'+lan.crontab.backup_all_err+'</p>';
|
||||
}
|
||||
|
||||
dataList.splice(0,1);
|
||||
allAddCrontab(dataList,successCount,errorMsg);
|
||||
errorMsg += '<li>'+dataList[0]+' -> '+frdata.msg+'</li>'
|
||||
}
|
||||
|
||||
dataList.splice(0,1);
|
||||
allAddCrontab(dataList,successCount,errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -829,12 +800,20 @@ function editTaskInfo(id){
|
||||
obj.from.where1 = obj.from.minute;
|
||||
obj.from.minute = '';
|
||||
}
|
||||
layer.msg('正在保存编辑内容,请稍后...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
var loadT = layer.msg('正在保存编辑内容,请稍后...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
$.post('/crontab/modify_crond',obj.from,function(rdata){
|
||||
layer.closeAll();
|
||||
getCronData(1);
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
initDropdownMenu();
|
||||
|
||||
if (!rdata.status){
|
||||
layer.msg(rdata.msg,{icon:rdata.status?1:2});
|
||||
return;
|
||||
}
|
||||
|
||||
showMsg(rdata.msg, function(){
|
||||
layer.closeAll();
|
||||
getCronData(1);
|
||||
initDropdownMenu();
|
||||
},{icon:rdata.status?1:2}, 2000);
|
||||
|
||||
},'json');
|
||||
});
|
||||
},100);
|
||||
|
||||
+10
-11
@@ -1554,28 +1554,27 @@ $("#DirPathPlace input").keyup(function(e){
|
||||
function pathPlaceBtn(path){
|
||||
var html = '';
|
||||
var title = '';
|
||||
var Dpath = path;
|
||||
if(path == '/'){
|
||||
html = '<li><a title="/">'+lan.files.path_root+'</a></li>';
|
||||
}
|
||||
else{
|
||||
Dpath = path.split("/");
|
||||
for(var i = 0; i<Dpath.length; i++ ){
|
||||
title += Dpath[i]+'/';
|
||||
Dpath[0] = lan.files.path_root;
|
||||
html += '<li><a title="'+title+'">'+Dpath[i]+'</a></li>';
|
||||
var dst_path = path.split("/");
|
||||
for(var i = 0; i<dst_path.length; i++ ){
|
||||
title += dst_path[i]+'/';
|
||||
dst_path[0] = lan.files.path_root;
|
||||
html += '<li><a title="'+title+'">'+dst_path[i]+'</a></li>';
|
||||
}
|
||||
}
|
||||
html = '<div style="width:1200px;height:26px"><ul>'+html+'</ul></div>';
|
||||
$("#PathPlaceBtn").html(html);
|
||||
$("#PathPlaceBtn ul li a").click(function(e){
|
||||
var Gopath = $(this).attr("title");
|
||||
if(Gopath.length>1){
|
||||
if(Gopath.substr(Gopath.length-1,Gopath.length) =='/'){
|
||||
Gopath = Gopath.substr(0,Gopath.length-1);
|
||||
var go_path = $(this).attr("title");
|
||||
if(go_path.length>1){
|
||||
if(go_path.substr(go_path.length-1,go_path.length) =='/'){
|
||||
Gopath = go_path.substr(0,go_path.length-1);
|
||||
}
|
||||
}
|
||||
getFiles(Gopath);
|
||||
getFiles(go_path);
|
||||
e.stopPropagation();
|
||||
});
|
||||
pathLeft();
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<li onclick="javascript:batch(4);"><a style="cursor: pointer;">删除</a></li>
|
||||
</ul>
|
||||
|
||||
<script src="/static/app/files.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/jquery-ui.min.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/jquery.contextify.min.js?v={{config.version}}"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -61,9 +61,8 @@
|
||||
<script src="/static/build/addons/fullscreen/fullscreen.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/socket.io.min.js?v={{config.version}}"></script>
|
||||
<script src="/static/build/addons/winptyCompat/winptyCompat.js?v={{config.version}}"></script>
|
||||
<script src="/static/app/public.js?v={{config.version}}"></script>
|
||||
<script src="/static/app/upload.js?v={{config.version}}"></script>
|
||||
<script src="/static/app/files.js?v={{config.version}}"></script>
|
||||
<script src="/static/app/public.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/echarts.min.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/jquery.dragsort-0.5.2.min.js?v={{config.version}}"></script>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="icon" href="/static/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
|
||||
<title>mdserver-web</title>
|
||||
<title>{{data['title']}}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/site.css?v={{config.version}}">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/login.css?v={{config.version}}">
|
||||
<style type="text/css">
|
||||
@@ -122,7 +122,7 @@
|
||||
<div class="login">
|
||||
<div class="account">
|
||||
<form class="loginform" method="post" action="/login" onsubmit="return false;">
|
||||
<div class="rlogo">mdserver-web</div>
|
||||
<div class="rlogo">{{data['title']}}</div>
|
||||
<div class="line"><input class="inputtxt" value="" name="username" datatype="*" nullmsg="请填写账户" errormsg="请填写账户" placeholder="账户" type="text"><div class="Validform_checktip"></div></div>
|
||||
<div class="line"><input class="inputtxt" name="password" value="" datatype="*" nullmsg="请填写密码" errormsg="请填写密码" placeholder="密码" type="password">
|
||||
<div class="Validform_checktip"></div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="safe bgw mtb15 pd15">
|
||||
<div class="info-title-tips">
|
||||
<p><span class="glyphicon glyphicon-alert" style="color:#f39c12; margin-right:10px;"></span>使用mw|linux面板创建站点时会自动创建权限配置,统一使用www用户。</p>
|
||||
<p><span class="glyphicon glyphicon-alert" style="color:#f39c12; margin-right:10px;"></span>创建站点时会自动创建权限配置,统一使用www用户。</p>
|
||||
</div>
|
||||
<button onclick="webAdd(0)" class="btn btn-success btn-sm btn-title" type="button">添加站点</button>
|
||||
<button onclick="siteDefaultPage();" class="btn btn-default btn-sm btn-title" type="button">修改默认页</button>
|
||||
|
||||
@@ -16,6 +16,10 @@ if grep -Eq "Debian" /etc/*-release; then
|
||||
ln -sf /bin/bash /bin/sh
|
||||
fi
|
||||
|
||||
# synchronize time first
|
||||
apt-get install ntpdate -y
|
||||
ntpdate time.nist.gov | logger -t NTP
|
||||
|
||||
apt update -y
|
||||
apt-get update -y
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
LANG=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
|
||||
if [ -f /etc/motd ];then
|
||||
|
||||
Reference in New Issue
Block a user