Skip to content

Commit

Permalink
Correct loading of Obsevability Visualizations upon add to notebook.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
  • Loading branch information
pjfitzgibbons committed Dec 20, 2023
1 parent b93a8ff commit bfd8c93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -125,8 +124,8 @@ const OutputBody = ({
</>
);
case 'OBSERVABILITY_VISUALIZATION':
let http = getOSDHttp();
let pplService = getPPLService();
const http = getOSDHttp();
const pplService = getPPLService();

Check warning on line 128 in public/components/notebooks/components/paragraph_components/para_output.tsx

View check run for this annotation

Codecov / codecov/patch

public/components/notebooks/components/paragraph_components/para_output.tsx#L127-L128

Added lines #L127 - L128 were not covered by tests
let fromObs = moment(visInput?.timeRange?.from).format(dateFormat);
let toObs = moment(visInput?.timeRange?.to).format(dateFormat);
fromObs = fromObs === 'Invalid date' ? visInput.timeRange.from : fromObs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bfd8c93

Please sign in to comment.