mirror of https://github.com/jumpserver/jumpserver
parent
e5121fe7ea
commit
efbcacbec6
@ -0,0 +1,35 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<form method="post" action="">
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input onclick="selectAll()" type="checkbox" name="select_all" style="select_all" id="select_all"/></th>
|
||||
<th>id</th>
|
||||
<th>用户名</th>
|
||||
<th>主机</th>
|
||||
<th>监控</th>
|
||||
<th>命令统计</th>
|
||||
<th>阻断</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in logs.object_list %}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="selected" value="{{ log.id }}"></td>
|
||||
<td>{{ log.user }}</td>
|
||||
<td>{{ log.host }}</td>
|
||||
<td><a href="#">监控</a></td>
|
||||
<td><a href="#">命令统计</a></td>
|
||||
<td><a href="#">阻断</a> </td>
|
||||
<td>{{ log.start_time|stamp2str }}</td>
|
||||
<td>{{ log.end_time|stamp2str }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<!--<button class="btn btn-primary">删除</button>-->
|
||||
</form>
|
||||
{% endblock %}
|
@ -0,0 +1,12 @@
|
||||
import time
|
||||
from django import template
|
||||
|
||||
register = template.Library
|
||||
|
||||
|
||||
@register.filter('stamp2str')
|
||||
def stamp2str(value):
|
||||
try:
|
||||
return time.strftime('%Y/%m/%d %H:%M:%S',time.localtime(value))
|
||||
except AttributeError:
|
||||
return '0000/00/00 00:00:00'
|
Loading…
Reference in new issue