From 4dde79234d59687984d23dc301512aa54160b468 Mon Sep 17 00:00:00 2001 From: crayon <873217631@qq.com> Date: Thu, 31 Aug 2023 16:27:50 +0800 Subject: [PATCH] =?UTF-8?q?sprintfix:=20=E8=8A=82=E7=82=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8F=92=E4=BB=B6=20Proxy=20os=20=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atoms/nodeman/create_task/v4_0.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v4_0.js b/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v4_0.js index 847d333e00..de8d830beb 100644 --- a/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v4_0.js +++ b/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v4_0.js @@ -25,6 +25,18 @@ function init_columns(self, node_type, op_type) { + + // Proxy 仅支持 Linux + let os_type_options = [ + {value: "LINUX", text: gettext("LINUX")} + ]; + if (node_type === "AGENT") { + os_type_options.push(...[ + {value: "WINDOWS", text: gettext("WINDOWS")}, + {value: "AIX", text: gettext("AIX")} + ]); + } + let common_columns = [ { tag_code: "nodeman_bk_cloud_id", @@ -93,11 +105,7 @@ attrs: { name: gettext("操作系统类型"), width: "180px", - items: [ - {value: "LINUX", text: gettext("LINUX")}, - {value: "WINDOWS", text: gettext("WINDOWS")}, - {value: "AIX", text: gettext("AIX")} - ], + items: os_type_options, default: "LINUX", validation: [ {