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
08ccac3f
Commit
08ccac3f
authored
7 years ago
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of bitbucket.org:jumpserver/core into dev
parents
e2cb1287
ea27d05c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
forms.py
apps/terminal/forms.py
+11
-1
terminal_modal_accept.html
apps/terminal/templates/terminal/terminal_modal_accept.html
+1
-0
terminal_update.html
apps/terminal/templates/terminal/terminal_update.html
+1
-0
No files found.
apps/terminal/forms.py
View file @
08ccac3f
...
...
@@ -16,13 +16,23 @@ def get_all_command_storage():
yield
(
k
,
k
)
def
get_all_replay_storage
():
# storage_choices = []
from
common.models
import
Setting
Setting
.
refresh_all_settings
()
for
k
,
v
in
settings
.
TERMINAL_REPLAY_STORAGE
.
items
():
yield
(
k
,
k
)
class
TerminalForm
(
forms
.
ModelForm
):
command_storage
=
forms
.
ChoiceField
(
choices
=
get_all_command_storage
(),
label
=
_
(
"Command storage"
))
replay_storage
=
forms
.
ChoiceField
(
choices
=
get_all_replay_storage
(),
label
=
_
(
"Replay storage"
))
class
Meta
:
model
=
Terminal
fields
=
[
'name'
,
'remote_addr'
,
'ssh_port'
,
'http_port'
,
'comment'
,
'command_storage'
]
fields
=
[
'name'
,
'remote_addr'
,
'ssh_port'
,
'http_port'
,
'comment'
,
'command_storage'
,
'replay_storage'
]
help_texts
=
{
'ssh_port'
:
_
(
"Coco ssh listen port"
),
'http_port'
:
_
(
"Coco http/ws listen port"
),
...
...
This diff is collapsed.
Click to expand it.
apps/terminal/templates/terminal/terminal_modal_accept.html
View file @
08ccac3f
...
...
@@ -13,6 +13,7 @@
{% bootstrap_field form.ssh_port layout="horizontal" %}
{% bootstrap_field form.http_port layout="horizontal" %}
{% bootstrap_field form.command_storage layout="horizontal" %}
{% bootstrap_field form.replay_storage layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
</form>
...
...
This diff is collapsed.
Click to expand it.
apps/terminal/templates/terminal/terminal_update.html
View file @
08ccac3f
...
...
@@ -36,6 +36,7 @@
{% bootstrap_field form.ssh_port layout="horizontal" %}
{% bootstrap_field form.http_port layout="horizontal" %}
{% bootstrap_field form.command_storage layout="horizontal" %}
{% bootstrap_field form.replay_storage layout="horizontal" %}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Other' %}
</h3>
...
...
This diff is collapsed.
Click to expand it.
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