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
8ff872f4
Commit
8ff872f4
authored
Sep 01, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ls config
parent
5940cec0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
27 deletions
+89
-27
jumpserver.css
apps/static/css/jumpserver.css
+35
-2
jumpserver.js
apps/static/js/jumpserver.js
+0
-0
_foot_js.html
apps/templates/_foot_js.html
+1
-1
_head_css_js.html
apps/templates/_head_css_js.html
+3
-10
base.html
apps/templates/base.html
+2
-2
models.py
apps/users/models.py
+1
-1
config-example.py
config-example.py
+47
-11
No files found.
apps/static/css/jumpserver.css
View file @
8ff872f4
...
@@ -23,4 +23,38 @@
...
@@ -23,4 +23,38 @@
th
a
{
th
a
{
color
:
#676a6c
;
color
:
#676a6c
;
}
}
\ No newline at end of file
.select2-container--default
.select2-results__option--highlighted
[
aria-selected
]
{
background-color
:
#1ab394
;
color
:
white
;
}
.select2-selection--multiple
{
border
:
1px
solid
#e5e6e7
!important
;
cursor
:
text
!important
;
}
.select2-container--forcus
{
border
:
1px
solid
#1AB394
!important
;
}
.select2-selection__choice
,
.chosen-container-multi
.chosen-choices
li
.search-choice
{
background
:
#f1f1f1
!important
;
border
:
1px
solid
#e5e6e7
!important
;
/*border: 1px solid #ededed;*/
border-radius
:
2px
!important
;
box-shadow
:
none
!important
;
color
:
#333333
!important
;
cursor
:
default
!important
;
line-height
:
13px
!important
;
/*margin: 3px 0 3px 5px !important;*/
padding
:
3px
20px
3px
5px
!important
;
position
:
relative
!important
;
}
.select2-container--default.select2-container--focus
.select2-selection--multiple
{
border
:
1px
solid
#1ab394
!important
;
box-shadow
:
0
0
5px
rgba
(
0
,
0
,
0
,
0.3
)
!important
;
}
apps/static/js/
base
.js
→
apps/static/js/
jumpserver
.js
View file @
8ff872f4
File moved
apps/templates/_foot_js.html
View file @
8ff872f4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!-- Custom and plugin javascript -->
<!-- Custom and plugin javascript -->
<script
src=
"{% static "
js
/
inspinia
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
inspinia
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
base
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
jumpserver
.
js
"
%}"
></script>
<!-- active menu -->
<!-- active menu -->
<script>
<script>
...
...
apps/templates/_head_css_js.html
View file @
8ff872f4
...
@@ -3,20 +3,13 @@
...
@@ -3,20 +3,13 @@
<!-- css file -->
<!-- css file -->
<link
href=
"{% static "
css
/
bootstrap
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
bootstrap
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
font-awesome
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
font-awesome
.
css
"
%}"
rel=
"stylesheet"
>
{#
<link
href=
"{% static "
css
/
plugins
/
iCheck
/
custom
.
css
"
%}"
rel=
"stylesheet"
>
#}
<link
href=
"{% static "
css
/
style
.
css
"
%}"
rel=
"stylesheet"
>
{#
<link
href=
"{% static "
css
/
animate
.
css
"
%}"
rel=
"stylesheet"
>
#}
{#
<link
href=
"{% static "
css
/
colorbox
.
css
"
%}"
rel=
"stylesheet"
>
#}
<link
href=
"{% static "
css
/
plugins
/
vaildator
/
jquery
.
validator
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
vaildator
/
jquery
.
validator
.
css
"
%}"
rel=
"stylesheet"
>
{#
<link
href=
"{% static "
css
/
magnific
/
magnific-popup
.
css
"
%}"
rel=
"stylesheet"
>
#}
{#
<link
href=
"{% static "
css
/
plugins
/
fullcalendar
/
fullcalendar
.
css
"
%}"
rel=
"stylesheet"
>
#}
{#
<link
href=
"{% static "
css
/
dropzone
/
basic
.
css
"
%}"
rel=
"stylesheet"
>
#}
<!-- scripts -->
<!-- scripts -->
<script
src=
"{% static "
js
/
jquery-2
.
1
.
1
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
jquery-2
.
1
.
1
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
bootstrap
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
bootstrap
.
min
.
js
"
%}"
></script>
<!-- validator js -->
{#
<script
src=
"{% static "
js
/
validator
/
jquery
.
validator
.
js
"
%}"
></script>
#}
{#
<script
src=
"{% static "
js
/
validator
/
zh_CN
.
js
"
%}"
></script>
#}
{#
<script
src=
"{% static "
js
/
datapicker
/
bootstrap-datepicker
.
js
"
%}"
></script>
#}
apps/templates/base.html
View file @
8ff872f4
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
<link
rel=
"shortcut icon"
href=
{%
static
"
img
/
facio
.
ico
"
%}
type=
"image/x-icon"
>
<link
rel=
"shortcut icon"
href=
{%
static
"
img
/
facio
.
ico
"
%}
type=
"image/x-icon"
>
{% include '_head_css_js.html' %}
{% include '_head_css_js.html' %}
{% block custom_head_css_js %} {% endblock %}
{% block custom_head_css_js %} {% endblock %}
<link
href=
"{% static "
css
/
style
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static "
js
/
base
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
jumpserver
.
js
"
%}"
></script>
</head>
</head>
<body>
<body>
...
...
apps/users/models.py
View file @
8ff872f4
...
@@ -115,7 +115,7 @@ class User(AbstractUser):
...
@@ -115,7 +115,7 @@ class User(AbstractUser):
private_key
=
models
.
CharField
(
max_length
=
5000
,
blank
=
True
,
verbose_name
=
'ssh私钥'
)
# ssh key max length 4096 bit
private_key
=
models
.
CharField
(
max_length
=
5000
,
blank
=
True
,
verbose_name
=
'ssh私钥'
)
# ssh key max length 4096 bit
public_key
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
verbose_name
=
'公钥'
)
public_key
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
verbose_name
=
'公钥'
)
comment
=
models
.
TextField
(
max_length
=
200
,
blank
=
True
,
verbose_name
=
'描述'
)
comment
=
models
.
TextField
(
max_length
=
200
,
blank
=
True
,
verbose_name
=
'描述'
)
first_login
=
models
.
BooleanField
(
default
=
False
)
is_
first_login
=
models
.
BooleanField
(
default
=
False
)
date_expired
=
models
.
DateTimeField
(
default
=
date_expired_default
,
blank
=
True
,
null
=
True
,
verbose_name
=
'有效期'
)
date_expired
=
models
.
DateTimeField
(
default
=
date_expired_default
,
blank
=
True
,
null
=
True
,
verbose_name
=
'有效期'
)
created_by
=
models
.
CharField
(
max_length
=
30
,
default
=
''
)
created_by
=
models
.
CharField
(
max_length
=
30
,
default
=
''
)
...
...
config-example.py
View file @
8ff872f4
...
@@ -13,25 +13,61 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
...
@@ -13,25 +13,61 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
class
Config
:
class
Config
:
# Use it to encrypt or decrypt data
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
os
.
environ
.
get
(
'SECRET_KEY'
)
or
'2vym+ky!997d5kkcc64mnz06y1mmui3lut#(^wd=
%
s_qj$1
%
x'
SECRET_KEY
=
os
.
environ
.
get
(
'SECRET_KEY'
)
or
'2vym+ky!997d5kkcc64mnz06y1mmui3lut#(^wd=
%
s_qj$1
%
x'
# How many line display every page, default 20
DISPLAY_PER_PAGE
=
20
DISPLAY_PER_PAGE
=
20
SITE_URL
=
'http://m'
# It's used to identify your site, When we send a create mail to user, we only know login url is /login/
# But we should know the absolute url like: http://jms.jumpserver.org/login/, so SITE_URL is
# HTTP_PROTOCOL://HOST[:PORT]
SITE_URL
=
'http://localhost'
# Django security setting, if your disable debug model, you should setting that
ALLOWED_HOSTS
=
[
'*'
]
ALLOWED_HOSTS
=
[
'*'
]
DEBUG
=
False
# Development env open this, when error occur display the full process track, Production disable it
DEBUG
=
True
# DEBUG, INFO, WARNING, ERROR, CRITICAL can set. See https://docs.djangoproject.com/en/1.10/topics/logging/
LOG_LEVEL
=
'DEBUG'
LOG_LEVEL
=
'DEBUG'
# Database setting, Support sqlite3, mysql, postgres ....
# See https://docs.djangoproject.com/en/1.10/ref/settings/#databases
# Sqlite setting:
DATABASE_ENGINE
=
'sqlite3'
DATABASE_ENGINE
=
'sqlite3'
DB_NAME
=
os
.
path
.
join
(
BASE_DIR
,
'db.sqlite3'
)
# Mysql or postgres setting like:
# DB_ENGINE = 'mysql'
# DB_HOST = '127.0.0.1'
# DB_PORT = 3306
# DB_USER = 'root'
# DB_PASSWORD = ''
# DB_NAME = 'jumpserver'
# When Django start it will bind this host and port
# ./manage.py runserver 127.0.0.1:8080
# Todo: Gunicorn or uwsgi run may be use it
HTTP_LISTEN_HOST
=
'127.0.0.1'
HTTP_LISTEN_HOST
=
'127.0.0.1'
HTTP_LISTEN_PORT
=
8000
HTTP_LISTEN_PORT
=
8080
# Use Redis as broker for celery and web socket
REDIS_HOST
=
'127.0.0.1'
REDIS_HOST
=
'127.0.0.1'
REDIS_PORT
=
6379
REDIS_PORT
=
6379
REDIS_PASSWORD
=
''
# REDIS_PASSWORD = ''
EMAIL_HOST
=
''
EMAIL_PORT
=
25
# Email SMTP setting, we only support smtp send mail
EMAIL_HOST_USER
=
''
# EMAIL_HOST = 'smtp.qq.com'
EMAIL_HOST_PASSWORD
=
''
# EMAIL_PORT = 25
EMAIL_USE_SSL
=
False
# If port is 465, set True
# EMAIL_HOST_USER = ''
EMAIL_USE_TLS
=
False
# If port is 587, set True
# EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX
=
'[Jumpserver] '
# EMAIL_USE_SSL = False # If port is 465, set True
# EMAIL_USE_TLS = False # If port is 587, set True
# EMAIL_SUBJECT_PREFIX = '[Jumpserver] '
def
__init__
(
self
):
def
__init__
(
self
):
pass
pass
...
...
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