pull/170/head
liuzheng712 2016-03-28 20:24:02 +08:00
parent f3d863ea45
commit 8cd6d23ff2
1 changed files with 4 additions and 3 deletions

View File

@ -109,7 +109,7 @@
<td id="remote_ip" class="text-center"> {{ post.remote_ip }} </td>
<td class="text-center"> {{ post.login_type }} </td>
<td class="text-center"><a href="{% url 'log_history' %}?id={{ post.id }}" class="log_command"> 统计 </a></td>
<td class="text-center"><a class="monitor" monitor-id="{{ post.id }}"> 监控 </a></td>
<td class="text-center"><a class="monitor" monitor-id="{{ post.id }}" file_path="{{ post.log_path }}"> 监控 </a></td>
<td class="text-center"><input type="button" id="cut" class="btn btn-danger btn-xs" name="cut" value="阻断" onclick='cut("{{ post.pid }}", "{{ post.login_type }}")' /></td>
<td class="text-center" id="start_time"> {{ post.start_time|date:"Y-m-d H:i:s" }} </td>
</tr>
@ -138,8 +138,9 @@
var endpoint = protocol + document.URL.match(RegExp('//(.*?)/'))[1] + '/ws/monitor';
var monitorid = obj.attr('monitor-id');
var socket = new WebSocket(endpoint + '?id=' + monitorid);
var file_path = obj.attr('file_path');
{# var socket = new WebSocket(endpoint + '?id=' + monitorid);#}
var socket = new WebSocket(endpoint + '?file_path=' + file_path);
var term = new Terminal({
cols: 80,
rows: 24,