[Update] 修改测试连接节点时,资产为下面的所有资产

pull/2357/head
ibuler 2019-01-21 11:58:51 +08:00
parent d8069f47f2
commit 55b55f6162
1 changed files with 2 additions and 2 deletions

View File

@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView):
def get(self, request, *args, **kwargs):
node_id = kwargs.get('pk')
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 = _("Update node asset hardware information: {}").format(node.name)
task = update_assets_hardware_info_util.delay(assets, task_name=task_name)
@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView):
def get(self, request, *args, **kwargs):
node_id = kwargs.get('pk')
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 = _("Test if the assets under the node are connectable: {}".format(node.name))
task = test_asset_connectivity_util.delay(assets, task_name=task_name)