Skip to content

Commit

Permalink
Add descriptor metadata
Browse files Browse the repository at this point in the history
- Fixes some issues on Enterprise where query or session information was dropped
  • Loading branch information
mofojed committed Jul 17, 2024
1 parent ab36f2a commit bd18082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/dashboard-core-plugins/src/ChartPanelPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async function createChartModel(

if (metadata.type === dh.VariableType.FIGURE) {
const descriptor = {
...metadata,
name: figureName,
type: dh.VariableType.FIGURE,
};
Expand All @@ -86,8 +87,8 @@ async function createChartModel(
return ChartModelFactory.makeModel(dh, settings, figure);
}

// TODO #1940: This won't work on Enterprise. We will need to refactor how ChartBuilder works.
const descriptor = {
...metadata,
name: tableName,
type: dh.VariableType.TABLE,
};
Expand Down
3 changes: 2 additions & 1 deletion packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export class IrisGridPanel extends PureComponent<
this.setState(
() => null,
() => {
const { glEventHub, inputFilters } = this.props;
const { glEventHub, inputFilters, metadata } = this.props;
const table = this.getTableName();
const { panelState } = this.state;
const sourcePanelId = LayoutUtils.getIdFromPanel(this);
Expand All @@ -743,6 +743,7 @@ export class IrisGridPanel extends PureComponent<
}
glEventHub.emit(IrisGridEvent.CREATE_CHART, {
metadata: {
...metadata,
settings,
sourcePanelId,
table,
Expand Down

0 comments on commit bd18082

Please sign in to comment.