Skip to content

Commit 04e4621

Browse files
Address change request
1 parent 3a84c91 commit 04e4621

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

Diff for: tests/ui/mock/alert_summaries.json

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
}
137137
],
138138
"related_alerts": [],
139+
"duplicated_summaries_ids": [],
139140
"status": 0,
140141
"bug_number": null,
141142
"bug_updated": null,
@@ -223,6 +224,7 @@
223224
}
224225
],
225226
"related_alerts": [],
227+
"duplicated_summaries_ids": [],
226228
"status": 0,
227229
"bug_number": null,
228230
"bug_updated": null,
@@ -358,6 +360,7 @@
358360
}
359361
],
360362
"related_alerts": [],
363+
"duplicated_summaries_ids": [],
361364
"status": 0,
362365
"bug_number": null,
363366
"bug_updated": null,

Diff for: tests/webapp/api/test_performance_alertsummary_api.py

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def test_alert_summaries_get(
9494
"push_timestamp",
9595
"prev_push_revision",
9696
"performance_tags",
97+
"duplicated_summaries_ids",
9798
}
9899
assert len(resp.json()["results"][0]["alerts"]) == 1
99100
assert set(resp.json()["results"][0]["alerts"][0].keys()) == {
@@ -174,6 +175,7 @@ def test_alert_summaries_get_onhold(
174175
"push_timestamp",
175176
"prev_push_revision",
176177
"performance_tags",
178+
"duplicated_summaries_ids",
177179
}
178180
assert len(resp.json()["results"][0]["alerts"]) == 1
179181
assert set(resp.json()["results"][0]["alerts"][0].keys()) == {

Diff for: ui/perfherder/alerts/AlertHeader.jsx

+18-19
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,6 @@ const AlertHeader = ({
111111
PerfCompare comparison
112112
</a>
113113
</Row>
114-
{alertSummary.duplicated_summaries_ids.length > 0 && (
115-
<Row className="m-0 px-0 py-0">
116-
Duplicated summaries:
117-
{alertSummary.duplicated_summaries_ids.map((id, index) => (
118-
<Link
119-
className="text-dark mr-1"
120-
target="_blank"
121-
to={`./alerts?id=${id}&hideDwnToInv=0`}
122-
id={`alert summary ${id.toString()} title`}
123-
data-testid={`alert summary ${alertSummary.id.toString()} title`}
124-
style={{ marginLeft: '5px' }}
125-
>
126-
Alert #{id}
127-
{alertSummary.duplicated_summaries_ids.length - 1 !== index &&
128-
', '}
129-
</Link>
130-
))}
131-
</Row>
132-
)}
133114
</Col>
134115
<Col className="p-0" xs="auto">
135116
{inEditMode ? (
@@ -260,6 +241,24 @@ const AlertHeader = ({
260241
/>
261242
</Col>
262243
</Row>
244+
{alertSummary.duplicated_summaries_ids.length > 0 && (
245+
<Row>
246+
Duplicated summaries:
247+
{alertSummary.duplicated_summaries_ids.map((id, index) => (
248+
<Link
249+
className="text-dark mr-1"
250+
target="_blank"
251+
to={`./alerts?id=${id}&hideDwnToInv=0`}
252+
id={`duplicated alert summary ${id.toString()} `}
253+
style={{ marginLeft: '5px' }}
254+
>
255+
Alert #{id}
256+
{alertSummary.duplicated_summaries_ids.length - 1 !== index &&
257+
', '}
258+
</Link>
259+
))}
260+
</Row>
261+
)}
263262
<Row>
264263
{performanceTags.length > 0 && (
265264
<Col className="p-0" xs="auto">

0 commit comments

Comments
 (0)