diff --git a/src/components/Deployments/StyledDeployments.tsx b/src/components/Deployments/StyledDeployments.tsx index 8348cd3a..2288622f 100644 --- a/src/components/Deployments/StyledDeployments.tsx +++ b/src/components/Deployments/StyledDeployments.tsx @@ -114,7 +114,9 @@ export const StyledDeployments = styled.div` border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } - + .warning { + width: 15px; + } .status { @media ${bp.xs_smallOnly} { margin-left: 20px; diff --git a/src/components/Deployments/index.tsx b/src/components/Deployments/index.tsx index a73c12f2..2c965ec0 100644 --- a/src/components/Deployments/index.tsx +++ b/src/components/Deployments/index.tsx @@ -60,6 +60,9 @@ const Deployments: FC = ({ deployments, environmentSlug, proje {!['complete', 'cancelled', 'failed'].includes(deployment.status) && deployment.buildStep && ( )} + {['deployCompletedWithWarnings'].includes(deployment.buildStep) && deployment.buildStep && ( + + )}
{getDeploymentDuration(deployment)}
diff --git a/src/components/HoverTag/index.tsx b/src/components/HoverTag/index.tsx index 2724701a..d1df179e 100644 --- a/src/components/HoverTag/index.tsx +++ b/src/components/HoverTag/index.tsx @@ -11,12 +11,12 @@ interface Props { tagColor?: string; maxWidth?: string; } -const HoverTag: FC = ({ tooltipPosition, tagColor, maxWidth, text }) => { +const HoverTag: FC = ({ tooltipPosition, tagColor, maxWidth, text, textColor }) => { return ( { - {text} + {text} } diff --git a/src/components/HoverTag/styles.tsx b/src/components/HoverTag/styles.tsx index 6f6ffcd9..371e073c 100644 --- a/src/components/HoverTag/styles.tsx +++ b/src/components/HoverTag/styles.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; -export const TooltipText = styled.p<{ maxWidth?: string }>` +export const TooltipText = styled.p<{ maxWidth?: string, textColor?: string }>` margin:unset; max-width:${props => (props.maxWidth ? props.maxWidth : '150px')}; margin: unset; overflow: hidden; text-overflow: ellipsis; -`; + color:${props => (props.textColor ? props.textColor : '#fff')}; +`; \ No newline at end of file diff --git a/src/components/LogViewer/LogAccordion/index.js b/src/components/LogViewer/LogAccordion/index.js index 218797c4..dc8c09c4 100644 --- a/src/components/LogViewer/LogAccordion/index.js +++ b/src/components/LogViewer/LogAccordion/index.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import { StyledLogAccordion } from '../StyledLogViewer'; const LogAccordion = forwardRef( - ({ children, onToggle, header, className = '', defaultValue = false, metadata = '' }, ref) => { + ({ children, onToggle, header, className = '', defaultValue = false, metadata = ['', false] }, ref) => { const logsTopRef = useRef(null); const logsEndRef = useRef(null); const [visibility, setVisibility] = useState(defaultValue); @@ -30,14 +30,14 @@ const LogAccordion = forwardRef( return (
{ setVisibility(!visibility); if (onToggle) onToggle(!visibility); }} > -
- {header} {metadata.length > 0 ? '(' + metadata + ')' : ''} +
+ {metadata[1] == true ? (): ''}{header} {metadata[0].length > 0 ? '(' + metadata[0] + ')' : ''}
diff --git a/src/components/LogViewer/StyledLogViewer.tsx b/src/components/LogViewer/StyledLogViewer.tsx index d3f73ad0..e68d5e45 100644 --- a/src/components/LogViewer/StyledLogViewer.tsx +++ b/src/components/LogViewer/StyledLogViewer.tsx @@ -126,4 +126,24 @@ export const StyledLogAccordion = styled.div` } } } + &.data-row { + .accordion-heading { + .log-warning-state { + ::before { + color: #000000; + background-color: #ffbe00; + } + } + } + } + &.data-row { + .accordion-heading-warning { + color: #000000; + background-color: #c59c26; + .warning { + width: 14px; + margin-right: 10px; + } + } + } `; diff --git a/src/components/LogViewer/index.js b/src/components/LogViewer/index.js index f834fbb7..42613b6b 100644 --- a/src/components/LogViewer/index.js +++ b/src/components/LogViewer/index.js @@ -127,7 +127,7 @@ const logPreprocessorProcessParse = (tokens, sectionMetadata) => { case 'section-opener': let metadataForSection = sectionMetadata.get(tokens[i].details.trim()); if (metadataForSection == undefined) { - metadataForSection = ''; + metadataForSection = ['', false] } let node = { @@ -167,11 +167,15 @@ const logPreprocessorExtractSectionEndDetails = logs => { let stepName = tokens[i].trim(); i++; let stepDetails = tokens[i].trim(); - if (stepName != '' && stepDetails != '') { let durationArray = stepDetails.match(durationRegexp); + let hasWarnings = false + if (stepDetails.match(/.* WithWarnings$/)) { + hasWarnings = true + } + let payload = [`Duration: ${durationArray[1]}`, hasWarnings] if (durationArray.length == 2) { - ret.set(stepName, `Duration: ${durationArray[1]}`); + ret.set(stepName, payload); } } }