Skip to content

Commit

Permalink
Bug 1513485 - Properly fetch response (#4367)
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutgoldan authored and sarah-clements committed Dec 21, 2018
1 parent 71e16cd commit bc3b45f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ui/partials/perf/graphsctrl.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<i class="text-warning fa fa-exclamation-circle"></i>
<a href="perf.html#/alerts?id={{tooltipContent.alertSummary.id}}">
Alert #{{tooltipContent.alertSummary.id}}</a>
<span class="text-muted">- {{alertIsOfState(tooltipContent.alert, phAlertStatusMap.ACKNOWLEDGED) ? geAlertSummarytStatusText(tooltipContent.alertSummary) : getAlertStatusText(tooltipContent.alert)}}
<span class="text-muted">- {{tooltipContent.alert && (alertIsOfState(tooltipContent.alert, phAlertStatusMap.ACKNOWLEDGED) ? getAlertSummarytStatusText(tooltipContent.alertSummary) : getAlertStatusText(tooltipContent.alert))}}
<span ng-show="tooltipContent.alert.related_summary_id">
<span ng-if="tooltipContent.alert.related_summary_id !== tooltipContent.alertSummary.id">
to <a href="#/alerts?id={{tooltipContent.alert.related_summary_id}}" target="_blank" rel="noopener">alert #{{tooltipContent.alert.related_summary_id}}</a>
Expand Down
16 changes: 9 additions & 7 deletions ui/perfherder/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,15 @@ export const createAlert = data =>
framework_id: data.series.frameworkId,
push_id: data.resultSetId,
prev_push_id: data.prevResultSetId,
}).then(({ data }) => {
const newAlertSummaryId = data.alert_summary_id;
return create(getApiUrl('/performance/alert/'), {
summary_id: newAlertSummaryId,
signature_id: data.series.id,
}).then(() => newAlertSummaryId);
});
})
.then(response => response.json())
.then(response => {
const newAlertSummaryId = response.alert_summary_id;
return create(getApiUrl('/performance/alert/'), {
summary_id: newAlertSummaryId,
signature_id: data.series.id,
}).then(() => newAlertSummaryId);
});

export const findPushIdNeighbours = (dataPoint, resultSetData, direction) => {
const pushId = dataPoint.resultSetId;
Expand Down

0 comments on commit bc3b45f

Please sign in to comment.