2015-12-03 15:24:34 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% load mytags %}
|
|
|
|
{% block content %}
|
|
|
|
{% include 'nav_cat_bar.html' %}
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title">
|
2015-12-04 05:42:05 +00:00
|
|
|
<span class="label label-primary"><b>{{ log.id }}</b></span>
|
2015-12-03 15:24:34 +00:00
|
|
|
<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>
|
|
|
|
<ul class="dropdown-menu dropdown-user">
|
|
|
|
</ul>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div>
|
|
|
|
<div class="text-left">
|
|
|
|
<table class="table">
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">ID</td>
|
2015-12-04 05:42:05 +00:00
|
|
|
<td>{{ log.id }}</td>
|
2015-12-03 15:24:34 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">用户名</td>
|
2015-12-04 05:42:05 +00:00
|
|
|
<td>{{ log.user }}</td>
|
2015-12-03 15:24:34 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">来源IP</td>
|
2015-12-04 05:42:05 +00:00
|
|
|
<td>{{ log.remote_ip }}</td>
|
2015-12-03 15:24:34 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-12-04 05:42:05 +00:00
|
|
|
<td class="text-navy">日期</td>
|
|
|
|
<td>{{ log.datetime|date:"Y-m-d H:i:s" }}</td>
|
2015-12-03 15:24:34 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-12-04 05:42:05 +00:00
|
|
|
<td class="text-navy">主机</td>
|
2015-12-03 15:24:34 +00:00
|
|
|
<td>
|
|
|
|
<table class="table">
|
2015-12-04 05:42:05 +00:00
|
|
|
{% for asset_name in assets_hostname %}
|
|
|
|
{% if asset_name %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ asset_name }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2015-12-03 15:24:34 +00:00
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-04 05:42:05 +00:00
|
|
|
<div class="col-sm-8">
|
2015-12-03 15:24:34 +00:00
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title">
|
2015-12-04 05:42:05 +00:00
|
|
|
<h5>结果</h5>
|
2015-12-03 15:24:34 +00:00
|
|
|
<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>
|
|
|
|
<ul class="dropdown-menu dropdown-user">
|
|
|
|
</ul>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content inspinia-timeline">
|
2015-12-04 05:42:05 +00:00
|
|
|
<div>
|
|
|
|
<div class="text-left">
|
|
|
|
<table class="table">
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">命令</td>
|
|
|
|
<td>{{ log.cmd }}</td>
|
|
|
|
</tr>
|
|
|
|
{% for result, info in result.items %}
|
|
|
|
{% for host, msg in info.items %}
|
|
|
|
{% ifequal result 'failed' %}
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy" style="color: #ed5565">{{ host }}</td>
|
|
|
|
<td>{{ msg }}</td>
|
|
|
|
</tr>
|
|
|
|
{% else %}
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">{{ host }}</td>
|
|
|
|
<td>{{ msg }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endifequal %}
|
|
|
|
{% endfor %}
|
2015-12-03 15:24:34 +00:00
|
|
|
{% endfor %}
|
2015-12-04 05:42:05 +00:00
|
|
|
</table>
|
2015-12-03 15:24:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-04 05:42:05 +00:00
|
|
|
|
|
|
|
</div>
|
2015-12-03 15:24:34 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('#show').click(function(){
|
|
|
|
$('#last').css('display', 'none');
|
|
|
|
$('#all').css('display', 'block');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|