Skip to content

Commit

Permalink
feat: 提供 Agent 包管理后台基础接口 (closed #1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
ping15 committed Dec 11, 2024
1 parent 41dcfac commit e8ce42e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/node_man/serializers/package_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class AgentRegisterTaskResponseSerializer(serializers.Serializer):
class DeployedAgentCountSerializer(serializers.Serializer):
items = serializers.JSONField(default=[])
project = serializers.CharField(default=GsePackageCode.AGENT.value)
biz_scope = serializers.ListField(child=serializers.IntegerField(), default=[])


class VersionQuerySerializer(serializers.Serializer):
Expand Down
4 changes: 2 additions & 2 deletions apps/node_man/views/package_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,8 @@ def deployed_hosts_count(self, request):
# 主机和进程连表查询
host_queryset: QuerySet = HostQuerySqlHelper.multiple_cond_sql(
params=process_params,
biz_scope=[],
need_biz_scope=False,
biz_scope=validated_data["biz_scope"],
need_biz_scope=True if validated_data["biz_scope"] else False,
is_proxy=False if project == constants.GsePackageCode.AGENT.value else True,
).filter(**host_kwargs)

Expand Down

0 comments on commit e8ce42e

Please sign in to comment.