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
ace028fa
Commit
ace028fa
authored
Mar 27, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 统一可更改的interface
parent
bd4d974d
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 @
ace028fa
...
...
@@ -7,7 +7,7 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<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' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
...
...
@@ -42,7 +42,7 @@
<div
class=
"col-md-6"
>
<div
class=
"ibox-content"
>
<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>
</div>
<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 @
ace028fa
...
...
@@ -6,8 +6,8 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Jumpserver
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%}
"
type=
"image/x-icon"
>
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }}"
"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<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 @
ace028fa
...
...
@@ -6,18 +6,9 @@
<!--/*@thymesVar id="message" type="java.lang.String"*/-->
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
{% 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 %}
<link
rel=
"shortcut icon"
href=
"{{ FAVICON_URL }}"
type=
"image/x-icon"
>
<title>
{% if interface and interface.login_title %}
{{ interface.login_title }}
{% else %}
Jumpserver
{% endif %}
{{ JMS_TITLE }}
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<!-- Stylesheets -->
...
...
@@ -65,24 +56,13 @@
<div>
<div
class=
"box-1"
>
<div
class=
"box-2"
>
{% if interface.login_image %}
<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 %}
<img
src=
"{{ LOGIN_IMAGE_URL }}"
style=
"height: 100%; width: 100%"
/>
</div>
<div
class=
"box-3"
>
<div
style=
"background-color: white"
>
{% if interface.login_title %}
<div
style=
"margin-top: 40px;padding-top: 50px;"
>
<span
style=
"font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;"
>
{{ interface.login_title }}
</span>
</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=
"margin-top: 40px;padding-top: 50px;"
>
<span
style=
"font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;"
>
{{ JMS_TITLE }}
</span>
</div>
<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' %}
</div>
...
...
apps/authentication/views/login.py
View file @
ace028fa
...
...
@@ -43,7 +43,7 @@ class UserLoginView(FormView):
key_prefix_captcha
=
"_LOGIN_INVALID_{}"
def
get_template_names
(
self
):
template_name
=
'
users
/login.html'
template_name
=
'
authentication
/login.html'
if
not
settings
.
XPACK_ENABLED
:
return
template_name
...
...
@@ -51,7 +51,7 @@ class UserLoginView(FormView):
if
not
License
.
has_valid_license
():
return
template_name
template_name
=
'
users
/new_login.html'
template_name
=
'
authentication
/new_login.html'
return
template_name
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
@@ -145,7 +145,7 @@ class UserLoginView(FormView):
class
UserLoginOtpView
(
FormView
):
template_name
=
'
users
/login_otp.html'
template_name
=
'
authentication
/login_otp.html'
form_class
=
forms
.
UserCheckOtpCodeForm
redirect_field_name
=
'next'
...
...
apps/jumpserver/context_processor.py
View file @
ace028fa
# -*- coding: utf-8 -*-
#
from
django.contrib.staticfiles.templatetags.staticfiles
import
static
def
jumpserver_processor
(
request
):
context
=
{}
# Setting default pk
context
.
update
(
{
'DEFAULT_PK'
:
'00000000-0000-0000-0000-000000000000'
}
)
context
=
{
'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
...
...
apps/static/img/login
/login_image_1
.png
→
apps/static/img/login
_image
.png
View file @
ace028fa
File moved
apps/static/img/logo
-
text.png
→
apps/static/img/logo
_
text.png
View file @
ace028fa
File moved
apps/templates/_footer.html
View file @
ace028fa
{% load i18n %}
<div
class=
"footer fixed"
>
<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">-->
</div>
<div>
...
...
apps/templates/_user_profile.html
View file @
ace028fa
...
...
@@ -3,15 +3,11 @@
<li
class=
"nav-header"
>
<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' %})"
>
{% if interface and interface.logo_index %}
<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 %}
<img
alt=
"logo"
height=
"55"
width=
"185"
src=
"{{ LOGO_TEXT_URL }}"
/>
</div>
</div>
<div
class=
"logo-element"
>
<img
alt=
"image"
height=
"40"
src=
"
/static/img/logo.png
"
/>
<img
alt=
"image"
height=
"40"
src=
"
{{ LOGO_URL }}
"
/>
</div>
{% if ADMIN_ORGS and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
{% if ADMIN_ORGS|length > 1 or not CURRENT_ORG.is_default %}
...
...
apps/templates/base.html
View file @
ace028fa
...
...
@@ -5,18 +5,8 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"renderer"
content=
"webkit"
>
<title>
{% if interface and interface.login_title %}
{{ 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 %}
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{{ FAVICON_URL }}"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
<link
href=
"{% static 'css/jumpserver.css' %}"
rel=
"stylesheet"
>
{% block custom_head_css_js %} {% endblock %}
...
...
apps/templates/flash_message_standalone.html
View file @
ace028fa
...
...
@@ -22,18 +22,9 @@
<div
class=
"col-md-12"
>
<div
class=
"ibox-content"
>
<div>
{% if interface and interface.logo_logout %}
<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 %}
<img
src=
"{{ LOGO_URL }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
<h2
style=
"display: inline"
>
{% if interface and interface.login_title %}
{{ interface.login_title }}
{% else %}
{% trans 'Welcome to the Jumpserver open source fortress' %}
{% endif %}
{{ JMS_TITLE }}
</h2>
</div>
{% if errors %}
...
...
apps/users/templates/users/_base_otp.html
View file @
ace028fa
...
...
@@ -5,8 +5,8 @@
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Jumpserver
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%
}"
type=
"image/x-icon"
>
<title>
{{ JMS_TITLE }}
</title>
<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 'css/otp.css' %}"
/>
<script
src=
"{% static 'js/jquery-2.1.1.js' %}"
></script>
...
...
@@ -19,9 +19,9 @@
<header>
<div
class=
"logo"
>
<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
href=
"{% url 'index' %}"
>
Jumpserver
</a>
<a
href=
"{% url 'index' %}"
>
{{ JMS_TITLE }}
</a>
</div>
<div>
<a
href=
"{% url 'index' %}"
>
{% trans 'Home page' %}
</a>
...
...
apps/users/templates/users/forgot_password.html
View file @
ace028fa
...
...
@@ -4,10 +4,9 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<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>
{% include '_head_css_js.html' %}
...
...
@@ -22,14 +21,8 @@
<div
class=
"col-md-12"
>
<div
class=
"ibox-content"
>
{% if interface.logout_logo %}
<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 %}
<img
src=
"{{ LOGO_URL }}"
style=
"margin: auto"
width=
"82"
height=
"82"
>
<h2
class=
"font-bold"
style=
"display: inline"
>
{% trans 'Forgot password' %} ?
</h2>
<h1></h1>
{% if errors %}
<p
class=
"red-fonts"
>
{{ errors }}
</p>
...
...
apps/users/templates/users/reset_password.html
View file @
ace028fa
...
...
@@ -6,8 +6,8 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Jumpserver
</title>
<link
rel=
"shortcut icon"
href=
"{
% static "
img
/
facio
.
ico
"
%}"
type=
"image/x-icon"
>
<title>
{{ JMS_TITLE }}
</title>
<link
rel=
"shortcut icon"
href=
"{
{ FAVICON_URL }}
"
%}"
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"{% url 'javascript-catalog' %}"
></script>
...
...
@@ -43,7 +43,7 @@
</div>
<div
class=
"col-md-6"
>
<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=
""
>
{% csrf_token %}
{% 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