mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.1 KiB
71 lines
2.1 KiB
function alistPost(method, version, args,callback){
|
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
|
|
|
var req_data = {};
|
|
req_data['name'] = 'alist';
|
|
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 alistPostCallbak(method, version, args,callback){
|
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
|
|
|
var req_data = {};
|
|
req_data['name'] = 'alist';
|
|
req_data['func'] = method;
|
|
args['version'] = version;
|
|
|
|
if (typeof(args) == 'string'){
|
|
req_data['args'] = JSON.stringify(toArrayObject(args));
|
|
} else {
|
|
req_data['args'] = JSON.stringify(args);
|
|
}
|
|
|
|
$.post('/plugins/callback', req_data, function(data) {
|
|
layer.close(loadT);
|
|
if (!data.status){
|
|
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
|
|
return;
|
|
}
|
|
|
|
if(typeof(callback) == 'function'){
|
|
callback(data);
|
|
}
|
|
},'json');
|
|
}
|
|
|
|
|
|
function alistReadme(){
|
|
var cmd_01 = '/www/server/redis/bin/redis-cli --cluster create 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 --cluster-replicas 0';
|
|
var cmd_02 = '/www/server/redis/bin/redis-cli --cluster create 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 127.0.0.1:6382 127.0.0.1:6383 127.0.0.1:6384 --cluster-replicas 1';
|
|
|
|
|
|
var readme = '<ul class="help-info-text c7">';
|
|
readme += '<li>集群创建1</li>';
|
|
readme += '<li>'+cmd_01+'</li>';
|
|
readme += '<li>集群创建2</li>';
|
|
readme += '<li>'+cmd_02+'</li>';
|
|
readme += '</ul>';
|
|
|
|
$('.soft-man-con').html(readme);
|
|
}
|
|
|
|
|