Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 ip 选择器 topo 过滤所有节点都失效时选中所有 ip 问题 #6975

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pipeline_plugins/cmdb_ip_picker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def _inject_topo_params(self, topo_list):
self.property_filters["module_property_filter"]["rules"].append(
{"field": "bk_module_id", "operator": "in", "value": list(module_ids)}
)
return module_ids

def dispatch(self, params):
handle_func = getattr(self, f"{self.selector}_picker_handler")
Expand All @@ -271,7 +272,10 @@ def topo_picker_handler(self, inputted_topo):
topo选择情况
:params inputted_topo: 拓扑结构信息列表, list
"""
self._inject_topo_params(inputted_topo)
module_ids = self._inject_topo_params(inputted_topo)
if not module_ids:
logger.warning(f"[topo_picker_handler] no module_ids, inputted_topo: {inputted_topo}")
return {"result": True, "data": [], "message": ""}
host_info_result = self.fetch_host_ip_with_property_filter()
if not host_info_result["result"]:
return host_info_result
Expand Down
Loading