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

[Lens] Duplicated datatable available as inspector data for Heatmap chart #123815

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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 @@ -143,7 +143,8 @@ export const heatmapFunction = (): HeatmapExpressionFunctionDefinition => ({
},
},
fn(data, args, handlers) {
if (handlers?.inspectorAdapters?.tables) {
// as in lens we've already calling logDatatable for heatmap we shouldn't do it here
if (handlers?.inspectorAdapters?.tables && handlers?.getExecutionContext?.()?.type !== 'lens') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly not sure that expression functions should know anything about their consumers.

const argsTable: Dimension[] = [];
if (args.valueAccessor) {
prepareHeatmapLogTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ export const VisualizationWrapper = ({
onData$={onData$}
inspectorAdapters={lensInspector.adapters}
renderMode="edit"
executionContext={{
type: 'lens',
name: '',
id: '',
description: '',
}}
renderError={(errorMessage?: string | null, error?: ExpressionRenderError | null) => {
const errorsFromRequest = getOriginalRequestErrorMessages(error);
const visibleErrorMessages = errorsFromRequest.length
Expand Down