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
9d24912a
Commit
9d24912a
authored
Mar 28, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
[Update] Merge
parents
4bc5eced
f137c574
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
20 deletions
+28
-20
__init__.py
apps/__init__.py
+0
-1
const.py
apps/jumpserver/const.py
+3
-0
context_processor.py
apps/jumpserver/context_processor.py
+5
-1
settings.py
apps/jumpserver/settings.py
+8
-7
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+5
-5
_copyright.html
apps/templates/_copyright.html
+2
-2
_footer.html
apps/templates/_footer.html
+2
-2
jms
jms
+2
-1
rpm_requirements.txt
requirements/rpm_requirements.txt
+1
-1
No files found.
apps/__init__.py
View file @
9d24912a
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
__version__
=
"1.4.9"
apps/jumpserver/const.py
0 → 100644
View file @
9d24912a
# -*- coding: utf-8 -*-
#
VERSION
=
'1.4.9'
apps/jumpserver/context_processor.py
View file @
9d24912a
# -*- coding: utf-8 -*-
#
from
django.contrib.staticfiles.templatetags.staticfiles
import
static
from
django.conf
import
settings
from
django.utils.translation
import
gettext_lazy
as
_
def
jumpserver_processor
(
request
):
...
...
@@ -11,7 +13,9 @@ def jumpserver_processor(request):
'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'
'JMS_TITLE'
:
'Jumpserver'
,
'VERSION'
:
settings
.
VERSION
,
'COPYRIGHT'
:
_
(
'Beijing Duizhan Tech, Inc.'
)
+
' © 2014-2019'
}
return
context
...
...
apps/jumpserver/settings.py
View file @
9d24912a
...
...
@@ -12,25 +12,24 @@ https://docs.djangoproject.com/en/1.10/ref/settings/
import
os
import
sys
import
socket
import
ldap
from
django.urls
import
reverse_lazy
from
.
import
const
from
.conf
import
load_user_config
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
PROJECT_DIR
=
os
.
path
.
dirname
(
BASE_DIR
)
sys
.
path
.
append
(
PROJECT_DIR
)
from
apps
import
__version__
VERSION
=
__version__
CONFIG
=
load_user_config
()
LOG_DIR
=
os
.
path
.
join
(
PROJECT_DIR
,
'logs'
)
JUMPSERVER_LOG_FILE
=
os
.
path
.
join
(
LOG_DIR
,
'jumpserver.log'
)
ANSIBLE_LOG_FILE
=
os
.
path
.
join
(
LOG_DIR
,
'ansible.log'
)
GUNICORN_LOG_FILE
=
os
.
path
.
join
(
LOG_DIR
,
'gunicorn.log'
)
VERSION
=
const
.
VERSION
if
not
os
.
path
.
isdir
(
LOG_DIR
):
os
.
makedirs
(
LOG_DIR
)
...
...
@@ -163,7 +162,7 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
DB_OPTIONS
=
{}
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.{}'
.
format
(
CONFIG
.
DB_ENGINE
),
'ENGINE'
:
'django.db.backends.{}'
.
format
(
CONFIG
.
DB_ENGINE
.
lower
()
),
'NAME'
:
CONFIG
.
DB_NAME
,
'HOST'
:
CONFIG
.
DB_HOST
,
'PORT'
:
CONFIG
.
DB_PORT
,
...
...
@@ -174,8 +173,10 @@ DATABASES = {
}
}
DB_CA_PATH
=
os
.
path
.
join
(
PROJECT_DIR
,
'data'
,
'ca.pem'
)
if
CONFIG
.
DB_ENGINE
==
'mysql'
and
os
.
path
.
isfile
(
DB_CA_PATH
):
DB_OPTIONS
[
'ssl'
]
=
{
'ca'
:
DB_CA_PATH
}
if
CONFIG
.
DB_ENGINE
.
lower
()
==
'mysql'
:
DB_OPTIONS
[
'init_command'
]
=
"SET sql_mode='STRICT_TRANS_TABLES'"
if
os
.
path
.
isfile
(
DB_CA_PATH
):
DB_OPTIONS
[
'ssl'
]
=
{
'ca'
:
DB_CA_PATH
}
# Password validation
...
...
@@ -411,7 +412,7 @@ AUTH_LDAP_USER_ATTR_MAP = {"username": "cn", "name": "sn", "email": "mail"}
# AUTH_LDAP_GROUP_SEARCH_OU, ldap.SCOPE_SUBTREE, AUTH_LDAP_GROUP_SEARCH_FILTER
# )
AUTH_LDAP_CONNECTION_OPTIONS
=
{
ldap
.
OPT_TIMEOUT
:
5
ldap
.
OPT_TIMEOUT
:
30
}
AUTH_LDAP_GROUP_CACHE_TIMEOUT
=
1
AUTH_LDAP_ALWAYS_UPDATE_USER
=
True
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
9d24912a
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
9d24912a
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-2
8 12:41
+0800\n"
"POT-Creation-Date: 2019-03-2
7 17:33
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -2324,6 +2324,10 @@ msgstr ""
msgid "Special char not allowed"
msgstr "不能包含特殊字符"
#: jumpserver/context_processor.py:18
msgid "Beijing Duizhan Tech, Inc."
msgstr "北京堆栈科技有限公司"
#: jumpserver/views.py:185
msgid ""
"<div>Luna is a separately deployed program, you need to deploy Luna, coco, "
...
...
@@ -3326,10 +3330,6 @@ msgstr "创建录像存储"
msgid "Create command storage"
msgstr "创建命令存储"
#: templates/_copyright.html:2 templates/_footer.html:8
msgid " Beijing Duizhan Tech, Inc. "
msgstr " 北京堆栈科技有限公司 "
#: templates/_header_bar.html:31
msgid "Help"
msgstr "帮助"
...
...
apps/templates/_copyright.html
View file @
9d24912a
{% load i18n %}
<strong>
Copyright
</strong>
{% trans ' Beijing Duizhan Tech, Inc. ' %}
©
2014-2019
\ No newline at end of file
<strong>
Copyright
</strong>
{{ COPYRIGHT }}
\ No newline at end of file
apps/templates/_footer.html
View file @
9d24912a
{% load i18n %}
<div
class=
"footer fixed"
>
<div
class=
"pull-right"
>
Version
<strong>
1.4.9
-{% include '_build.html' %}
</strong>
GPLv2.
Version
<strong>
{{ VERSION }}
-{% include '_build.html' %}
</strong>
GPLv2.
<!--<img style="display: none" src="http://www.jumpserver.org/img/evaluate_avatar1.jpg">-->
</div>
<div>
<strong>
Copyright
</strong>
{% trans ' Beijing Duizhan Tech, Inc. ' %}
©
2014-2019
{% include '_copyright.html' %}
</div>
</div>
jms
View file @
9d24912a
...
...
@@ -13,7 +13,8 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys
.
path
.
insert
(
0
,
BASE_DIR
)
try
:
from
apps
import
__version__
from
apps.jumpserver
import
const
__version__
=
const
.
VERSION
except
ImportError
as
e
:
print
(
"Not found __version__: {}"
.
format
(
e
))
print
(
"Sys path: {}"
.
format
(
sys
.
path
))
...
...
requirements/rpm_requirements.txt
View file @
9d24912a
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel sshpass openldap-devel mariadb-devel mysql-devel libffi-devel openssh-clients
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel sshpass openldap-devel mariadb-devel mysql-devel libffi-devel openssh-clients
openldap-clients
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