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
19be7ac5
Unverified
Commit
19be7ac5
authored
Feb 15, 2019
by
老广
Committed by
GitHub
Feb 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2394 from jumpserver/dev
Dev
parents
041edb61
49404f76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
command_execution_create.html
apps/ops/templates/ops/command_execution_create.html
+1
-1
models.py
apps/terminal/models.py
+3
-6
config_example.yml
config_example.yml
+2
-2
No files found.
apps/ops/templates/ops/command_execution_create.html
View file @
19be7ac5
...
@@ -170,7 +170,7 @@ function initResultTerminal() {
...
@@ -170,7 +170,7 @@ function initResultTerminal() {
term
=
new
Terminal
({
term
=
new
Terminal
({
cursorBlink
:
false
,
cursorBlink
:
false
,
screenKeys
:
false
,
screenKeys
:
false
,
fontFamily
:
'
"Consolas", "monospace"
'
,
fontFamily
:
'
monaco, Consolas, "Lucida Console", monospace
'
,
fontSize
:
14
,
fontSize
:
14
,
rightClickSelectsWord
:
true
,
rightClickSelectsWord
:
true
,
disableStdin
:
true
,
disableStdin
:
true
,
...
...
apps/terminal/models.py
View file @
19be7ac5
...
@@ -168,7 +168,7 @@ class Session(OrgModelMixin):
...
@@ -168,7 +168,7 @@ class Session(OrgModelMixin):
upload_to
=
'replay'
upload_to
=
'replay'
ACTIVE_CACHE_KEY_PREFIX
=
'SESSION_ACTIVE_{}'
ACTIVE_CACHE_KEY_PREFIX
=
'SESSION_ACTIVE_{}'
def
get_rel_replay_path
(
self
,
version
=
3
):
def
get_rel_replay_path
(
self
,
version
=
2
):
"""
"""
获取session日志的文件路径
获取session日志的文件路径
:param version: 原来后缀是 .gz,为了统一新版本改为 .replay.gz
:param version: 原来后缀是 .gz,为了统一新版本改为 .replay.gz
...
@@ -177,13 +177,10 @@ class Session(OrgModelMixin):
...
@@ -177,13 +177,10 @@ class Session(OrgModelMixin):
suffix
=
'.replay.gz'
suffix
=
'.replay.gz'
if
version
==
1
:
if
version
==
1
:
suffix
=
'.gz'
suffix
=
'.gz'
if
version
<=
2
:
date
=
self
.
date_start
.
strftime
(
'
%
Y-
%
m-
%
d'
)
date
=
self
.
date_start
.
strftime
(
'
%
Y-
%
m-
%
d'
)
else
:
date
=
self
.
date_start
.
utcnow
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
return
os
.
path
.
join
(
date
,
str
(
self
.
id
)
+
suffix
)
return
os
.
path
.
join
(
date
,
str
(
self
.
id
)
+
suffix
)
def
get_local_path
(
self
,
version
=
3
):
def
get_local_path
(
self
,
version
=
2
):
rel_path
=
self
.
get_rel_replay_path
(
version
=
version
)
rel_path
=
self
.
get_rel_replay_path
(
version
=
version
)
if
version
==
2
:
if
version
==
2
:
local_path
=
os
.
path
.
join
(
self
.
upload_to
,
rel_path
)
local_path
=
os
.
path
.
join
(
self
.
upload_to
,
rel_path
)
...
...
config_example.yml
View file @
19be7ac5
...
@@ -18,8 +18,8 @@ BOOTSTRAP_TOKEN:
...
@@ -18,8 +18,8 @@ BOOTSTRAP_TOKEN:
# Session expiration setting, Default 24 hour, Also set expired on on browser close
# Session expiration setting, Default 24 hour, Also set expired on on browser close
# 浏览器Session过期时间,默认24小时, 也可以设置浏览器关闭则过期
# 浏览器Session过期时间,默认24小时, 也可以设置浏览器关闭则过期
# SESSION_COOKIE_AGE:
3600 * 24
# SESSION_COOKIE_AGE:
86400
# SESSION_EXPIRE_AT_BROWSER_CLOSE:
F
alse
# SESSION_EXPIRE_AT_BROWSER_CLOSE:
f
alse
# Database setting, Support sqlite3, mysql, postgres ....
# Database setting, Support sqlite3, mysql, postgres ....
# 数据库设置
# 数据库设置
...
...
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