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

perf: Added paging function for IP list #7585

Closed

Conversation

guohelu
Copy link

@guohelu guohelu commented Oct 15, 2024

No description provided.

@tencentblueking-adm
Copy link

tencentblueking-adm commented Oct 15, 2024

CLA assistant check
All committers have signed the CLA.

def get_business_host_topo(username, bk_biz_id, supplier_account, host_fields, ip_list=None, property_filters=None):
def get_business_host_topo(
username, bk_biz_id, supplier_account, host_fields, ip_list=None, property_filters=None, page=None
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释补充一下配置参数的格式,给个样例,注意不要用真实数据

@@ -24,14 +24,3 @@ repos:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
- repo: local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块先不去掉

@@ -84,6 +84,11 @@ def cmdb_search_host(request, bk_biz_id, bk_supplier_account="", bk_supplier_id=
client = get_client_by_user(request.user.username)

topo_modules_id = set()
page = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也是一个公共函数,在这里直接分页会影响其他使用场景

result = batch_request(client.cc.list_biz_hosts_topo, kwargs)
if page:
kwargs["page"] = page
data = client.cc.list_biz_hosts_topo(kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改动的点需要覆盖一下单测

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants