Skip to content

Commit

Permalink
fix: 节点管理插件调用安装通道时提供默认通道 #7379
Browse files Browse the repository at this point in the history
  • Loading branch information
lTimej authored and normal-wls committed Apr 8, 2024
1 parent a775489 commit 4500987
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def execute(self, data, parent_data):
"os_type": host["os_type"],
"is_manual": False,
}
if install_channel_id:
if install_channel_id and install_channel_id != -1:
base_params["install_channel_id"] = install_channel_id
# 支持表格中一行多ip操作, 拼装表格内的inner_ip参数
for index, inner_ip in enumerate(inner_ip_list):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
type: "select",
attrs: {
name: gettext("安装通道"),
hookable: false,
width: "180px",
remote: true,
remote_url: "",
remote_data_init: function (resp) {
if (resp.result === false) {
show_msg(resp.message, 'error');
}else if (resp.data.length != 0){
this._set_value(resp.data[0]["value"]);
}
resp.data.unshift({"text": gettext("默认通道"), "value": -1});
this._set_value(resp.data[0]["value"]);
return resp.data;
},
validation: [
Expand All @@ -72,6 +72,16 @@
]
},
events: [
{
source: "nodeman_bk_cloud_id",
type: "init",
action: function (cloud_id) {
if (cloud_id !== '') {
this.remote_url = $.context.get('site_url') + 'pipeline/nodeman_get_install_channel/' + cloud_id + '/';
this.remoteMethod();
}
}
},
{
source: "nodeman_bk_cloud_id",
type: "change",
Expand Down

0 comments on commit 4500987

Please sign in to comment.