From 57f0271a530082f5d77072a90c8b1fdde4152c67 Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Thu, 6 Feb 2025 15:54:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E6=AD=A5=E9=AA=A4=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=B7=A6=E4=BE=A7=E6=AD=A5=E9=AA=A4=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=97=B6=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=87=8D=E7=BD=AE=20#3406?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/executive-history/step-detail/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/src/views/executive-history/step-detail/index.vue b/src/frontend/src/views/executive-history/step-detail/index.vue index 172db72706..b6cdf7b273 100644 --- a/src/frontend/src/views/executive-history/step-detail/index.vue +++ b/src/frontend/src/views/executive-history/step-detail/index.vue @@ -404,6 +404,10 @@ id: payload.stepInstanceId, executeCount: payload.executeCount || 0, }; + this.currentGroup = { + resultType: '', + tag: '', + }; this.taskInstanceId = payload.taskInstanceId; this.isTask = payload.isTask; this.taskStepList = Object.freeze(payload.taskStepList); From 3055920284a6061455d5da4b44cac64674004a18 Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Fri, 7 Feb 2025 11:32:28 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E8=84=9A=E6=9C=AC=E8=A7=A3=E9=87=8A=E5=99=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E8=84=9A=E6=9C=AC=20#3321=20#=20Reviewed,=20transacti?= =?UTF-8?q?on=20id:=2029892?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/language.mjs | 1 - .../src/components/ace-editor/index.vue | 1 - .../task-step/common/rolling/index.vue | 4 +- .../task-step/script/item-factory.vue | 2 + .../script/strategy/window-interpreter.vue | 54 +++++++++++++++++++ .../task-instance-detail-step-script.js | 1 + .../src/domain/model/task/task-script-step.js | 1 + src/frontend/src/i18n/language/en.json | 6 ++- src/frontend/src/i18n/language/zh.json | 6 ++- .../views/executive-history/language/en.json | 3 +- .../views/executive-history/language/zh.json | 3 +- .../task-step-detail/exec-script.vue | 5 ++ .../fast-execution/exec-script/index.vue | 11 ++++ .../task-step-view/exec-script.vue | 5 ++ .../task-step/components/exec-script.vue | 9 ++++ .../src/views/task-manage/language/en.json | 3 +- .../src/views/task-manage/language/zh.json | 3 +- .../components/diff/task-step/script.vue | 6 +++ 18 files changed, 115 insertions(+), 9 deletions(-) create mode 100644 src/frontend/src/components/task-step/script/strategy/window-interpreter.vue diff --git a/src/frontend/language.mjs b/src/frontend/language.mjs index acbfd670dd..c187b91f96 100644 --- a/src/frontend/language.mjs +++ b/src/frontend/language.mjs @@ -46,7 +46,6 @@ const recur = async (target) => { const { message, namespace } = data.default; const znData = {}; const enData = {}; - console.log('data = ', data); Object.keys(message).forEach((key) => { if (typeof message[key] === 'string') { znData[key] = key; diff --git a/src/frontend/src/components/ace-editor/index.vue b/src/frontend/src/components/ace-editor/index.vue index d1af540747..d86c6621de 100644 --- a/src/frontend/src/components/ace-editor/index.vue +++ b/src/frontend/src/components/ace-editor/index.vue @@ -492,7 +492,6 @@ fetchAiConfig() { AiService.fetchConfig() .then((data) => { - console.log('data = ', data); this.isAiEnable = data.enabled; }); }, diff --git a/src/frontend/src/components/task-step/common/rolling/index.vue b/src/frontend/src/components/task-step/common/rolling/index.vue index 55f0c7aaec..5ff1e7a6d2 100644 --- a/src/frontend/src/components/task-step/common/rolling/index.vue +++ b/src/frontend/src/components/task-step/common/rolling/index.vue @@ -197,7 +197,9 @@ formData: { handler(formData) { this.validatorExpr(formData[this.exprField]); - this.showTips(); + setTimeout(() => { + this.showTips(); + }); }, immediate: true, deep: true, diff --git a/src/frontend/src/components/task-step/script/item-factory.vue b/src/frontend/src/components/task-step/script/item-factory.vue index b969d23011..211e6e6ac0 100644 --- a/src/frontend/src/components/task-step/script/item-factory.vue +++ b/src/frontend/src/components/task-step/script/item-factory.vue @@ -45,6 +45,7 @@ import ScriptParam from './strategy/script-param'; import ScriptSourceOfExecution from './strategy/script-source-of-execution'; import ScriptSourceOfTemplate from './strategy/script-source-of-template'; + import WindowsInterpreter from './strategy/window-interpreter.vue'; export default { name: 'ExecuteScriptItemFactory', @@ -68,6 +69,7 @@ executeTargetOfTemplate: ExecuteTargetOfTemplate, executeTargetOfExecution: ExecuteTargetOfExecution, rolling: Rolling, + windowsInterpreter: WindowsInterpreter, }; if (!Object.prototype.hasOwnProperty.call(comMap, this.name)) { return 'div'; diff --git a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue new file mode 100644 index 0000000000..e5f396061c --- /dev/null +++ b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/frontend/src/domain/model/execution/task-instance-detail-step-script.js b/src/frontend/src/domain/model/execution/task-instance-detail-step-script.js index 83344b1289..d5a73f51e8 100644 --- a/src/frontend/src/domain/model/execution/task-instance-detail-step-script.js +++ b/src/frontend/src/domain/model/execution/task-instance-detail-step-script.js @@ -48,6 +48,7 @@ export default class TaskInstanceDetailStepScript { this.account = payload.account; this.status = payload.status; this.rollingEnabled = Boolean(payload.rollingEnabled); + this.windowsInterpreter = payload.windowsInterpreter; this.executeTarget = new ExecuteTargetModel(payload.executeTarget || {}); this.rollingConfig = this.initRollingConfig(payload.rollingConfig); diff --git a/src/frontend/src/domain/model/task/task-script-step.js b/src/frontend/src/domain/model/task/task-script-step.js index 90eb818f7a..257f90cce6 100644 --- a/src/frontend/src/domain/model/task/task-script-step.js +++ b/src/frontend/src/domain/model/task/task-script-step.js @@ -48,6 +48,7 @@ export default class TaskScriptStep { this.account = payload.account; this.status = payload.status; this.executeTarget = new ExecuteTargetModel(payload.executeTarget || {}); + this.windowsInterpreter = payload.windowsInterpreter; } get isReferPublicScript() { diff --git a/src/frontend/src/i18n/language/en.json b/src/frontend/src/i18n/language/en.json index 96b7c40f47..6b020f1d03 100644 --- a/src/frontend/src/i18n/language/en.json +++ b/src/frontend/src/i18n/language/en.json @@ -562,5 +562,9 @@ "注意!为了回答更准确,大模型可能将你提供的信息作为训练材料,如果内容带有敏感信息,请酌情使用!": "Attention! The AI model may use the information you provide as training material. If the content contains sensitive information, please use it cautiously!", "小鲸": "AI-assistant", "开源社区": "Open Source", - "脚本参数最大输入为 64KB": "The maximum script parameter size is 64KB" + "脚本参数最大输入为 64KB": "The maximum script parameter size is 64KB", + "解释器": "Interpreter", + "使用目标机器指定路径下的解释器运行本脚本(近对Windows有效)": "Run this script using the interpreter in the specified path on the target hosts (Only for Windows)", + "自定义window解释器路径": "Customize the Interpreter Path in Windows", + "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python": "Enter the path of the custom interpreter software on the target machine, such as: /usr/local/python-2/bin/python" } \ No newline at end of file diff --git a/src/frontend/src/i18n/language/zh.json b/src/frontend/src/i18n/language/zh.json index 3de5e7697b..f12e167a99 100644 --- a/src/frontend/src/i18n/language/zh.json +++ b/src/frontend/src/i18n/language/zh.json @@ -562,5 +562,9 @@ "注意!为了回答更准确,大模型可能将你提供的信息作为训练材料,如果内容带有敏感信息,请酌情使用!": "注意!为了回答更准确,大模型可能将你提供的信息作为训练材料,如果内容带有敏感信息,请酌情使用!", "小鲸": "小鲸", "开源社区": "开源社区", - "脚本参数最大输入为 64KB": "脚本参数最大输入为 64KB" + "脚本参数最大输入为 64KB": "脚本参数最大输入为 64KB", + "解释器": "解释器", + "使用目标机器指定路径下的解释器运行本脚本(近对Windows有效)": "使用目标机器指定路径下的解释器运行本脚本(近对Windows有效)", + "自定义window解释器路径": "自定义window解释器路径", + "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python": "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python" } \ No newline at end of file diff --git a/src/frontend/src/views/executive-history/language/en.json b/src/frontend/src/views/executive-history/language/en.json index 5dc22a3bae..927bc1d4ad 100644 --- a/src/frontend/src/views/executive-history/language/en.json +++ b/src/frontend/src/views/executive-history/language/en.json @@ -192,5 +192,6 @@ "日志文本过长,超出 AI 解析范围,请框选部分日志,再次出发点小鲸分析。": "The length of log text exceeds the scope of AI analysis, please manually select some key logs and resubmit.", "报错日志看不懂?来提问小鲸吧~": "Find out with AI", "管控区域_ID_IPv4": "BK-Net ID:IPv4", - "管控区域_ID_IPv6": "BK-Net ID:IPv6" + "管控区域_ID_IPv6": "BK-Net ID:IPv6", + "解释器:": "Interpreter:" } \ No newline at end of file diff --git a/src/frontend/src/views/executive-history/language/zh.json b/src/frontend/src/views/executive-history/language/zh.json index 4b3015eb58..04c9a96d90 100644 --- a/src/frontend/src/views/executive-history/language/zh.json +++ b/src/frontend/src/views/executive-history/language/zh.json @@ -197,5 +197,6 @@ "节点IP": "节点 IP", "节点主机ID": "节点主机 ID", "管控区域_ID_IPv4": "管控区域 ID:IPv4", - "管控区域_ID_IPv6": "管控区域 ID:IPv6" + "管控区域_ID_IPv6": "管控区域 ID:IPv6", + "解释器:": "解释器:" } \ No newline at end of file diff --git a/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/task-step-detail/exec-script.vue b/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/task-step-detail/exec-script.vue index 197cb010f7..b8405cf626 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/task-step-detail/exec-script.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/task-step-detail/exec-script.vue @@ -59,6 +59,11 @@ readonly :value="stepInfo.scriptParamText || '--'" /> + + {{ stepInfo.windowsInterpreter }} + {{ stepInfo.timeout }}(s) diff --git a/src/frontend/src/views/fast-execution/exec-script/index.vue b/src/frontend/src/views/fast-execution/exec-script/index.vue index 751b9a9a5d..98b2c5bc39 100644 --- a/src/frontend/src/views/fast-execution/exec-script/index.vue +++ b/src/frontend/src/views/fast-execution/exec-script/index.vue @@ -69,6 +69,11 @@ param-field="scriptParam" secure-field="secureParam" @on-change="handleChange" /> + + + {{ stepInfo.windowsInterpreter }} + {{ stepInfo.timeout }}(s) diff --git a/src/frontend/src/views/task-manage/common/render-task-step/task-step/components/exec-script.vue b/src/frontend/src/views/task-manage/common/render-task-step/task-step/components/exec-script.vue index d5c1797a9d..ae24282fb3 100644 --- a/src/frontend/src/views/task-manage/common/render-task-step/task-step/components/exec-script.vue +++ b/src/frontend/src/views/task-manage/common/render-task-step/task-step/components/exec-script.vue @@ -62,6 +62,11 @@ param-field="scriptParam" secure-field="secureParam" @on-change="handleChange" /> + {{ $t('template.脚本参数:') }} {{ data.scriptParamText || '-' }} +
+ {{ $t('template.解释器:') }} + {{ data.windowsInterpreter || '-' }} +
From 3ca9597e020155d358894910b0a17f476cd0c151 Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Fri, 7 Feb 2025 15:14:54 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E8=84=9A=E6=9C=AC=E8=A7=A3=E9=87=8A=E5=99=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E8=84=9A=E6=9C=AC=20#3321=20#=20Reviewed,=20transacti?= =?UTF-8?q?on=20id:=2029896?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-step/script/strategy/window-interpreter.vue | 4 ++-- src/frontend/src/i18n/language/en.json | 4 ++-- src/frontend/src/i18n/language/zh.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue index e5f396061c..bf76ed9f6c 100644 --- a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue +++ b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue @@ -5,9 +5,9 @@ :label="$t('解释器')"> - {{ $t('自定义window解释器路径') }} + {{ $t('自定义windows解释器路径') }}
Date: Sat, 8 Feb 2025 11:45:51 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E8=84=9A=E6=9C=AC=E8=A7=A3=E9=87=8A=E5=99=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E8=84=9A=E6=9C=AC=20#3321=20#=20Reviewed,=20transacti?= =?UTF-8?q?on=20id:=2029932?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-step/script/strategy/window-interpreter.vue | 12 ++++++++++-- src/frontend/src/i18n/language/en.json | 2 +- src/frontend/src/i18n/language/zh.json | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue index bf76ed9f6c..7022fe2652 100644 --- a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue +++ b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue @@ -3,7 +3,9 @@ class="form-item-content" :field="field" :label="$t('解释器')"> - + @@ -15,7 +17,7 @@ style="margin-top: 8px">
@@ -47,6 +49,12 @@ immediate: true, }); + const handleCustomChange = (value) => { + if (!value) { + emits('on-change', props.field, ''); + } + }; + const handleChange = (value) => { emits('on-change', props.field, value); }; diff --git a/src/frontend/src/i18n/language/en.json b/src/frontend/src/i18n/language/en.json index 5abba06e39..7ff21392f8 100644 --- a/src/frontend/src/i18n/language/en.json +++ b/src/frontend/src/i18n/language/en.json @@ -566,5 +566,5 @@ "解释器": "Interpreter", "使用目标机器指定路径下的解释器运行本脚本(仅对Windows有效)": "Run this script using the interpreter in the specified path on the target hosts (Only for Windows)", "自定义windows解释器路径": "Customize the Interpreter Path in Windows", - "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python": "Enter the path of the custom interpreter software on the target machine, such as: /usr/local/python-2/bin/python" + "输入目标机器上的自定义解释器软件路径,如:D:\\Software\\python3\\python.exe": "Enter the path of the custom interpreter software on the target machine, such as: D:\\Software\\python3\\python.exe" } \ No newline at end of file diff --git a/src/frontend/src/i18n/language/zh.json b/src/frontend/src/i18n/language/zh.json index 14e52c4678..2ceb9f75e3 100644 --- a/src/frontend/src/i18n/language/zh.json +++ b/src/frontend/src/i18n/language/zh.json @@ -566,5 +566,5 @@ "解释器": "解释器", "使用目标机器指定路径下的解释器运行本脚本(仅对Windows有效)": "使用目标机器指定路径下的解释器运行本脚本(仅对Windows有效)", "自定义windows解释器路径": "自定义windows解释器路径", - "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python": "输入目标机器上的自定义解释器软件路径,如:/usr/local/python-2/bin/python" + "输入目标机器上的自定义解释器软件路径,如:D:\\Software\\python3\\python.exe": "输入目标机器上的自定义解释器软件路径,如:D:\\Software\\python3\\python.exe" } \ No newline at end of file From dd9ac06717f44d07319a07f42d69cb8ee164a6ab Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Thu, 13 Feb 2025 15:55:24 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E8=84=9A=E6=9C=AC=E8=A7=A3=E9=87=8A=E5=99=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E8=84=9A=E6=9C=AC=20#3321=20#=20Reviewed,=20transacti?= =?UTF-8?q?on=20id:=2030240?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/strategy/window-interpreter.vue | 39 ++++++++++++++----- src/frontend/src/i18n/index.js | 2 +- src/frontend/src/i18n/language/en.json | 3 +- src/frontend/src/i18n/language/zh.json | 3 +- .../fast-execution/exec-script/index.vue | 4 +- .../task-step/components/exec-script.vue | 4 +- 6 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue index 7022fe2652..6433d32514 100644 --- a/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue +++ b/src/frontend/src/components/task-step/script/strategy/window-interpreter.vue @@ -1,15 +1,18 @@