From 4c34246750e2c1d27b6c7038c6928089ba43856a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AB=E5=8D=83=E6=B5=81?= <40739051+jym503558564@users.noreply.github.com> Date: Mon, 8 Jul 2019 10:44:53 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=91=BD=E4=BB=A4=E6=B2=A1=E6=9C=89=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=B5=84=E4=BA=A7bug=20(#2894)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Bugfix] 修复批量执行命令没有选择资产bug * [Bugfix] 修复批量执行命令没有选择资产bug(2) --- apps/ops/templates/ops/command_execution_create.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/ops/templates/ops/command_execution_create.html b/apps/ops/templates/ops/command_execution_create.html index a9cce3d5a..3e4436e41 100644 --- a/apps/ops/templates/ops/command_execution_create.html +++ b/apps/ops/templates/ops/command_execution_create.html @@ -136,10 +136,12 @@ function getSelectedAssetsNode() { nodes.forEach(function (node) { if (node.meta.type === 'asset' && !node.isHidden) { var protocols = node.meta.asset.protocols; - if (assetsNodeId.indexOf(node.id) === -1 && protocols.indexOf("ssh") > -1) { - assetsNodeId.push(node.id); - assetsNode.push(node) - } + protocols.forEach(function (val) { + if (assetsNodeId.indexOf(node.id) === -1 && val.indexOf("ssh") > -1) { + assetsNodeId.push(node.id); + assetsNode.push(node) + } + }); } }); return assetsNode;