Skip to content

Commit

Permalink
Hide job summary until attempt has succeeded or failed (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamakase committed Jan 28, 2021
1 parent 1018c69 commit 099c22e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styled from "styled-components";
import dayjs from "dayjs";

import { Attempt } from "../../../core/resources/Job";
import Status from "../../../core/statuses";

type IProps = {
className?: string;
Expand All @@ -22,6 +23,17 @@ const AttemptDetails: React.FC<IProps> = ({
className,
configType
}) => {
if (attempt.status !== Status.SUCCEEDED && attempt.status !== Status.FAILED) {
return (
<Details className={className}>
<FormattedMessage
id={`sources.${configType}`}
defaultMessage={configType}
/>
</Details>
);
}

const formatBytes = (bytes: number) => {
if (!bytes) {
return (
Expand Down

0 comments on commit 099c22e

Please sign in to comment.