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
a48fb9de
Unverified
Commit
a48fb9de
authored
Jul 26, 2018
by
老广
Committed by
GitHub
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tmp org (#1596)
* [Update] 修改index view * [Update] 修改nav * [Update] 修改profile
parent
04e7f54c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
25 deletions
+34
-25
views.py
apps/jumpserver/views.py
+2
-2
jumpserver.css
apps/static/css/jumpserver.css
+2
-2
header-profile.png
apps/static/img/header-profile.png
+0
-0
_nav.html
apps/templates/_nav.html
+0
-16
_user_profile.html
apps/templates/_user_profile.html
+30
-5
No files found.
apps/jumpserver/views.py
View file @
a48fb9de
...
...
@@ -21,10 +21,10 @@ class IndexView(AdminUserRequiredMixin, TemplateView):
session_month_dates
=
[]
session_month_dates_archive
=
[]
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
if
not
request
.
user
.
is_org_admin
:
return
redirect
(
'assets:user-asset-list'
)
return
super
(
IndexView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
return
super
(
IndexView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
@staticmethod
def
get_user_count
():
...
...
apps/static/css/jumpserver.css
View file @
a48fb9de
...
...
@@ -335,13 +335,13 @@ div.dataTables_wrapper div.dataTables_filter {
.nav-header
,
body
.mini-navbar
.nav-header
{
padding
:
0
;
background
:
#202c37
;
/*background: #202c37;*/
}
.profile-element
div
:first-child
{
line-height
:
60px
;
/*width: 70px;*/
float
:
left
;
/*float: left;*/
text-align
:
center
;
}
...
...
apps/static/img/header-profile.png
0 → 100755
View file @
a48fb9de
5.74 KB
apps/templates/_nav.html
View file @
a48fb9de
{% load i18n %}
{% if ADMIN_ORGS and ADMIN_ORGS|length > 1 %}
<li
id=
"org"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
<i
class=
"fa fa-star"
style=
"width: 14px"
></i>
<span
class=
"nav-label"
>
{{ CURRENT_ORG.name }}
</span>
<span
class=
"fa fa-caret-down arrow"
></span>
</a>
<ul
class=
"dropdown-menu"
>
{% for org in ADMIN_ORGS %}
{% if org.id != CURRENT_ORG.id %}
<li><a
class=
"org-dropdown"
href=
"{% url 'orgs:org-switch' pk=org.id %}"
data-id=
"{{ org.id }}"
>
{{ org.name }}
</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
<hr>
{% endif %}
<li
id=
"index"
>
<a
href=
"{% url 'index' %}"
>
<i
class=
"fa fa-dashboard"
style=
"width: 14px"
></i>
<span
class=
"nav-label"
>
{% trans 'Dashboard' %}
</span>
...
...
apps/templates/_user_profile.html
View file @
a48fb9de
{% load static %}
{% load i18n %}
<li
class=
"nav-header"
>
<div
class=
"
dropdown profile-element
"
>
<div
href=
"http://www.jumpserver.org"
target=
"_blank"
>
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"/static/img/logo-text.png"
style=
"margin-left: 20px"
/>
<div
class=
"
profile-element"
style=
"height: 65px
"
>
<div
href=
"http://www.jumpserver.org"
target=
"_blank"
style=
"width: 100%; background-image: url({% static 'img/header-profile.png' %})"
>
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"/static/img/logo-text.png"
/>
</div>
</div>
<div
class=
"clearfix"
></div>
{#
<div
class=
"clearfix"
></div>
#}
<div
class=
"logo-element"
>
<img
alt=
"image"
height=
"40"
src=
"/static/img/logo.png"
/>
<img
alt=
"image"
height=
"40
px
"
src=
"/static/img/logo.png"
/>
</div>
{% if ADMIN_ORGS and ADMIN_ORGS|length != 1 %}
<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"
>
{% trans 'Org' %} - {{ 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 %}
</li>
<script>
$
(
document
).
ready
(
function
()
{
...
...
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