Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
206e037c
Commit
206e037c
authored
Jul 27, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 优化datatable 和显示组织优化
parent
492fd988
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
33 deletions
+38
-33
urls.py
apps/jumpserver/urls.py
+6
-6
context_processor.py
apps/orgs/context_processor.py
+0
-1
jumpserver.js
apps/static/js/jumpserver.js
+6
-0
_user_profile.html
apps/templates/_user_profile.html
+26
-26
No files found.
apps/jumpserver/urls.py
View file @
206e037c
...
...
@@ -17,12 +17,12 @@ from .views import IndexView, LunaView
schema_view
=
get_schema_view
(
openapi
.
Info
(
title
=
"
Snippets API
"
,
title
=
"
Jumpserver API Docs
"
,
default_version
=
'v1'
,
description
=
"
Test description
"
,
terms_of_service
=
"https://www.
google.com/policies/terms/
"
,
contact
=
openapi
.
Contact
(
email
=
"
contact@snippets.local
"
),
license
=
openapi
.
License
(
name
=
"
BSD
License"
),
description
=
"
Jumpserver Restful api docs
"
,
terms_of_service
=
"https://www.
jumpserver.org
"
,
contact
=
openapi
.
Contact
(
email
=
"
support@fit2cloud.com
"
),
license
=
openapi
.
License
(
name
=
"
GPLv2
License"
),
),
public
=
True
,
permission_classes
=
(
permissions
.
AllowAny
,),
...
...
@@ -80,7 +80,7 @@ urlpatterns = [
path
(
'luna/'
,
LunaView
.
as_view
(),
name
=
'luna-error'
),
path
(
'settings/'
,
include
(
'common.urls.view_urls'
,
namespace
=
'settings'
)),
path
(
'common/'
,
include
(
'common.urls.view_urls'
,
namespace
=
'common'
)),
re_path
(
r'^api/v1/.*
'
,
redirect_format_api
),
path
(
'api/v1/
'
,
redirect_format_api
),
path
(
'api/'
,
include
(
v1_api_patterns
)),
# Api url view map
...
...
apps/orgs/context_processor.py
View file @
206e037c
...
...
@@ -6,7 +6,6 @@ from .models import Organization
def
org_processor
(
request
):
print
(
'Crernt Org'
,
current_org
.
name
)
context
=
{
'ADMIN_ORGS'
:
Organization
.
get_user_admin_orgs
(
request
.
user
),
'CURRENT_ORG'
:
get_current_org
(),
...
...
apps/static/js/jumpserver.js
View file @
206e037c
...
...
@@ -253,6 +253,12 @@ jumpserver.selected = {};
jumpserver
.
language
=
{
processing
:
"加载中"
,
search
:
"搜索"
,
select
:
{
rows
:
{
_
:
"选中 %d 项"
,
0
:
""
}
},
lengthMenu
:
"每页 _MENU_"
,
info
:
"显示第 _START_ 至 _END_ 项结果; 总共 _TOTAL_ 项"
,
infoFiltered
:
""
,
...
...
apps/templates/_user_profile.html
View file @
206e037c
...
...
@@ -6,35 +6,35 @@
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"/static/img/logo-text.png"
/>
</div>
</div>
{#
<div
class=
"clearfix"
></div>
#}
<div
class=
"logo-element"
>
<img
alt=
"image"
height=
"40"
src=
"/static/img/logo.png"
/>
</div>
{{ request.COOKIE.IN_ADMIN_PAGE }}
{% if ADMIN_ORGS and ADMIN_ORGS|length != 1 and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
<div
style=
"height: 55px;"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
style=
"display: block; background-color: transparent; color: #8095a8; padding: 14px 20px 14px 25px"
>
<i
class=
"fa fa-bookmark"
style=
"width: 14px; "
></i>
<span
class=
"nav-label"
style=
"padding-left: 7px"
>
{{ CURRENT_ORG.name }}
</span>
<span
class=
"fa fa-sort-desc pull-right"
></span>
</a>
<ul
class=
"dropdown-menu"
style=
"width: 219px;"
>
{% for org in ADMIN_ORGS %}
<li>
<a
class=
"org-dropdown"
href=
"{% url 'orgs:org-switch' pk=org.id %}"
data-id=
"{{ org.id }}"
>
{{ org.name }}
{% if org.id == CURRENT_ORG.id %}
<span
class=
"fa fa-circle pull-right"
style=
"padding-top: 5px; color: #1ab394"
></span>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
{% if ADMIN_ORGS and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
{% if ADMIN_ORGS|length > 1 or not CURRENT_ORG.is_default %}
<div
style=
"height: 55px;"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
style=
"display: block; background-color: transparent; color: #8095a8; padding: 14px 20px 14px 25px"
>
<i
class=
"fa fa-bookmark"
style=
"width: 14px; "
></i>
<span
class=
"nav-label"
style=
"padding-left: 7px"
>
{{ CURRENT_ORG.name }}
</span>
<span
class=
"fa fa-sort-desc pull-right"
></span>
</a>
<ul
class=
"dropdown-menu"
style=
"width: 219px;"
>
{% for org in ADMIN_ORGS %}
<li>
<a
class=
"org-dropdown"
href=
"{% url 'orgs:org-switch' pk=org.id %}"
data-id=
"{{ org.id }}"
>
{{ org.name }}
{% if org.id == CURRENT_ORG.id %}
<span
class=
"fa fa-circle pull-right"
style=
"padding-top: 5px; color: #1ab394"
></span>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
</li>
<script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment