mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Dashboard] [Control] Remove support for scripted fields for options list (#144643)
* Remove support for scripted fields for all controls * Remove support only for options list * Add functional test
This commit is contained in:
parent
2619f0488f
commit
508f0127e3
2 changed files with 13 additions and 3 deletions
|
@ -56,9 +56,10 @@ export class OptionsListEmbeddableFactory
|
|||
|
||||
public isFieldCompatible = (dataControlField: DataControlField) => {
|
||||
if (
|
||||
(dataControlField.field.aggregatable && dataControlField.field.type === 'string') ||
|
||||
dataControlField.field.type === 'boolean' ||
|
||||
dataControlField.field.type === 'ip'
|
||||
!dataControlField.field.spec.scripted &&
|
||||
((dataControlField.field.aggregatable && dataControlField.field.type === 'string') ||
|
||||
dataControlField.field.type === 'boolean' ||
|
||||
dataControlField.field.type === 'ip')
|
||||
) {
|
||||
dataControlField.compatibleControlTypes.push(this.type);
|
||||
}
|
||||
|
|
|
@ -195,6 +195,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboard.clearUnsavedChanges();
|
||||
});
|
||||
|
||||
it('cannot create options list for scripted field', async () => {
|
||||
expect(await dashboardControls.optionsListEditorGetCurrentDataView(true)).to.eql(
|
||||
'animals-*'
|
||||
);
|
||||
await dashboardControls.openCreateControlFlyout();
|
||||
await testSubjects.missingOrFail('field-picker-select-isDog');
|
||||
await dashboardControls.controlEditorCancel(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await dashboardControls.clearAllControls();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue