pull/503/head
midoks 2 years ago
parent 9e123f067b
commit beb00d46e0
  1. 21
      plugins/mysql/index_mysql.py
  2. 10
      plugins/mysql/js/mysql.js

@ -62,6 +62,27 @@ def binLogListLook(args):
my_bin = getServerDir() + '/bin'
my_binlog_cmd = my_bin + '/mysqlbinlog'
cmd = my_binlog_cmd + ' --no-defaults ' + \
data_dir + '/' + file + '|tail -' + str(line)
data = mw.execShell(cmd)
rdata = {}
rdata['cmd'] = cmd
rdata['data'] = data[0]
return rdata
def binLogListLookDecode(args):
file = args['file']
line = args['line']
data_dir = getDataDir()
my_bin = getServerDir() + '/bin'
my_binlog_cmd = my_bin + '/mysqlbinlog'
cmd = my_binlog_cmd + ' --no-defaults --base64-output=decode-rows -vvvv ' + \
data_dir + '/' + file + '|tail -' + str(line)

@ -1315,14 +1315,14 @@ function myBinLogsRender(page){
$('#binlog_list .look').click(function(){
var i = $(this).data('index');
var file = rdata.data[i]['name'];
myBinRollingLogs('查看','binLogListLook',{'file':file },100);
// myPostCallbak('binLogListLook','',{'file':file}, function(rdata){
// console.log(rdata);
// });
});
$('#binlog_list .look_decode').click(function(){
var i = $(this).data('index');
var file = rdata.data[i]['name'];
myBinRollingLogs('查看','binLogListLookDecode',{'file':file },100);
});
});
}

Loading…
Cancel
Save