mirror of https://github.com/jumpserver/jumpserver
ÐÞ¸Änav.html
parent
d8a6eba2f3
commit
2f7e7b0072
|
@ -127,13 +127,13 @@ def test_add_log():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
#install()
|
install()
|
||||||
#test_add_dept()
|
test_add_dept()
|
||||||
#test_add_group()
|
test_add_group()
|
||||||
#test_add_user()
|
test_add_user()
|
||||||
#test_add_idc()
|
test_add_idc()
|
||||||
#test_add_asset_group()
|
test_add_asset_group()
|
||||||
#test_add_asset()
|
test_add_asset()
|
||||||
test_add_log()
|
test_add_log()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ def asset_perm_api(asset):
|
||||||
|
|
||||||
user_group_list = []
|
user_group_list = []
|
||||||
for perm in perm_list:
|
for perm in perm_list:
|
||||||
user_group_list.extend(perm.user_group.all())
|
user_group_list.append(perm.user_group)
|
||||||
|
|
||||||
user_permed_list = []
|
user_permed_list = []
|
||||||
for user_group in user_group_list:
|
for user_group in user_group_list:
|
||||||
|
|
|
@ -2,24 +2,18 @@
|
||||||
# Author: Guanghongwei
|
# Author: Guanghongwei
|
||||||
# Email: ibuler@qq.com
|
# Email: ibuler@qq.com
|
||||||
|
|
||||||
import time
|
|
||||||
import os
|
|
||||||
import random
|
import random
|
||||||
import subprocess
|
import subprocess
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
import crypt
|
import crypt
|
||||||
from django.http import HttpResponseRedirect
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.http import HttpResponse
|
|
||||||
|
|
||||||
from juser.models import UserGroup, User, DEPT
|
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.views import md5_crypt, LDAPMgmt, LDAP_ENABLE, ldap_conn, page_list_return, pages
|
||||||
from jumpserver.api import *
|
from jumpserver.api import *
|
||||||
|
|
||||||
|
|
|
@ -50,21 +50,16 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</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">
|
<li id="jlog">
|
||||||
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
|
<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>
|
||||||
<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>
|
||||||
<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>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="special_link">
|
<li class="special_link">
|
||||||
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -120,18 +115,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="jlog">
|
<li id="jlog">
|
||||||
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
|
<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>
|
||||||
<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>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="special_link">
|
<li class="special_link">
|
||||||
|
@ -150,27 +134,19 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="/"><i class="fa fa-th-large"></i> <span class="nav-label">仪表盘</span><span class="label label-info pull-right"></span></a>
|
<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>
|
||||||
<li id="juser">
|
<li>
|
||||||
<a href="#"><i class="fa fa-rebel"></i> <span class="nav-label">用户管ç†</span><span class="fa arrow"></span></a>
|
<a href="/"><i class="fa fa-rebel"></i> <span class="nav-label">个人信æ¯</span><span class="label label-info pull-right"></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>
|
</li>
|
||||||
<li id="jasset">
|
<li>
|
||||||
<a><i class="fa fa-cube"></i> <span class="nav-label">资产管ç†</span><span class="fa arrow"></span></a>
|
<a href="/"><i class="fa fa-cube"></i> <span class="nav-label">查看主机</span><span class="label label-info pull-right"></span></a>
|
||||||
<ul class="nav nav-second-level">
|
|
||||||
<li class="host_list"><a href="/jasset/host_list/">查看资产  </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>
|
</li>
|
||||||
<li id="jlog">
|
<li>
|
||||||
<a href="#"><i class="fa fa-files-o"></i> <span class="nav-label">日志审计</span><span class="fa arrow"></span></a>
|
<a href="/"><i class="fa fa-cube"></i> <span class="nav-label">申请主机</span><span class="label label-info pull-right"></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>
|
||||||
|
<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>
|
<li>
|
||||||
<a href="#"><i class="fa fa-download"></i> <span class="nav-label">ä¸Šä¼ ä¸‹è½½</span><span class="fa arrow"></span></a>
|
<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">
|
<ul class="nav nav-second-level">
|
||||||
|
@ -178,6 +154,9 @@
|
||||||
<li><a href="/file/download/">文件下载</a></li>
|
<li><a href="/file/download/">文件下载</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</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">
|
<li class="special_link">
|
||||||
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
<a href="http://www.jumpserver.org" target="_blank"><i class="fa fa-database"></i> <span class="nav-label">访问官网</span></a>
|
||||||
|
|
Loading…
Reference in New Issue