Skip to content

Commit 77dbc41

Browse files
committed
Remove unnecessary inline comments from orchestrator info code
1 parent d0ae9ea commit 77dbc41

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

elementary/monitor/alerts/alert_messages/builder.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,14 @@ def _get_run_alert_subtitle_block(
122122
if detected_at_str:
123123
summary.append(("Time:", detected_at_str))
124124

125-
# Initialize subtitle lines with summary
126125
subtitle_lines = []
127126

128127
if orchestrator_info and orchestrator_info.job_name:
129128
orchestrator_name = orchestrator_info.orchestrator or "orchestrator"
130129
job_info_text = f"{orchestrator_info.job_name} (via {orchestrator_name})"
131130

132-
# Create job info with inline orchestrator link
133131
orchestrator_link = create_orchestrator_link(orchestrator_info)
134132
if orchestrator_link:
135-
# Create inline blocks for job info + link
136133
job_inlines: List[InlineBlock] = [
137134
BoldTextBlock(text="Job:"),
138135
TextBlock(text=job_info_text + " | "),
@@ -145,24 +142,19 @@ def _get_run_alert_subtitle_block(
145142
)
146143
)
147144

148-
# Add custom line with job info + link instead of summary item
149145
subtitle_lines.append(LineBlock(inlines=job_inlines))
150146
else:
151147
summary.append(("Job:", job_info_text))
152148
if suppression_interval:
153149
summary.append(("Suppression interval:", str(suppression_interval)))
154150

155-
# Add the main summary line
156151
subtitle_lines.append(SummaryLineBlock(summary=summary))
157152

158-
# Combine regular links with orchestrator links
159153
all_links = []
160154

161-
# Add existing report links
162155
for link in links:
163156
all_links.append((link.text, link.url, link.icon))
164157

165-
# Add orchestrator link if available (only if not already added inline)
166158
if orchestrator_info and not orchestrator_info.job_name:
167159
orchestrator_link = create_orchestrator_link(orchestrator_info)
168160
if orchestrator_link:

elementary/monitor/data_monitoring/alerts/integrations/utils/orchestrator_link.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def create_job_link(
3939
orchestrator = orchestrator_info.orchestrator or "orchestrator"
4040
job_name = orchestrator_info.job_name or "Job"
4141

42-
# Capitalize orchestrator name for display
4342
display_name = orchestrator.replace("_", " ").title()
4443

4544
return OrchestratorLinkData(

0 commit comments

Comments
 (0)