mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[data view mgmt] fix privileges problem for field preview (#127523)
* fix privledges problem for field preview * fix test
This commit is contained in:
parent
50941ebe35
commit
fb11d2d8fe
2 changed files with 3 additions and 3 deletions
|
@ -302,7 +302,7 @@ describe('Field editor Preview panel', () => {
|
|||
title: 'First doc - title',
|
||||
},
|
||||
documentId: '001',
|
||||
index: 'testIndex',
|
||||
index: 'testIndexPattern',
|
||||
script: {
|
||||
source: 'echo("hello")',
|
||||
},
|
||||
|
|
|
@ -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!,
|
||||
|
@ -384,7 +384,6 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => {
|
|||
type,
|
||||
script,
|
||||
document,
|
||||
currentDocIndex,
|
||||
currentDocId,
|
||||
getFieldPreview,
|
||||
notifications.toasts,
|
||||
|
@ -392,6 +391,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => {
|
|||
allParamsDefined,
|
||||
scriptEditorValidation,
|
||||
hasSomeParamsChanged,
|
||||
dataView.title,
|
||||
]);
|
||||
|
||||
const goToNextDoc = useCallback(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue