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
30ba1e58
Unverified
Commit
30ba1e58
authored
Mar 27, 2019
by
老广
Committed by
GitHub
Mar 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2545 from jumpserver/dev
Dev
parents
69f6401e
ace028fa
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
38 additions
and
84 deletions
+38
-84
login.html
apps/authentication/templates/authentication/login.html
+2
-2
login_otp.html
apps/authentication/templates/authentication/login_otp.html
+2
-2
new_login.html
apps/authentication/templates/authentication/new_login.html
+6
-26
login.py
apps/authentication/views/login.py
+3
-3
context_processor.py
apps/jumpserver/context_processor.py
+9
-5
login_image.png
apps/static/img/login_image.png
+0
-0
logo_text.png
apps/static/img/logo_text.png
+0
-0
_footer.html
apps/templates/_footer.html
+1
-1
_user_profile.html
apps/templates/_user_profile.html
+2
-6
base.html
apps/templates/base.html
+2
-12
flash_message_standalone.html
apps/templates/flash_message_standalone.html
+2
-11
_base_otp.html
apps/users/templates/users/_base_otp.html
+4
-4
forgot_password.html
apps/users/templates/users/forgot_password.html
+2
-9
reset_password.html
apps/users/templates/users/reset_password.html
+3
-3
No files found.
apps/
users/templates/users
/login.html
→
apps/
authentication/templates/authentication
/login.html
View file @
30ba1e58
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Jumpserver
</title>
<title>
Jumpserver
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%
}"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }
}"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<div>
<div>
<img
src=
"{
% static 'img/logo.png' %
}"
width=
"60"
height=
"60"
>
<img
src=
"{
{ LOGO_URL }
}"
width=
"60"
height=
"60"
>
<span
class=
"font-bold text-center"
style=
"font-size: 24px; font-family: inherit; margin-left: 20px"
>
{% trans 'Login' %}
</span>
<span
class=
"font-bold text-center"
style=
"font-size: 24px; font-family: inherit; margin-left: 20px"
>
{% trans 'Login' %}
</span>
</div>
</div>
<form
class=
"m-t"
role=
"form"
method=
"post"
action=
""
>
<form
class=
"m-t"
role=
"form"
method=
"post"
action=
""
>
...
...
apps/
users/templates/users
/login_otp.html
→
apps/
authentication/templates/authentication
/login_otp.html
View file @
30ba1e58
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Jumpserver
</title>
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%}
"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }}"
"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
...
...
apps/
users/templates/users
/new_login.html
→
apps/
authentication/templates/authentication
/new_login.html
View file @
30ba1e58
...
@@ -6,18 +6,9 @@
...
@@ -6,18 +6,9 @@
<!--/*@thymesVar id="message" type="java.lang.String"*/-->
<!--/*@thymesVar id="message" type="java.lang.String"*/-->
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
{% if interface and interface.favicon %}
<link
rel=
"shortcut icon"
href=
"{{ FAVICON_URL }}"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{{ MEDIA_URL }}{{ interface.favicon }}"
type=
"image/x-icon"
>
{% else %}
<link
rel=
"shortcut icon"
href=
"{% static 'img/facio.ico' %}"
type=
"image/x-icon"
>
{% endif %}
<title>
<title>
{% if interface and interface.login_title %}
{{ JMS_TITLE }}
{{ interface.login_title }}
{% else %}
Jumpserver
{% endif %}
</title>
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<!-- Stylesheets -->
<!-- Stylesheets -->
...
@@ -65,24 +56,13 @@
...
@@ -65,24 +56,13 @@
<div>
<div>
<div
class=
"box-1"
>
<div
class=
"box-1"
>
<div
class=
"box-2"
>
<div
class=
"box-2"
>
{% if interface.login_image %}
<img
src=
"{{ LOGIN_IMAGE_URL }}"
style=
"height: 100%; width: 100%"
/>
<img
src=
"{{ MEDIA_URL }}{{ interface.login_image }}"
style=
"height: 100%; width: 100%"
/>
{% else %}
<img
src=
"{% static 'img/login/login_image_1.png' %}"
style=
" height: 100%; width: 100%"
/>
{% endif %}
</div>
</div>
<div
class=
"box-3"
>
<div
class=
"box-3"
>
<div
style=
"background-color: white"
>
<div
style=
"background-color: white"
>
{% if interface.login_title %}
<div
style=
"margin-top: 40px;padding-top: 50px;"
>
<div
style=
"margin-top: 40px;padding-top: 50px;"
>
<span
style=
"font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;"
>
{{ JMS_TITLE }}
</span>
<span
style=
"font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;"
>
{{ interface.login_title }}
</span>
</div>
</div>
{% else %}
<div
style=
"margin-top: 40px;padding-top: 50px;"
>
<span
style=
"font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;"
>
{% trans 'Welcome to the Jumpserver open source fortress' %}
</span>
</div>
{% endif %}
<div
style=
"font-size: 12px;color: #999999;letter-spacing: 0;line-height: 18px;margin-top: 10px"
>
<div
style=
"font-size: 12px;color: #999999;letter-spacing: 0;line-height: 18px;margin-top: 10px"
>
{% trans 'Welcome back, please enter username and password to login' %}
{% trans 'Welcome back, please enter username and password to login' %}
</div>
</div>
...
...
apps/authentication/views/login.py
View file @
30ba1e58
...
@@ -43,7 +43,7 @@ class UserLoginView(FormView):
...
@@ -43,7 +43,7 @@ class UserLoginView(FormView):
key_prefix_captcha
=
"_LOGIN_INVALID_{}"
key_prefix_captcha
=
"_LOGIN_INVALID_{}"
def
get_template_names
(
self
):
def
get_template_names
(
self
):
template_name
=
'
users
/login.html'
template_name
=
'
authentication
/login.html'
if
not
settings
.
XPACK_ENABLED
:
if
not
settings
.
XPACK_ENABLED
:
return
template_name
return
template_name
...
@@ -51,7 +51,7 @@ class UserLoginView(FormView):
...
@@ -51,7 +51,7 @@ class UserLoginView(FormView):
if
not
License
.
has_valid_license
():
if
not
License
.
has_valid_license
():
return
template_name
return
template_name
template_name
=
'
users
/new_login.html'
template_name
=
'
authentication
/new_login.html'
return
template_name
return
template_name
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
...
@@ -145,7 +145,7 @@ class UserLoginView(FormView):
...
@@ -145,7 +145,7 @@ class UserLoginView(FormView):
class
UserLoginOtpView
(
FormView
):
class
UserLoginOtpView
(
FormView
):
template_name
=
'
users
/login_otp.html'
template_name
=
'
authentication
/login_otp.html'
form_class
=
forms
.
UserCheckOtpCodeForm
form_class
=
forms
.
UserCheckOtpCodeForm
redirect_field_name
=
'next'
redirect_field_name
=
'next'
...
...
apps/jumpserver/context_processor.py
View file @
30ba1e58
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
#
from
django.contrib.staticfiles.templatetags.staticfiles
import
static
def
jumpserver_processor
(
request
):
def
jumpserver_processor
(
request
):
context
=
{}
# Setting default pk
# Setting default pk
context
.
update
(
context
=
{
{
'DEFAULT_PK'
:
'00000000-0000-0000-0000-000000000000'
}
'DEFAULT_PK'
:
'00000000-0000-0000-0000-000000000000'
,
)
'LOGO_URL'
:
static
(
'img/logo.png'
),
'LOGO_TEXT_URL'
:
static
(
'img/logo_text.png'
),
'LOGIN_IMAGE_URL'
:
static
(
'img/login_image.png'
),
'FAVICON_URL'
:
static
(
'img/facio.ico'
),
'JMS_TITLE'
:
'Jumpserver'
}
return
context
return
context
...
...
apps/static/img/login
/login_image_1
.png
→
apps/static/img/login
_image
.png
View file @
30ba1e58
File moved
apps/static/img/logo
-
text.png
→
apps/static/img/logo
_
text.png
View file @
30ba1e58
File moved
apps/templates/_footer.html
View file @
30ba1e58
{% load i18n %}
{% load i18n %}
<div
class=
"footer fixed"
>
<div
class=
"footer fixed"
>
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
Version
<strong>
1.4.
8
-{% include '_build.html' %}
</strong>
GPLv2.
Version
<strong>
1.4.
9
-{% include '_build.html' %}
</strong>
GPLv2.
<!--<img style="display: none" src="http://www.jumpserver.org/img/evaluate_avatar1.jpg">-->
<!--<img style="display: none" src="http://www.jumpserver.org/img/evaluate_avatar1.jpg">-->
</div>
</div>
<div>
<div>
...
...
apps/templates/_user_profile.html
View file @
30ba1e58
...
@@ -3,15 +3,11 @@
...
@@ -3,15 +3,11 @@
<li
class=
"nav-header"
>
<li
class=
"nav-header"
>
<div
class=
"profile-element"
style=
"height: 65px"
>
<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' %})"
>
<div
href=
"http://www.jumpserver.org"
target=
"_blank"
style=
"width: 100%; background-image: url({% static 'img/header-profile.png' %})"
>
{% if interface and interface.logo_index %}
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"{{ LOGO_TEXT_URL }}"
/>
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"{{ MEDIA_URL }}{{ interface.logo_index }}"
/>
{% else %}
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"{% static 'img/logo-text.png' %}"
/>
{% endif %}
</div>
</div>
</div>
</div>
<div
class=
"logo-element"
>
<div
class=
"logo-element"
>
<img
alt=
"image"
height=
"40"
src=
"
/static/img/logo.png
"
/>
<img
alt=
"image"
height=
"40"
src=
"
{{ LOGO_URL }}
"
/>
</div>
</div>
{% if ADMIN_ORGS and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
{% if ADMIN_ORGS and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
{% if ADMIN_ORGS|length > 1 or not CURRENT_ORG.is_default %}
{% if ADMIN_ORGS|length > 1 or not CURRENT_ORG.is_default %}
...
...
apps/templates/base.html
View file @
30ba1e58
...
@@ -5,18 +5,8 @@
...
@@ -5,18 +5,8 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"renderer"
content=
"webkit"
>
<meta
name=
"renderer"
content=
"webkit"
>
<title>
<title>
{{ JMS_TITLE }}
</title>
{% if interface and interface.login_title %}
<link
rel=
"shortcut icon"
href=
"{{ FAVICON_URL }}"
type=
"image/x-icon"
>
{{ interface.login_title }}
{% else %}
Jumpserver
{% endif %}
</title>
{% if interface and interface.favicon %}
<link
rel=
"shortcut icon"
href=
"{{ MEDIA_URL }}{{ interface.favicon }}"
type=
"image/x-icon"
>
{% else %}
<link
rel=
"shortcut icon"
href=
"{% static 'img/facio.ico' %}"
type=
"image/x-icon"
>
{% endif %}
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
<link
href=
"{% static 'css/jumpserver.css' %}"
rel=
"stylesheet"
>
<link
href=
"{% static 'css/jumpserver.css' %}"
rel=
"stylesheet"
>
{% block custom_head_css_js %} {% endblock %}
{% block custom_head_css_js %} {% endblock %}
...
...
apps/templates/flash_message_standalone.html
View file @
30ba1e58
...
@@ -22,18 +22,9 @@
...
@@ -22,18 +22,9 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<div>
<div>
{% if interface and interface.logo_logout %}
<img
src=
"{{ LOGO_URL }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
<img
src=
"{{ MEDIA_URL }}{{ interface.logo_logout }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
{% else %}
<img
src=
"{% static 'img/logo.png' %}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
{% endif %}
<h2
style=
"display: inline"
>
<h2
style=
"display: inline"
>
{% if interface and interface.login_title %}
{{ JMS_TITLE }}
{{ interface.login_title }}
{% else %}
{% trans 'Welcome to the Jumpserver open source fortress' %}
{% endif %}
</h2>
</h2>
</div>
</div>
{% if errors %}
{% if errors %}
...
...
apps/users/templates/users/_base_otp.html
View file @
30ba1e58
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<html>
<html>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
Jumpserver
</title>
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%
}"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }
}"
type=
"image/x-icon"
>
<link
rel=
"stylesheet"
href=
"{% static 'fonts/font_otp/iconfont.css' %}"
/>
<link
rel=
"stylesheet"
href=
"{% static 'fonts/font_otp/iconfont.css' %}"
/>
<link
rel=
"stylesheet"
href=
"{% static 'css/otp.css' %}"
/>
<link
rel=
"stylesheet"
href=
"{% static 'css/otp.css' %}"
/>
<script
src=
"{% static 'js/jquery-2.1.1.js' %}"
></script>
<script
src=
"{% static 'js/jquery-2.1.1.js' %}"
></script>
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
<header>
<header>
<div
class=
"logo"
>
<div
class=
"logo"
>
<a
href=
"{% url 'index' %}"
>
<a
href=
"{% url 'index' %}"
>
<img
src=
"{
% static 'img/logo.png' %
}"
alt=
""
width=
"50px"
height=
"50px"
/>
<img
src=
"{
{ LOGO_URL }
}"
alt=
""
width=
"50px"
height=
"50px"
/>
</a>
</a>
<a
href=
"{% url 'index' %}"
>
Jumpserver
</a>
<a
href=
"{% url 'index' %}"
>
{{ JMS_TITLE }}
</a>
</div>
</div>
<div>
<div>
<a
href=
"{% url 'index' %}"
>
{% trans 'Home page' %}
</a>
<a
href=
"{% url 'index' %}"
>
{% trans 'Home page' %}
</a>
...
...
apps/users/templates/users/forgot_password.html
View file @
30ba1e58
...
@@ -4,10 +4,9 @@
...
@@ -4,10 +4,9 @@
<html>
<html>
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%
}"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }
}"
type=
"image/x-icon"
>
<title>
{% trans 'Forgot password' %}
</title>
<title>
{% trans 'Forgot password' %}
</title>
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
...
@@ -22,14 +21,8 @@
...
@@ -22,14 +21,8 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
{% if interface.logout_logo %}
<img
src=
"{{ LOGO_URL }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
<img
src=
"{{ MEDIA_URL }}{{ interface.logout_logo }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
{% else %}
<img
src=
"{% static 'img/logo.png' %}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
{% endif %}
<h2
class=
"font-bold"
style=
"display: inline"
>
{% trans 'Forgot password' %} ?
</h2>
<h2
class=
"font-bold"
style=
"display: inline"
>
{% trans 'Forgot password' %} ?
</h2>
<h1></h1>
<h1></h1>
{% if errors %}
{% if errors %}
<p
class=
"red-fonts"
>
{{ errors }}
</p>
<p
class=
"red-fonts"
>
{{ errors }}
</p>
...
...
apps/users/templates/users/reset_password.html
View file @
30ba1e58
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Jumpserver
</title>
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%}"
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }}
"
%}"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<div><img
src=
"{
% static 'img/logo.png' %
}"
width=
"82"
height=
"82"
>
<span
class=
"font-bold text-center"
style=
"font-size: 32px; font-family: inherit"
>
{% trans 'Reset password' %}
</span></div>
<div><img
src=
"{
{ LOGO_URL }
}"
width=
"82"
height=
"82"
>
<span
class=
"font-bold text-center"
style=
"font-size: 32px; font-family: inherit"
>
{% trans 'Reset password' %}
</span></div>
<form
class=
"m-t"
role=
"form"
method=
"post"
action=
""
>
<form
class=
"m-t"
role=
"form"
method=
"post"
action=
""
>
{% csrf_token %}
{% csrf_token %}
{% if errors %}
{% if errors %}
...
...
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