From 8b3cece0d07e0d6948be583b91e40ddcb85d90bd Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Wed, 6 Dec 2023 09:04:50 -0500 Subject: [PATCH] Remove legacy screenshot image codepath. --- .../synthetics/server/queries/journey_screenshots.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/synthetics/server/queries/journey_screenshots.ts b/x-pack/plugins/synthetics/server/queries/journey_screenshots.ts index bf8e806d5c363c9..596583db20b1684 100644 --- a/x-pack/plugins/synthetics/server/queries/journey_screenshots.ts +++ b/x-pack/plugins/synthetics/server/queries/journey_screenshots.ts @@ -9,7 +9,7 @@ import { getJourneyScreenshot, ScreenshotReturnTypesUnion, } from '../legacy_uptime/lib/requests/get_journey_screenshot'; -import { isFullScreenshot, isRefResult, RefResult } from '../../common/runtime_types'; +import { isRefResult, RefResult } from '../../common/runtime_types'; import { RouteContext, UptimeRouteContext } from '../routes/types'; export type ClientContract = Buffer | { screenshotRef: RefResult }; @@ -35,15 +35,7 @@ export const journeyScreenshotHandler = async ({ stepIndex, }); - if (isFullScreenshot(result) && typeof result.synthetics?.blob !== 'undefined') { - return response.ok({ - body: Buffer.from(result.synthetics.blob, 'base64'), - headers: { - 'content-type': result.synthetics.blob_mime || 'image/png', // falls back to 'image/png' for earlier versions of synthetics - ...getSharedHeaders(result.synthetics.step.name, result.totalSteps), - }, - }); - } else if (isRefResult(result)) { + if (isRefResult(result)) { return response.ok({ body: { screenshotRef: result,