Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspect action shows on dashboard for every chart #65998

Merged
merged 1 commit into from
May 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export interface VisualizeOutput extends EmbeddableOutput {

type ExpressionLoader = InstanceType<ExpressionsStart['ExpressionLoader']>;

const visTypesWithoutInspector = ['markdown', 'input_control_vis', 'metrics', 'vega', 'timelion'];

export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOutput> {
private handler?: ExpressionLoader;
private timefilter: TimefilterContract;
Expand Down Expand Up @@ -126,7 +128,7 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut
}

public getInspectorAdapters = () => {
if (!this.handler) {
if (!this.handler || visTypesWithoutInspector.includes(this.vis.type.name)) {
return undefined;
}
return this.handler.inspect();
Expand Down Expand Up @@ -215,19 +217,7 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut

// this is a hack to make editor still work, will be removed once we clean up editor
// @ts-ignore
hasInspector = () => {
const visTypesWithoutInspector = [
'markdown',
'input_control_vis',
'metrics',
'vega',
'timelion',
];
if (visTypesWithoutInspector.includes(this.vis.type.name)) {
return false;
}
return this.getInspectorAdapters();
};
hasInspector = () => Boolean(this.getInspectorAdapters());

/**
*
Expand Down