Skip to content

Commit

Permalink
feat: 【告警】告警通知里,针对集群信息补充环境类型字段 #1010158081121108605
Browse files Browse the repository at this point in the history
  • Loading branch information
tang202388 committed Dec 30, 2024
1 parent ed1fb9c commit 1eca6bc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bkmonitor/packages/fta_web/alert/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,11 +1017,12 @@ def enrich_related_infos(bk_biz_id, instances):
)

if environment_types and bk_set_ids:
environments = [
environment_mapping[environment_types[bk_set_id]]
for bk_set_id in bk_set_ids
if bk_set_id in environment_types and environment_types[bk_set_id] in environment_mapping
]
environments = []
for bk_set_id in bk_set_ids:
environment_type_id = environment_types.get(bk_set_id)
if environment_type_id is not None:
environment = environment_mapping.get(environment_type_id, str(environment_type_id))
environments.append(environment)

if environments:
topo_info += environment_template.format(",".join(environments))
Expand Down

0 comments on commit 1eca6bc

Please sign in to comment.