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
e2072a1e
Commit
e2072a1e
authored
Oct 26, 2018
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修复组织管理员刷新硬件信息,获取资产为None(使用fullname)和查看celery log 403问题
parent
54b6e06d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
inventory.py
apps/ops/inventory.py
+1
-1
views.py
apps/ops/views.py
+2
-2
No files found.
apps/ops/inventory.py
View file @
e2072a1e
...
...
@@ -50,7 +50,7 @@ class JMSInventory(BaseInventory):
def
convert_to_ansible
(
self
,
asset
,
run_as_admin
=
False
):
info
=
{
'id'
:
asset
.
id
,
'hostname'
:
asset
.
host
name
,
'hostname'
:
asset
.
full
name
,
'ip'
:
asset
.
ip
,
'port'
:
asset
.
port
,
'vars'
:
dict
(),
...
...
apps/ops/views.py
View file @
e2072a1e
...
...
@@ -6,7 +6,7 @@ from django.views.generic import ListView, DetailView, TemplateView
from
common.mixins
import
DatetimeSearchMixin
from
.models
import
Task
,
AdHoc
,
AdHocRunHistory
,
CeleryTask
from
common.permissions
import
SuperUserRequiredMixin
from
common.permissions
import
SuperUserRequiredMixin
,
AdminUserRequiredMixin
class
TaskListView
(
SuperUserRequiredMixin
,
DatetimeSearchMixin
,
ListView
):
...
...
@@ -121,6 +121,6 @@ class AdHocHistoryDetailView(SuperUserRequiredMixin, DetailView):
return
super
()
.
get_context_data
(
**
kwargs
)
class
CeleryTaskLogView
(
Super
UserRequiredMixin
,
DetailView
):
class
CeleryTaskLogView
(
Admin
UserRequiredMixin
,
DetailView
):
template_name
=
'ops/celery_task_log.html'
model
=
CeleryTask
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