mirror of https://github.com/midoks/mdserver-web
pull/205/head
parent
ccc00e8b5d
commit
0b28077e08
@ -0,0 +1,38 @@ |
||||
|
||||
|
||||
function swapPost(method, version, args,callback){ |
||||
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); |
||||
|
||||
var req_data = {}; |
||||
req_data['name'] = 'swap'; |
||||
req_data['func'] = method; |
||||
req_data['version'] = version; |
||||
|
||||
if (typeof(args) == 'string'){ |
||||
req_data['args'] = JSON.stringify(toArrayObject(args)); |
||||
} else { |
||||
req_data['args'] = JSON.stringify(args); |
||||
} |
||||
|
||||
$.post('/plugins/run', req_data, function(data) { |
||||
layer.close(loadT); |
||||
if (!data.status){ |
||||
//错误展示10S
|
||||
layer.msg(data.msg,{icon:0,time:2000,shade: [10, '#000']}); |
||||
return; |
||||
} |
||||
|
||||
if(typeof(callback) == 'function'){ |
||||
callback(data); |
||||
} |
||||
},'json');
|
||||
} |
||||
|
||||
|
||||
function readme(){ |
||||
var readme = '<ul class="help-info-text c7">'; |
||||
readme += '<li>dd if=/dev/zero of=/www/server/swap/swapfile bs=1M count=2048</li>'; |
||||
readme += '<li>mkswap /www/server/swap/swapfile</li>'; |
||||
readme += '</ul>'; |
||||
$('.soft-man-con').html(readme); |
||||
} |
Loading…
Reference in new issue