2015-12-19 09:26:34 +00:00
|
|
|
{% if request.session.role_id == 2 %}
|
2015-04-20 02:12:11 +00:00
|
|
|
<nav class="navbar-default navbar-static-side" role="navigation">
|
|
|
|
<div class="sidebar-collapse">
|
|
|
|
<ul class="nav" id="side-menu">
|
|
|
|
{% include 'nav_li_profile.html' %}
|
|
|
|
<li id="index">
|
2015-12-19 09:26:34 +00:00
|
|
|
<a href="{% url 'index' %}"><i class="fa fa-dashboard"></i> <span class="nav-label">仪表盘</span><span class="label label-info pull-right"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
|
|
|
<li id="juser">
|
2015-12-19 09:26:34 +00:00
|
|
|
<a href="#"><i class="fa fa-group"></i> <span class="nav-label">用户管理</span><span class="fa arrow"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
<ul class="nav nav-second-level">
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="group"><a href="{% url 'user_group_list' %}">查看用户组</a></li>
|
|
|
|
<li class="user"><a href="{% url 'user_list' %}">查看用户<span class="label {% ifequal user_active_num user_total_num %}label-primary {% else %}label-warning {% endifequal %}pull-right">{{ user_active_num }}/{{ user_total_num }}</span></a></li>
|
2015-04-20 02:12:11 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li id="jasset">
|
2015-12-19 09:26:34 +00:00
|
|
|
<a><i class="fa fa-inbox"></i> <span class="nav-label">资产管理</span><span class="fa arrow"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
<ul class="nav nav-second-level">
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="group"><a href="{% url 'asset_group_list' %}">查看资产组</a></li>
|
|
|
|
<li class="asset"> <a href="{% url 'asset_list' %}">查看资产<span class="label label-info pull-right">{{ host_active_num }}/{{ host_total_num}}</span></a></li>
|
|
|
|
<li class="idc"> <a href="{% url 'idc_list' %}">查看机房</a></li>
|
2015-04-20 02:12:11 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li id="jperm">
|
|
|
|
<a href="#"><i class="fa fa-edit"></i> <span class="nav-label">授权管理</span><span class="fa arrow"></span></a>
|
|
|
|
<ul class="nav nav-second-level">
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="sudo">
|
|
|
|
<a class="sudo" href="{% url 'sudo_list' %}">Sudo</a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="role">
|
|
|
|
<a href="{% url 'role_list' %}">系统用户</a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="rule">
|
|
|
|
<a href="{% url 'rule_list' %}">授权规则</a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li id="jlog">
|
2015-12-19 09:26:34 +00:00
|
|
|
<a href="{% url 'log_list' 'online' %}"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="label label-info pull-right"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
2015-12-19 09:26:34 +00:00
|
|
|
<li id="file">
|
|
|
|
<a href="#"><i class="fa fa-download"></i> <span class="nav-label">上传下载</span><span class="fa arrow"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
<ul class="nav nav-second-level">
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="upload"><a href="{% url 'file_upload' %}">文件上传</a></li>
|
|
|
|
<li class="download"><a href="{% url 'file_download' %}">文件下载</a></li>
|
2015-04-20 02:12:11 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
2015-12-19 09:26:34 +00:00
|
|
|
<li id="setting">
|
|
|
|
<a href="{% url 'setting' %}"><i class="fa fa-gears"></i> <span class="nav-label">设置</span><span class="label label-info pull-right"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
|
|
|
<li class="special_link">
|
|
|
|
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2015-12-19 09:26:34 +00:00
|
|
|
|
2015-04-20 02:12:11 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|
2015-12-19 09:26:34 +00:00
|
|
|
{% endif %}
|
2015-04-20 02:12:11 +00:00
|
|
|
|
2015-12-19 09:26:34 +00:00
|
|
|
{% if request.session.role_id == 0 %}
|
2015-04-20 02:12:11 +00:00
|
|
|
<nav class="navbar-default navbar-static-side" role="navigation">
|
|
|
|
<div class="sidebar-collapse">
|
|
|
|
<ul class="nav" id="side-menu">
|
|
|
|
{% include 'nav_li_profile.html' %}
|
2015-12-19 09:26:34 +00:00
|
|
|
<li id="juser">
|
|
|
|
<a href="{% url 'user_detail' %}"><i class="fa fa-dashboard"></i> <span class="nav-label">仪表盘</span><span class="label label-info pull-right"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
|
|
|
<li id="jasset">
|
2015-12-19 09:26:34 +00:00
|
|
|
<a href="{% url 'asset_list' %}"><i class="fa fa-inbox"></i> <span class="nav-label">查看主机</span><span class="label label-info pull-right"></span></a>
|
2015-04-20 02:12:11 +00:00
|
|
|
</li>
|
|
|
|
<li id="file">
|
|
|
|
<a href="#"><i class="fa fa-download"></i> <span class="nav-label">上传下载</span><span class="fa arrow"></span></a>
|
|
|
|
<ul class="nav nav-second-level">
|
2015-12-19 09:26:34 +00:00
|
|
|
<li class="upload"><a href="{% url 'file_upload' %}">文件上传</a></li>
|
|
|
|
<li class="download"><a href="{% url 'file_download' %}">文件下载</a></li>
|
2015-04-20 02:12:11 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="special_link">
|
|
|
|
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
2015-12-19 09:26:34 +00:00
|
|
|
{% endif %}
|