Skip to content

Commit

Permalink
[lens] [ES|QL] - Remove drill-down capabilities on ES|QL charts / pan…
Browse files Browse the repository at this point in the history
…els (elastic#176741)

Closes elastic#176245

### test instructions
1. install web logs sample data
2. create new dashboard
3. click "Add panel" -> "ES|QL".
4. Set ESQL to `from kibana_sample_data_logs | stats count() by
machine.os`. Click "Run".
5. Open context menu and verify "Create drilldown" action is not
available.
<img width="400" alt="Screenshot 2024-02-12 at 11 46 29 AM"
src="https://github.com/elastic/kibana/assets/373691/bc99b116-7fe1-4334-bf4c-d0d02595f42d">
6. Create regular lens panel. Verify "Create drilldown" action is
available in context menu.
<img width="400" alt="Screenshot 2024-02-12 at 11 46 42 AM"
src="https://github.com/elastic/kibana/assets/373691/fb87d06c-6cbe-479b-9acd-f6463ca54e87">
  • Loading branch information
nreese authored Feb 13, 2024
1 parent 831cfd2 commit d11b73d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x-pack/plugins/lens/public/embeddable/embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,12 @@ export class Embeddable
savedObjectId: (input as LensByReferenceInput)?.savedObjectId,
};

if (this.isTextBasedLanguage()) {
this.updateInput({
disabledActions: ['OPEN_FLYOUT_ADD_DRILLDOWN'],
});
}

try {
const { ast, indexPatterns, indexPatternRefs, activeVisualizationState } =
await getExpressionFromDocument(this.savedVis, this.deps.documentToExpression);
Expand Down

0 comments on commit d11b73d

Please sign in to comment.