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
55b55f61
Commit
55b55f61
authored
Jan 21, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改测试连接节点时,资产为下面的所有资产
parent
d8069f47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
node.py
apps/assets/api/node.py
+2
-2
No files found.
apps/assets/api/node.py
View file @
55b55f61
...
@@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView):
...
@@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
node_id
=
kwargs
.
get
(
'pk'
)
node_id
=
kwargs
.
get
(
'pk'
)
node
=
get_object_or_404
(
self
.
model
,
id
=
node_id
)
node
=
get_object_or_404
(
self
.
model
,
id
=
node_id
)
assets
=
node
.
assets
.
all
()
assets
=
node
.
get_all_assets
()
# task_name = _("更新节点资产硬件信息: {}".format(node.name))
# task_name = _("更新节点资产硬件信息: {}".format(node.name))
task_name
=
_
(
"Update node asset hardware information: {}"
)
.
format
(
node
.
name
)
task_name
=
_
(
"Update node asset hardware information: {}"
)
.
format
(
node
.
name
)
task
=
update_assets_hardware_info_util
.
delay
(
assets
,
task_name
=
task_name
)
task
=
update_assets_hardware_info_util
.
delay
(
assets
,
task_name
=
task_name
)
...
@@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView):
...
@@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
node_id
=
kwargs
.
get
(
'pk'
)
node_id
=
kwargs
.
get
(
'pk'
)
node
=
get_object_or_404
(
self
.
model
,
id
=
node_id
)
node
=
get_object_or_404
(
self
.
model
,
id
=
node_id
)
assets
=
node
.
assets
.
all
()
assets
=
node
.
get_all_assets
()
# task_name = _("测试节点下资产是否可连接: {}".format(node.name))
# task_name = _("测试节点下资产是否可连接: {}".format(node.name))
task_name
=
_
(
"Test if the assets under the node are connectable: {}"
.
format
(
node
.
name
))
task_name
=
_
(
"Test if the assets under the node are connectable: {}"
.
format
(
node
.
name
))
task
=
test_asset_connectivity_util
.
delay
(
assets
,
task_name
=
task_name
)
task
=
test_asset_connectivity_util
.
delay
(
assets
,
task_name
=
task_name
)
...
...
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