Browse Source

ÐÞ¸Änav.html

pull/6/head
guanghongwei 10 years ago
parent
commit
2f7e7b0072
  1. 14
      docs/AddUserAsset.py
  2. 2
      jumpserver/api.py
  3. 6
      juser/views.py
  4. 65
      templates/nav.html

14
docs/AddUserAsset.py

@ -127,13 +127,13 @@ def test_add_log():
if __name__ == '__main__':
#install()
#test_add_dept()
#test_add_group()
#test_add_user()
#test_add_idc()
#test_add_asset_group()
#test_add_asset()
install()
test_add_dept()
test_add_group()
test_add_user()
test_add_idc()
test_add_asset_group()
test_add_asset()
test_add_log()

2
jumpserver/api.py

@ -257,7 +257,7 @@ def asset_perm_api(asset):
user_group_list = []
for perm in perm_list:
user_group_list.extend(perm.user_group.all())
user_group_list.append(perm.user_group)
user_permed_list = []
for user_group in user_group_list:

6
juser/views.py

@ -2,24 +2,18 @@
# Author: Guanghongwei
# Email: ibuler@qq.com
import time
import os
import random
import subprocess
from Crypto.PublicKey import RSA
import crypt
from django.http import HttpResponseRedirect
import datetime
from django.shortcuts import render_to_response
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from django.template import RequestContext
from django.http import HttpResponse
from juser.models import UserGroup, User, DEPT
from connect import BASE_DIR
from connect import CONF
from jumpserver.views import md5_crypt, LDAPMgmt, LDAP_ENABLE, ldap_conn, page_list_return, pages
from jumpserver.api import *

65
templates/nav.html

@ -50,21 +50,16 @@
</li>
</ul>
</li>
{# <li id="jlog">#}
{# <a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>#}
{# <ul class="nav nav-second-level">#}
{# <li id="log_list"><a href="/jlog/log_list/online/">查看日志</a></li>#}
{# <li id="log_detail"><a href="/jlog/log_detail/">日志分æž</a></li>#}
{# </ul>#}
{# </li>#}
<li id="jlog">
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li id="log_list"><a href="/jlog/log_list/online/">查看日志</a></li>
<li id="log_detail"><a href="/jlog/log_detail/">日志分æž</a></li>
</ul>
</li>
<li>
<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">
<li><a href="/file/upload/">文件上传</a></li>
<li><a href="/file/download/">文件下载</a></li>
</ul>
<a href="/jlog/log_list/online/"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="label label-info pull-right"></span></a>
</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>
@ -120,18 +115,7 @@
</ul>
</li>
<li id="jlog">
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li id="log_list"><a href="/jlog/log_list/online/">查看日志</a></li>
<li id="log_detail"><a href="/jlog/log_detail/">日志分æž</a></li>
</ul>
</li>
<li>
<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">
<li><a href="/file/upload/">文件上传</a></li>
<li><a href="/file/download/">文件下载</a></li>
</ul>
<a href="/jlog/log_list/online/"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="label label-info pull-right"></span></a>
</li>
<li class="special_link">
@ -150,27 +134,19 @@
<li>
<a href="/"><i class="fa fa-th-large"></i> <span class="nav-label">仪表盘</span><span class="label label-info pull-right"></span></a>
</li>
<li id="juser">
<a href="#"><i class="fa fa-rebel"></i> <span class="nav-label">用户管ç†</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li id="user_list"><a href="/juser/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>
</ul>
<li>
<a href="/"><i class="fa fa-rebel"></i> <span class="nav-label">个人信æ¯</span><span class="label label-info pull-right"></span></a>
</li>
<li id="jasset">
<a><i class="fa fa-cube"></i> <span class="nav-label">资产管ç†</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li class="host_list"><a href="/jasset/host_list/">查看资产&nbsp&nbsp</span><span class="label label-info pull-right">16/18</span></a></li>
<li class="jgroup_list group_detail"><a href="/jasset/jgroup_list/">查看主机组</a></li>
<li class="idc_list idc_detail"><a href="/jasset/idc_list/">查看IDC</a></li>
</ul>
<li>
<a href="/"><i class="fa fa-cube"></i> <span class="nav-label">查看主机</span><span class="label label-info pull-right"></span></a>
</li>
<li id="jlog">
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li id="log_list"><a href="/jlog/log_list/online/">查看日志</a></li>
<li id="log_detail"><a href="/jlog/log_detail/">日志分æž</a></li>
</ul>
<li>
<a href="/"><i class="fa fa-cube"></i> <span class="nav-label">申请主机</span><span class="label label-info pull-right"></span></a>
</li>
<li>
<a href="/"><i class="fa fa-files-o"></i> <span class="nav-label">登录历å²</span><span class="label label-info pull-right"></span></a>
</li>
<li>
<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">
@ -178,6 +154,9 @@
<li><a href="/file/download/">文件下载</a></li>
</ul>
</li>
<li>
<a href="/"><i class="fa fa-files-o"></i> <span class="nav-label">使用说明</span><span class="label label-info pull-right"></span></a>
</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>

Loading…
Cancel
Save