Skip to content

Commit

Permalink
[8.8] [Synthetics] Do not re-render embeddable visualizations on deta…
Browse files Browse the repository at this point in the history
…il/history page `onLoad` (#156219) (#156327)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Synthetics] Do not re-render embeddable visualizations on
detail/history page `onLoad`
(#156219)](#156219)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2023-05-02T06:50:02Z","message":"[Synthetics]
Do not re-render embeddable visualizations on detail/history page
`onLoad` (#156219)\n\nCo-authored-by: shahzad31
<shahzad31comp@gmail.com>","sha":"7b947188f222a81cc8481c1b34ededfdc4363ff0","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","v8.8.0","v8.9.0"],"number":156219,"url":"#156219
Do not re-render embeddable visualizations on detail/history page
`onLoad` (#156219)\n\nCo-authored-by: shahzad31
<shahzad31comp@gmail.com>","sha":"7b947188f222a81cc8481c1b34ededfdc4363ff0"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#156219
Do not re-render embeddable visualizations on detail/history page
`onLoad` (#156219)\n\nCo-authored-by: shahzad31
<shahzad31comp@gmail.com>","sha":"7b947188f222a81cc8481c1b34ededfdc4363ff0"}}]}]
BACKPORT-->

Co-authored-by: Justin Kambic <jk@elastic.co>
  • Loading branch information
kibanamachine and justinkambic committed May 2, 2023
1 parent 52c7918 commit b7c7f71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function getExploratoryViewEmbeddable(
{...embedProps}
dataViewState={dataViews}
lens={lens}
lensFormulaHelper={lensHelper.formula}
lensFormulaHelper={lensHelper?.formula}
searchSessionId={services.data.search.session.getSessionId()}
onLoad={onLensLoaded}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export const useAppDataView = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dataViewTitle, seriesDataType, JSON.stringify(series)]);

return { dataViews, loading };
return { dataViews, loading: loading && !dataViews[seriesDataType] };
};

0 comments on commit b7c7f71

Please sign in to comment.