2015-12-03 10:38:06 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% block self_head_css_js %}
|
|
|
|
<link href="/static/css/plugins/datepicker/datepicker3.css" rel="stylesheet">
|
|
|
|
<link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
|
|
|
|
<script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% include 'nav_cat_bar.html' %}
|
|
|
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
|
|
<div class="row">
|
2015-12-03 11:10:37 +00:00
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div id="ibox-content" class="ibox-title">
|
|
|
|
<h5> 批量命令日志 </h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
<a class="collapse-link">
|
|
|
|
<i class="fa fa-chevron-up"></i>
|
|
|
|
</a>
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
</a>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
2015-12-03 10:38:06 +00:00
|
|
|
</div>
|
2015-12-03 11:10:37 +00:00
|
|
|
</div>
|
2015-12-03 10:38:06 +00:00
|
|
|
|
2015-12-03 11:10:37 +00:00
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="panel-options">
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li><a href="/jlog/log_list/online/" class="text-center"><i class="fa fa-laptop"></i> 在线 </a></li>
|
|
|
|
<li><a href="/jlog/log_list/offline/" class="text-center"><i class="fa fa-bar-chart-o"></i> 历史记录 </a></li>
|
|
|
|
<li class="active"><a href="/jlog/log_list/exec/" class="text-center"><i class="fa fa-bar-chart-o"></i> 命令记录 </a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="">
|
|
|
|
<form id="search_form" method="get" action="" class="pull-right mail-search">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control input-sm" id="search_input" name="keyword" placeholder="Search">
|
|
|
|
<div class="input-group-btn">
|
|
|
|
<button id='search_btn' type="submit" class="btn btn-sm btn-primary">
|
|
|
|
-搜索-
|
|
|
|
</button>
|
2015-12-03 10:38:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-12-03 11:10:37 +00:00
|
|
|
</div>
|
|
|
|
<div class="tab-content">
|
|
|
|
<table class="table table-striped table-bordered table-hover ">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="text-center"> ID </th>
|
|
|
|
<th class="text-center"> 用户名 </th>
|
|
|
|
<th class="text-center"> 主机 </th>
|
|
|
|
<th class="text-center"> 命令 </th>
|
|
|
|
<th class="text-center"> 来源IP </th>
|
|
|
|
<th class="text-center"> 时间 </th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2015-12-03 10:38:06 +00:00
|
|
|
|
2015-12-03 11:10:37 +00:00
|
|
|
{% for post in contacts.object_list %}
|
|
|
|
<tr class="gradeX">
|
|
|
|
<td class="text-center"> {{ post.id }} </td>
|
|
|
|
<td class="text-center username"> {{ post.user }} </td>
|
|
|
|
<td class="text-center ip"> {{ post.host }} </td>
|
|
|
|
<td class="text-center ip"> {{ post.cmd }} </td>
|
|
|
|
<td class="text-center remote_ip"> {{ post.remote_ip }} </td>
|
|
|
|
<td class="text-center start_time"> {{ post.datetime|date:"Y-m-d H:i:s"}} </td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
2015-12-03 10:38:06 +00:00
|
|
|
</div>
|
2015-12-03 11:10:37 +00:00
|
|
|
{% include 'paginator.html' %}
|
|
|
|
</div>
|
2015-12-03 10:38:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function log_search(){
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
url: "/jlog/search/?env=offline",
|
|
|
|
data: $("#search_form").serialize(),
|
|
|
|
success: function (data) {
|
|
|
|
$(".tab-content").html(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|