mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-18 00:41:35 +00:00
bug fix
This commit is contained in:
parent
1c9359bb4c
commit
0e3c79fb79
@ -28,20 +28,23 @@ $.fn.webSocket = function(opt){
|
|||||||
};
|
};
|
||||||
|
|
||||||
var init = function(e){
|
var init = function(e){
|
||||||
|
|
||||||
|
var socket = io.connect('ws://172.10.10.9:3000');
|
||||||
var node = $(e.target);
|
var node = $(e.target);
|
||||||
message.id = genUid();
|
message.id = genUid();
|
||||||
message.filename = node.attr('filename');
|
message.filename = node.attr('filename');
|
||||||
|
BootstrapDialog.show({message:function(){
|
||||||
BootstrapDialog.show({message:'<div id="log" style="height:300px;"></div>'});
|
var tag = $('<div id="log" style="height:300px;"></div>');
|
||||||
|
//告诉服务器端有用户登录
|
||||||
var socket = io.connect('ws://172.10.10.9:3000');
|
socket.emit('login', {userid:message.id, filename:message.filename});
|
||||||
|
socket.on('message',function(obj){
|
||||||
|
tag.append(this.escape(obj.content));
|
||||||
//告诉服务器端有用户登录
|
});
|
||||||
socket.emit('login', {userid:message.id, filename:message.filename});
|
} ,
|
||||||
socket.on('message',function(obj){
|
title:'日志',
|
||||||
$('#log').append(this.escape(obj.content));
|
onhide:function(){
|
||||||
});
|
socket.emit('disconnect');
|
||||||
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
var escape = function (html){
|
var escape = function (html){
|
||||||
@ -52,6 +55,7 @@ $.fn.webSocket = function(opt){
|
|||||||
}
|
}
|
||||||
$this.on("click",function(e){
|
$this.on("click",function(e){
|
||||||
init(e);
|
init(e);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<td><a href="/logHistory/?id={{ log.id }}" class="log_command">统计</a></td>
|
<td><a href="/logHistory/?id={{ log.id }}" class="log_command">统计</a></td>
|
||||||
<td>阻断</td>
|
<td>阻断</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td><span class='monitor' filename="{{ log.logfile }}">监控</span></td>
|
<td><a class='monitor' filename="{{ log.logfile }}">监控</a></td>
|
||||||
<td>命令统计</td>
|
<td>命令统计</td>
|
||||||
<td><a href="/killSession/?id={{ log.id }}">阻断</a> </td>
|
<td><a href="/killSession/?id={{ log.id }}">阻断</a> </td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user