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
ba55cdde
Commit
ba55cdde
authored
Apr 24, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify service.sh bug
parent
c01a489d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
views.py
jumpserver/views.py
+13
-0
nav_bar_header.html
templates/nav_bar_header.html
+42
-0
version
version
+2
-0
No files found.
jumpserver/views.py
View file @
ba55cdde
...
@@ -8,6 +8,8 @@ from django.http import HttpResponseNotFound
...
@@ -8,6 +8,8 @@ from django.http import HttpResponseNotFound
from
jperm.models
import
Apply
from
jperm.models
import
Apply
import
paramiko
import
paramiko
from
jumpserver.api
import
*
from
jumpserver.api
import
*
import
uuid
import
urllib
def
getDaysByNum
(
num
):
def
getDaysByNum
(
num
):
...
@@ -180,6 +182,17 @@ def pages(posts, r):
...
@@ -180,6 +182,17 @@ def pages(posts, r):
return
contact_list
,
p
,
contacts
,
page_range
,
current_page
,
show_first
,
show_end
return
contact_list
,
p
,
contacts
,
page_range
,
current_page
,
show_first
,
show_end
def
is_latest
(
request
):
node
=
uuid
.
getnode
()
jsn
=
uuid
.
UUID
(
int
=
node
)
.
hex
[
-
12
:]
with
open
(
os
.
path
.
join
(
BASE_DIR
,
'version'
))
as
f
:
current_version
=
f
.
read
()
lastest_version
=
urllib
.
urlopen
(
'http://www.jumpserver.org/lastest_version.html?jsn=
%
s'
%
jsn
)
.
read
()
.
strip
()
if
current_version
!=
lastest_version
:
pass
def
login
(
request
):
def
login
(
request
):
"""登录界面"""
"""登录界面"""
if
request
.
session
.
get
(
'username'
):
if
request
.
session
.
get
(
'username'
):
...
...
templates/nav_bar_header.html
View file @
ba55cdde
...
@@ -52,6 +52,48 @@
...
@@ -52,6 +52,48 @@
{% endif %}
{% endif %}
</ul>
</ul>
</li>
</li>
<li
class=
"dropdown open"
>
<a
class=
"dropdown-toggle count-info"
data-toggle=
"dropdown"
href=
"#"
aria-expanded=
"true"
>
<i
class=
"fa fa-bell"
></i>
<span
class=
"label label-primary"
>
8
</span>
</a>
<ul
class=
"dropdown-menu dropdown-alerts"
>
<li>
<a
href=
"mailbox.html"
>
<div>
<i
class=
"fa fa-envelope fa-fw"
></i>
You have 16 messages
<span
class=
"pull-right text-muted small"
>
4 minutes ago
</span>
</div>
</a>
</li>
<li
class=
"divider"
></li>
<li>
<a
href=
"profile.html"
>
<div>
<i
class=
"fa fa-twitter fa-fw"
></i>
3 New Followers
<span
class=
"pull-right text-muted small"
>
12 minutes ago
</span>
</div>
</a>
</li>
<li
class=
"divider"
></li>
<li>
<a
href=
"grid_options.html"
>
<div>
<i
class=
"fa fa-upload fa-fw"
></i>
Server Rebooted
<span
class=
"pull-right text-muted small"
>
4 minutes ago
</span>
</div>
</a>
</li>
<li
class=
"divider"
></li>
<li>
<div
class=
"text-center link-block"
>
<a
href=
"notifications.html"
>
<strong>
See All Alerts
</strong>
<i
class=
"fa fa-angle-right"
></i>
</a>
</div>
</li>
</ul>
</li>
<li>
<li>
<a
href=
"/logout/"
>
<a
href=
"/logout/"
>
<i
class=
"fa fa-sign-out"
></i>
Log out
<i
class=
"fa fa-sign-out"
></i>
Log out
...
...
version
0 → 100644
View file @
ba55cdde
1.1
\ No newline at end of file
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