2015-04-20 02:12:11 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% load mytags %}
|
2015-11-08 14:39:30 +00:00
|
|
|
{% load humanize %}
|
2015-04-20 02:12:11 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% include 'nav_cat_bar.html' %}
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title">
|
2015-09-08 16:19:17 +00:00
|
|
|
<span class="text text-primary"><b>{{ asset.ip }}</b></span>
|
2015-04-20 02:12:11 +00:00
|
|
|
<div class="ibox-tools">
|
2015-11-22 15:53:25 +00:00
|
|
|
<a class="" href="/jasset/asset_update/?id={{ asset.id }}">
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
</a>
|
2015-04-20 02:12:11 +00:00
|
|
|
<a class="collapse-link">
|
|
|
|
<i class="fa fa-chevron-up"></i>
|
|
|
|
</a>
|
2015-11-22 15:53:25 +00:00
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
</a>
|
2015-04-20 02:12:11 +00:00
|
|
|
<ul class="dropdown-menu dropdown-user">
|
|
|
|
</ul>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content ibox-heading">
|
|
|
|
<h3>主机详细信息</h3>
|
|
|
|
<small><i class="fa fa-map-marker"></i> 此主机详细信息.</small>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div>
|
|
|
|
<div class="text-left">
|
|
|
|
<table class="table">
|
2015-11-03 09:07:46 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">主机名</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.hostname|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
2015-11-22 10:57:47 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">IP</td>
|
|
|
|
<td>{{ asset.ip|default_if_none:"" }}</td>
|
|
|
|
</tr>
|
2015-11-14 15:09:13 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">其他IP</td>
|
|
|
|
<td>
|
|
|
|
<table class="table">
|
|
|
|
{% if asset.other_ip %}
|
|
|
|
{% for ip in asset.other_ip|ip_str_to_list %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ ip }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2015-11-03 09:07:46 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">远控IP</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.remote_ip|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
2015-04-20 02:12:11 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">端口</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.port|default_if_none:"" }}</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
</tr>
|
2015-09-08 16:19:17 +00:00
|
|
|
|
2015-04-20 02:12:11 +00:00
|
|
|
<tr>
|
2015-09-08 16:19:17 +00:00
|
|
|
<td class="text-navy">主机组</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
<td>
|
|
|
|
<table class="table">
|
2015-11-03 09:07:46 +00:00
|
|
|
{% for asset_group in asset.group.all %}
|
|
|
|
<tr>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset_group.name|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2015-04-20 02:12:11 +00:00
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-09-08 16:19:17 +00:00
|
|
|
<td class="text-navy">使用默认管理账号</td>
|
2015-11-08 14:39:30 +00:00
|
|
|
{# <td>{{ asset.use_default_auth|bool2str }}</td>#}
|
|
|
|
<td>{{ asset.use_default_auth|bool2str }} {% if not asset.use_default_auth %} <span class="text-info">{{ asset.username }}</span> {% endif %}</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
</tr>
|
2015-11-03 09:07:46 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">机房</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.idc.name|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">硬件厂商型号</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.brand|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">CPU</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.cpu|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">内存</td>
|
2015-11-19 13:58:44 +00:00
|
|
|
<td>{{ asset.memory|default_if_none:"" }}{% if asset.memory %}M{% endif %}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">硬盘</td>
|
2015-11-14 15:09:13 +00:00
|
|
|
<td>
|
|
|
|
<table class="table">
|
|
|
|
{% if asset.disk %}
|
|
|
|
{% for disk, value in asset.disk|str_to_dic %}
|
|
|
|
<tr>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td><span class="text-navy">{{ disk|default_if_none:"" }}</span>     {{ value|default_if_none:"" }}</td>
|
2015-11-14 15:09:13 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
|
|
|
</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">资产编号</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.number|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">SN</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.sn|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">主机类型</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.get_asset_type_display|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
2015-11-14 15:09:13 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">系统版本</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.system_type|default_if_none:"" }} {{ asset.system_version|default_if_none:"" }}</td>
|
2015-11-14 15:09:13 +00:00
|
|
|
</tr>
|
2015-11-03 09:07:46 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">运行环境</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.get_env_display|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">机器状态</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.get_status_display|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">机柜号</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.cabinet|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">机柜位置</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.position|default_if_none:"" }}</td>
|
2015-11-03 09:07:46 +00:00
|
|
|
</tr>
|
2015-04-20 02:12:11 +00:00
|
|
|
<tr>
|
|
|
|
<td class="text-navy">激活</td>
|
2015-09-08 16:19:17 +00:00
|
|
|
<td>{{ asset.is_active|bool2str }}</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">添加日期</td>
|
2015-09-08 16:19:17 +00:00
|
|
|
<td>{{ asset.date_added|date:"Y-m-d H:i:s" }}</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-navy">备注</td>
|
2015-11-17 15:34:13 +00:00
|
|
|
<td>{{ asset.comment|default_if_none:"" }}</td>
|
2015-04-20 02:12:11 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div 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>
|
|
|
|
<ul class="dropdown-menu dropdown-user">
|
|
|
|
</ul>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content ibox-heading">
|
|
|
|
<h3>主机所有授权的用户</h3>
|
|
|
|
<small><i class="fa fa-map-marker"></i> 包含了此主机所有授权的用户.</small>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div>
|
2015-11-08 14:39:30 +00:00
|
|
|
{# <div class="text-left">#}
|
|
|
|
{# <table class="table">#}
|
2015-09-08 16:19:17 +00:00
|
|
|
{# {% if user_permed_list %}#}
|
|
|
|
{# {% for user in user_permed_list %}#}
|
|
|
|
{# <tr>#}
|
|
|
|
{# <td class="text-navy">{{ user.name }}</td>#}
|
|
|
|
{# <td>{{ user.dept.name }}</td>#}
|
|
|
|
{# <td><a href="/juser/user_detail/?id={{ user.id }}">详情</a></td>#}
|
|
|
|
{# </tr>#}
|
|
|
|
{# {% endfor %}#}
|
|
|
|
{# {% else %}#}
|
|
|
|
{# <p class="text-center">(暂无)</p>#}
|
|
|
|
{# {% endif %}#}
|
2015-11-08 14:39:30 +00:00
|
|
|
{# </table>#}
|
|
|
|
{# </div>#}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-title">
|
|
|
|
<h5>主机修改记录</h5>
|
2015-11-21 10:28:25 +00:00
|
|
|
<a href="/jasset/asset_edit/?id={{ asset.id }}" data-toggle="tooltip" class="text-success pull-center" data-placement="bottom" title="修改">    点击修改</a>
|
2015-11-08 14:39:30 +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 ibox-heading">
|
|
|
|
<h3>主机修改记录</h3>
|
|
|
|
<small><i class="fa fa-map-marker"></i> 包含了此主机所有历史修改记录.</small>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="feed-activity-list">
|
|
|
|
{% if asset_record %}
|
|
|
|
{% for r in asset_record %}
|
|
|
|
<div class="feed-element">
|
|
|
|
<div>
|
|
|
|
<small class="pull-right">{{ r.alert_time|naturaltime }}</small>
|
|
|
|
<strong class="text-navy">{{ r.username }}</strong>
|
|
|
|
{% for i in r.content|str_to_list %}
|
|
|
|
<div>{{ i.0 }} 由 <span class="text-success">{{ i.1|str_to_code }}</span> 改为 <span class="text-warning">{{ i.2|str_to_code }}</span></div>
|
|
|
|
{% endfor %}
|
|
|
|
<small class="text-success">{{ r.alert_time }}</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
<p class="text-center">(暂无)</p>
|
|
|
|
{% endif %}
|
2015-04-20 02:12:11 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div 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>
|
|
|
|
<ul class="dropdown-menu dropdown-user">
|
|
|
|
</ul>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content ibox-heading">
|
|
|
|
<h3>最近一周登录记录</h3>
|
|
|
|
<small><i class="fa fa-map-marker"></i> 此主机最近一周用户登录信息.</small>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content inspinia-timeline">
|
2015-09-08 16:19:17 +00:00
|
|
|
{# {% if log %}#}
|
|
|
|
{# {% for l in log %}#}
|
|
|
|
{# <div class="timeline-item">#}
|
|
|
|
{# <div class="row">#}
|
|
|
|
{# <div class="col-xs-5 date">#}
|
|
|
|
{# <i class="fa fa-info-circle"></i>#}
|
|
|
|
{# <small class="text-navy">{{ l.user }}</small>#}
|
|
|
|
{# <br/>#}
|
|
|
|
{# <strong>{{l.dept_name}}</strong>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# <div class="col-xs-7 content no-top-border">#}
|
|
|
|
{# <p class="m-b-xs"><strong>详细信息</strong></p>#}
|
|
|
|
{# <p>来源IP: {{ l.remote_ip }}</p>#}
|
|
|
|
{# <p>开始: {{ l.start_time |date:"Y-m-d H:i:s" }}</p>#}
|
|
|
|
{# <p>结束: {{ l.end_time |date:"Y-m-d H:i:s" }}</p>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# {% endfor %}#}
|
|
|
|
{# <button id="show" class="btn btn-primary btn-block m-t"><i class="fa fa-arrow-down"></i> 所有 </button>#}
|
|
|
|
{# <div id='more' style="display: none">#}
|
|
|
|
{# <br/>#}
|
|
|
|
{# {% for l in log_more %}#}
|
|
|
|
{# <div class="timeline-item">#}
|
|
|
|
{# <div class="row">#}
|
|
|
|
{# <div class="col-xs-5 date">#}
|
|
|
|
{# <i class="fa fa-info-circle"></i>#}
|
|
|
|
{# <small class="text-navy">{{ l.user }}</small>#}
|
|
|
|
{# <br/>#}
|
|
|
|
{# <strong>{{l.dept_name}}</strong>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# <div class="col-xs-7 content no-top-border">#}
|
|
|
|
{# <p class="m-b-xs"><strong>详细信息</strong></p>#}
|
|
|
|
{# <p>来源IP: {{ l.remote_ip }}</p>#}
|
|
|
|
{# <p>开始: {{ l.start_time |date:"Y-m-d H:i:s" }}</p>#}
|
|
|
|
{# <p>结束: {{ l.end_time |date:"Y-m-d H:i:s" }}</p>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# </div>#}
|
|
|
|
{# {% endfor %}#}
|
|
|
|
{# {% else %}#}
|
|
|
|
{# <p class="text-center">(暂无)</p>#}
|
|
|
|
{# {% endif %}#}
|
2015-04-20 02:12:11 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('#show').click(function(){
|
|
|
|
$('#show').css('display', 'none');
|
|
|
|
$('#more').css('display', 'block');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|