Add error_detail to the Task Summary

If the job encounters an execution error, the error_detail field
should be returned by the API.  Display that in the task summary
section if there is no other output and it is available.

Alternative to: I49f3b1578637a6d081de579dbe2272d8ddda886a

Change-Id: I83c78ed3a6b63b3215be23a7a596cdcf15a80399
This commit is contained in:
James E. Blair
2021-02-02 16:02:22 -08:00
committed by James E. Blair
parent c94622ec45
commit 677b17d9fd

View File

@@ -35,6 +35,7 @@ import {
FileCodeIcon,
TerminalIcon,
PollIcon,
ExclamationIcon,
} from '@patternfly/react-icons'
import { fetchBuildAllInfo } from '../actions/build'
@@ -161,6 +162,13 @@ class BuildPage extends React.Component {
<Fetching />
) : build.hosts ? (
<BuildOutput output={build.hosts} />
) : build.error_detail ? (
<>
<EmptyState variant={EmptyStateVariant.small}>
<EmptyStateIcon icon={ExclamationIcon} />
</EmptyState>
<p><b>Error:</b> {build.error_detail}</p>
</>
) : (
<EmptyState variant={EmptyStateVariant.small}>
<EmptyStateIcon icon={PollIcon} />