mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Uptime] Use base path for screenshot url (#81930)
This commit is contained in:
parent
59662eefd2
commit
995111ad8a
4 changed files with 9 additions and 4 deletions
|
@ -253,6 +253,9 @@ describe('ExecutedJourney component', () => {
|
|||
}
|
||||
}
|
||||
/>
|
||||
<EuiSpacer
|
||||
size="s"
|
||||
/>
|
||||
</EuiFlexGroup>
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -79,6 +79,7 @@ export const ExecutedJourney: FC<ExecutedJourneyProps> = ({ journey }) => (
|
|||
{journey.steps.filter(isStepEnd).map((step, index) => (
|
||||
<ExecutedStep key={index} index={index} step={step} />
|
||||
))}
|
||||
<EuiSpacer size="s" />
|
||||
</EuiFlexGroup>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -41,7 +41,7 @@ export const ExecutedStep: FC<ExecutedStepProps> = ({ step, index }) => (
|
|||
<div>
|
||||
<StatusBadge status={step.synthetics?.payload?.status} />
|
||||
</div>
|
||||
<EuiSpacer />
|
||||
<EuiSpacer size="s" />
|
||||
<div>
|
||||
<EuiFlexGroup>
|
||||
<EuiFlexItem grow={false}>
|
||||
|
@ -87,6 +87,5 @@ export const ExecutedStep: FC<ExecutedStepProps> = ({ step, index }) => (
|
|||
</EuiFlexGroup>
|
||||
</div>
|
||||
</div>
|
||||
<EuiSpacer />
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -16,7 +16,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import React, { useContext, useEffect, useRef, useState, FC } from 'react';
|
||||
import { useIntersection } from 'react-use';
|
||||
import { UptimeThemeContext } from '../../../contexts';
|
||||
import { UptimeSettingsContext, UptimeThemeContext } from '../../../contexts';
|
||||
|
||||
interface StepScreenshotDisplayProps {
|
||||
screenshotExists?: boolean;
|
||||
|
@ -41,6 +41,8 @@ export const StepScreenshotDisplay: FC<StepScreenshotDisplayProps> = ({
|
|||
colors: { lightestShade: pageBackground },
|
||||
} = useContext(UptimeThemeContext);
|
||||
|
||||
const { basePath } = useContext(UptimeSettingsContext);
|
||||
|
||||
const [isImagePopoverOpen, setIsImagePopoverOpen] = useState<boolean>(false);
|
||||
const [isOverlayOpen, setIsOverlayOpen] = useState<boolean>(false);
|
||||
|
||||
|
@ -59,7 +61,7 @@ export const StepScreenshotDisplay: FC<StepScreenshotDisplayProps> = ({
|
|||
}, [hasIntersected, isIntersecting, setHasIntersected]);
|
||||
|
||||
let content: JSX.Element | null = null;
|
||||
const imgSrc = `/api/uptime/journey/screenshot/${checkGroup}/${stepIndex}`;
|
||||
const imgSrc = basePath + `/api/uptime/journey/screenshot/${checkGroup}/${stepIndex}`;
|
||||
if (hasIntersected && screenshotExists) {
|
||||
content = (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue