Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Dec 17, 2024
1 parent cda412f commit 4383a20
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plugins/valkey/config/valkey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ daemonize yes
pidfile {$SERVER_PATH}/valkey/valkey.pid

bind 127.0.0.1
port 6379
port 6380
requirepass {$VALKEY_PASS}

timeout 3
Expand Down
4 changes: 2 additions & 2 deletions plugins/valkey/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ def runInfo():
cmd = getRedisCmd()
cmd = cmd + 'info'

# print(cmd)
print(cmd)
data = mw.execShell(cmd)[0]
# print(data)
print(data)
res = [
'tcp_port',
'uptime_in_days', # 已运行天数
Expand Down
17 changes: 10 additions & 7 deletions web/static/app/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,7 @@ function pluginConfigTpl(_name, version, func, config_tpl_func, read_config_tpl_
pluginConfigSave(fileName,save_callback_func);
}


var fileName = '';
$.post('/plugins/run',{name:_name, func:_config_tpl_func,version:version}, function(data){
var rdata = $.parseJSON(data.data);
Expand All @@ -2266,6 +2267,7 @@ function pluginConfigTpl(_name, version, func, config_tpl_func, read_config_tpl_
var loadT = layer.msg('配置模版获取中...',{icon:16,time:0,shade: [0.3, '#000']});

var _args = JSON.stringify({file:selected});


$.post('/plugins/run', {name:_name, func:_read_config_tpl_func,version:version,args:_args}, function(data){
layer.close(loadT);
Expand All @@ -2275,9 +2277,13 @@ function pluginConfigTpl(_name, version, func, config_tpl_func, read_config_tpl_
return;
}



$("#textBody").empty().text(rdata.data);
$(".CodeMirror").remove();
editor = CodeMirror.fromTextArea(document.getElementById("textBody"), {
lineNumbers: true,
matchBrackets:true,
extraKeys: {
"Ctrl-Space": "autocomplete",
"Ctrl-F": "findPersistent",
Expand All @@ -2288,15 +2294,12 @@ function pluginConfigTpl(_name, version, func, config_tpl_func, read_config_tpl_
"Cmd-S":function() {
saveDataFunc();
}
},
lineNumbers: true,
matchBrackets:true,
}
});
editor.focus();
$(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0});
$("#onlineEditFileBtn").unbind('click');
$("#onlineEditFileBtn").click(function(){
saveDataFunc()
$("#onlineEditFileBtn").unbind('click').click(function(){
saveDataFunc();
});
},'json');
}
Expand All @@ -2318,7 +2321,7 @@ function pluginConfigTpl(_name, version, func, config_tpl_func, read_config_tpl_
}
$("#textBody").empty().text(rdata.data.data);
$(".CodeMirror").remove();
var editor = CodeMirror.fromTextArea(document.getElementById("textBody"), {
editor = CodeMirror.fromTextArea(document.getElementById("textBody"), {
extraKeys: {
"Ctrl-Space": "autocomplete",
"Ctrl-F": "findPersistent",
Expand Down
2 changes: 1 addition & 1 deletion web/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 应用程序版本号组件
APP_RELEASE = 0
APP_REVISION = 18
APP_SMALL_VERSION = 0
APP_SMALL_VERSION = 1

# 应用程序版本后缀,例如“beta1”、“dev”。通常为空字符串GA发布
APP_SUFFIX = ''
Expand Down

0 comments on commit 4383a20

Please sign in to comment.