diff --git a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx index ed7fb34b92f072..f0f770779f436b 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx @@ -13,6 +13,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import { isScreenshotImageBlob, isScreenshotRef, + ScreenshotImageBlob, ScreenshotRefImageData, } from '../../../../../../common/runtime_types'; import { useFetcher, FETCH_STATUS } from '../../../../../../../observability/public'; @@ -35,10 +36,11 @@ const StepDiv = styled.div` interface Props { checkGroup?: string; label?: string; + stepStatus?: string; initialStepNo?: number; } -export const PingTimestamp = ({ label, checkGroup, initialStepNo = 1 }: Props) => { +export const PingTimestamp = ({ label, checkGroup, stepStatus, initialStepNo = 1 }: Props) => { const [stepNumber, setStepNumber] = useState(initialStepNo); const [isImagePopoverOpen, setIsImagePopoverOpen] = useState(false); @@ -57,6 +59,12 @@ export const PingTimestamp = ({ label, checkGroup, initialStepNo = 1 }: Props) = }); const { data, status } = useFetcher(() => { + if (stepStatus === 'skipped') { + return new Promise((resolve) => + resolve(null) + ); + } + if (intersection && intersection.intersectionRatio === 1 && !stepImages[stepNumber - 1]) return getJourneyScreenshot(imgPath); }, [intersection?.intersectionRatio, stepNumber, imgPath]); diff --git a/x-pack/plugins/uptime/public/components/monitor_management/test_now_mode/browser/browser_test_results.tsx b/x-pack/plugins/uptime/public/components/monitor_management/test_now_mode/browser/browser_test_results.tsx index 3e798dd3fbe620..af11553d185a52 100644 --- a/x-pack/plugins/uptime/public/components/monitor_management/test_now_mode/browser/browser_test_results.tsx +++ b/x-pack/plugins/uptime/public/components/monitor_management/test_now_mode/browser/browser_test_results.tsx @@ -7,13 +7,14 @@ import { useEffect } from 'react'; import * as React from 'react'; -import { EuiAccordion, EuiText } from '@elastic/eui'; +import { EuiAccordion, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; import { StepsList } from '../../../synthetics/check_steps/steps_list'; import { JourneyStep } from '../../../../../common/runtime_types'; import { useBrowserRunOnceMonitors } from './use_browser_run_once_monitors'; import { TestResultHeader } from '../test_result_header'; +import { StdErrorLogs } from '../../../synthetics/check_steps/stderr_logs'; interface Props { monitorId: string; @@ -74,11 +75,25 @@ export const BrowserTestRunResult = ({ monitorId, isMonitorSaved, onDone }: Prop data-test-subj="expandResults" initialIsOpen={true} > - {isStepsLoading && {LOADING_STEPS}} + {isStepsLoading && ( + + + {LOADING_STEPS} + + + + + + )} {isStepsLoadingFailed && ( {summaryDoc?.error?.message ?? FAILED_TO_RUN} )} + {isStepsLoadingFailed && + summaryDoc?.error?.message?.includes('journey did not finish executing') && ( + + )} + {stepEnds.length > 0 && stepListData?.steps && ( { const columns = [ { @@ -95,24 +97,31 @@ export const StdErrorLogs = ({ return ( <> - - - -

{title ?? TEST_RUN_LOGS_LABEL}

-
-
- - - - {VIEW_IN_DISCOVER_LABEL} - - - -
- - -

{summaryMessage}

-
+ {!hideTitle && ( + <> + + + +

{title ?? TEST_RUN_LOGS_LABEL}

+
+
+ + + + {VIEW_IN_DISCOVER_LABEL} + + + +
+ +

{summaryMessage}

+
+ + )} diff --git a/x-pack/plugins/uptime/public/components/synthetics/check_steps/step_image.tsx b/x-pack/plugins/uptime/public/components/synthetics/check_steps/step_image.tsx index d08614fb0b3586..06410e79a22a2b 100644 --- a/x-pack/plugins/uptime/public/components/synthetics/check_steps/step_image.tsx +++ b/x-pack/plugins/uptime/public/components/synthetics/check_steps/step_image.tsx @@ -22,6 +22,7 @@ export const StepImage = ({ step, compactView }: Props) => {