From bfd8c93faa59a8fc3c6afe3fcaa6944de61952b2 Mon Sep 17 00:00:00 2001 From: Peter Fitzgibbons Date: Tue, 19 Dec 2023 16:25:29 -0800 Subject: [PATCH] Correct loading of Obsevability Visualizations upon add to notebook. Signed-off-by: Peter Fitzgibbons --- .../components/paragraph_components/para_output.tsx | 5 ++--- .../notebooks/components/paragraph_components/paragraphs.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/components/notebooks/components/paragraph_components/para_output.tsx b/public/components/notebooks/components/paragraph_components/para_output.tsx index a642660e14..8f8674cfc1 100644 --- a/public/components/notebooks/components/paragraph_components/para_output.tsx +++ b/public/components/notebooks/components/paragraph_components/para_output.tsx @@ -8,7 +8,6 @@ import MarkdownRender from '@nteract/markdown'; import { Media } from '@nteract/outputs'; import moment from 'moment'; import React, { useState } from 'react'; -import { set } from '@elastic/safer-lodash-set'; import { VisualizationContainer } from '../../../../components/custom_panels/panel_modules/visualization_container'; import PPLService from '../../../../services/requests/ppl'; import { CoreStart } from '../../../../../../../src/core/public'; @@ -125,8 +124,8 @@ const OutputBody = ({ ); case 'OBSERVABILITY_VISUALIZATION': - let http = getOSDHttp(); - let pplService = getPPLService(); + const http = getOSDHttp(); + const pplService = getPPLService(); let fromObs = moment(visInput?.timeRange?.from).format(dateFormat); let toObs = moment(visInput?.timeRange?.to).format(dateFormat); fromObs = fromObs === 'Invalid date' ? visInput.timeRange.from : fromObs; diff --git a/public/components/notebooks/components/paragraph_components/paragraphs.tsx b/public/components/notebooks/components/paragraph_components/paragraphs.tsx index 35970da41e..b92f5e2f50 100644 --- a/public/components/notebooks/components/paragraph_components/paragraphs.tsx +++ b/public/components/notebooks/components/paragraph_components/paragraphs.tsx @@ -203,7 +203,7 @@ export const Paragraphs = forwardRef((props: ParagraphProps, ref) => { filters: [], useMargins: false, id: vizUniqueId, - visSavedObjectId: objectId, + visSavedObjId: objectId, timeRange: { to: para.visEndTime, from: para.visStartTime,