Skip to content

Commit

Permalink
[Lens][ES|QL] Editing listens the advanced setting (elastic#174569)
Browse files Browse the repository at this point in the history
## Summary

Create ES|QL panels already listen to this setting. I added the check to
editing too

<img width="1391" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/eccab316-9041-41de-a621-076112308fa0">

<img width="559" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/f5925dd4-5191-4187-ba8d-2376661ed7e7">
  • Loading branch information
stratoula authored Jan 10, 2024
1 parent d99d6ec commit 1470a36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/plugins/lens/public/embeddable/embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,10 @@ export class Embeddable
}

public getIsEditable() {
// for ES|QL, editing is allowed only if the advanced setting is on
if (Boolean(this.isTextBasedLanguage()) && !this.deps.uiSettings.get('discover:enableESQL')) {
return false;
}
return (
this.deps.capabilities.canSaveVisualizations ||
(!this.inputIsRefType(this.getInput()) &&
Expand Down

0 comments on commit 1470a36

Please sign in to comment.