Skip to content

Commit

Permalink
[data view mgmt] fix privileges problem for field preview (#127523)
Browse files Browse the repository at this point in the history
* fix privledges problem for field preview

* fix test
  • Loading branch information
mattkime authored Mar 11, 2022
1 parent 50941eb commit fb11d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ describe('Field editor Preview panel', () => {
title: 'First doc - title',
},
documentId: '001',
index: 'testIndex',
index: 'testIndexPattern',
script: {
source: 'echo("hello")',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => {
const currentApiCall = ++previewCount.current;

const response = await getFieldPreview({
index: currentDocIndex!,
index: dataView.title,
document: document!,
context: `${type!}_field` as PainlessExecuteContext,
script: script!,
Expand Down Expand Up @@ -384,14 +384,14 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => {
type,
script,
document,
currentDocIndex,
currentDocId,
getFieldPreview,
notifications.toasts,
valueFormatter,
allParamsDefined,
scriptEditorValidation,
hasSomeParamsChanged,
dataView.title,
]);

const goToNextDoc = useCallback(() => {
Expand Down

0 comments on commit fb11d2d

Please sign in to comment.