diff --git a/ui/shared/tabs/failureSummary/ErrorsList.jsx b/ui/shared/tabs/failureSummary/ErrorsList.jsx
index 4698c4efd..4b6cadc40 100644
--- a/ui/shared/tabs/failureSummary/ErrorsList.jsx
+++ b/ui/shared/tabs/failureSummary/ErrorsList.jsx
@@ -2,11 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
export default function ErrorsList(props) {
- const errorListItem = props.errors.map((error, key) => (
-
- {error.name} : {error.result}.
+ const errorListItem = props.errors.map((error) => (
+
+ {error.line}
No Bug Suggestions Available.
- Unsuccessful Execution Steps
+ Failure Lines
);
diff --git a/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx b/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx
index 14286203b..cd815723f 100644
--- a/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx
+++ b/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx
@@ -9,10 +9,12 @@ import {
getBugUrl,
getLogViewerUrl,
getReftestUrl,
+ textLogErrorsEndpoint,
} from '../../../helpers/url';
import BugFiler from '../../BugFiler';
import BugSuggestionsModel from '../../../models/bugSuggestions';
-import TextLogStepModel from '../../../models/textLogStep';
+import { getData } from '../../../helpers/http';
+import { getProjectJobUrl } from '../../../helpers/location';
import ErrorsList from './ErrorsList';
import ListItem from './ListItem';
@@ -77,7 +79,7 @@ class FailureSummaryTab extends React.Component {
if (!selectedJob) {
return;
}
- BugSuggestionsModel.get(selectedJob.id).then((suggestions) => {
+ BugSuggestionsModel.get(selectedJob.id).then(async (suggestions) => {
suggestions.forEach((suggestion) => {
suggestion.bugs.too_many_open_recent =
suggestion.bugs.open_recent.length > thBugSuggestionLimit;
@@ -98,20 +100,21 @@ class FailureSummaryTab extends React.Component {
// the log (we can do this asynchronously, it should normally be
// fast)
if (!suggestions.length) {
- TextLogStepModel.get(selectedJob.id).then((textLogSteps) => {
- const errors = textLogSteps
- .filter((step) => step.result !== 'success')
- .map((step) => ({
- name: step.name,
- result: step.result,
- logViewerUrl: getLogViewerUrl(
- selectedJob.id,
- repoName,
- step.finished_line_number,
- ),
- }));
+ const { data, failureStatus } = await getData(
+ getProjectJobUrl(textLogErrorsEndpoint, selectedJob.id),
+ );
+ if (!failureStatus && data.length) {
+ const errors = data.map((error) => ({
+ line: error.line,
+ line_number: error.line_number,
+ logViewerUrl: getLogViewerUrl(
+ selectedJob.id,
+ repoName,
+ error.line_number,
+ ),
+ }));
this.setState({ errors });
- });
+ }
}
this.setState({ bugSuggestionsLoading: false, suggestions }, () => {