mirror of https://github.com/jumpserver/jumpserver
modify service.sh bug
parent
c01a489dce
commit
ba55cdde87
|
@ -8,6 +8,8 @@ from django.http import HttpResponseNotFound
|
|||
from jperm.models import Apply
|
||||
import paramiko
|
||||
from jumpserver.api import *
|
||||
import uuid
|
||||
import urllib
|
||||
|
||||
|
||||
def getDaysByNum(num):
|
||||
|
@ -180,6 +182,17 @@ def pages(posts, r):
|
|||
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):
|
||||
"""登录界面"""
|
||||
if request.session.get('username'):
|
||||
|
|
|
@ -52,6 +52,48 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
</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>
|
||||
<a href="/logout/">
|
||||
<i class="fa fa-sign-out"></i> Log out
|
||||
|
|
Loading…
Reference in New Issue