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
3f186315
Commit
3f186315
authored
Jan 08, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复session搜索bug
parent
676d640e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
tasks.py
apps/assets/tasks.py
+2
-2
asset.py
apps/assets/views/asset.py
+2
-2
session.py
apps/terminal/views/session.py
+4
-4
No files found.
apps/assets/tasks.py
View file @
3f186315
...
...
@@ -390,8 +390,8 @@ def push_system_user_period():
for
system_user
in
system_users
:
tasks
.
extend
(
get_push_system_user_tasks
(
system_user
))
task_name
=
_
(
"Push
system user to cluster assets period: {}->
{}"
)
.
format
(
cluster
.
name
,
', '
.
join
(
s
.
name
for
s
in
system_users
)
task_name
=
_
(
"Push
cluster system users to assets period:
{}"
)
.
format
(
cluster
.
name
)
hosts
=
[
asset
.
hostname
for
asset
in
cluster
.
assets
.
all
()]
update_or_create_ansible_task
(
...
...
apps/assets/views/asset.py
View file @
3f186315
...
...
@@ -159,7 +159,7 @@ class AssetUpdateView(AdminUserRequiredMixin, UpdateView):
'action'
:
_
(
'Update asset'
),
}
kwargs
.
update
(
context
)
return
super
(
AssetUpdateView
,
self
)
.
get_context_data
(
**
kwargs
)
return
super
()
.
get_context_data
(
**
kwargs
)
class
AssetDeleteView
(
AdminUserRequiredMixin
,
DeleteView
):
...
...
@@ -184,7 +184,7 @@ class AssetDetailView(DetailView):
'system_users_all'
:
SystemUser
.
objects
.
all
(),
}
kwargs
.
update
(
context
)
return
super
(
AssetDetailView
,
self
)
.
get_context_data
(
**
kwargs
)
return
super
()
.
get_context_data
(
**
kwargs
)
@method_decorator
(
csrf_exempt
,
name
=
'dispatch'
)
...
...
apps/terminal/views/session.py
View file @
3f186315
# -*- coding: utf-8 -*-
#
from
django.views.generic
import
ListView
,
UpdateView
,
DeleteView
,
DetailView
,
TemplateView
from
django.views.generic
import
ListView
from
django.views.generic.edit
import
SingleObjectMixin
from
django.utils.translation
import
ugettext
as
_
from
django.utils
import
timezone
...
...
@@ -51,9 +51,9 @@ class SessionListView(AdminUserRequiredMixin, DatetimeSearchMixin, ListView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'user_list'
:
utils
.
get_
user_list_from_cache
(),
'asset_list'
:
utils
.
get_
asset_list_from_cache
(),
'system_user_list'
:
utils
.
get_s
ystem_user_list_from_cache
(),
'user_list'
:
utils
.
get_
session_user_list
(),
'asset_list'
:
utils
.
get_
session_asset_list
(),
'system_user_list'
:
utils
.
get_s
ession_system_user_list
(),
'date_from'
:
self
.
date_from
,
'date_to'
:
self
.
date_to
,
'user'
:
self
.
user
,
...
...
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