diff --git a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx index c99424a502..5a9383b006 100644 --- a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx @@ -250,7 +250,6 @@ export class IrisGridPanel extends PureComponent< this.handleError = this.handleError.bind(this); this.handleGridStateChange = this.handleGridStateChange.bind(this); this.handlePluginStateChange = this.handlePluginStateChange.bind(this); - this.handlePartitionAppend = this.handlePartitionAppend.bind(this); this.handleCreateChart = this.handleCreateChart.bind(this); this.handleResize = this.handleResize.bind(this); this.handleShow = this.handleShow.bind(this); @@ -711,26 +710,6 @@ export class IrisGridPanel extends PureComponent< glEventHub.emit(InputFilterEvent.TABLE_CHANGED, this, table); } - handlePartitionAppend(columns: Column[], values: unknown[]): void { - const { glEventHub } = this.props; - const tableName = this.getTableName(); - const filters = values - .reduce((filterArray, value, index) => { - const column = columns[index]; - if (value !== null) { - filterArray.push( - `"${column.name}=${ - TableUtils.isTextType(column.type) ? `\`${value}\`` : value - }"` - ); - } - return filterArray; - }, []) - .join(', '); - const command = `${tableName} = ${tableName}.where(filters=[${filters}])`; - glEventHub.emit(ConsoleEvent.SEND_COMMAND, command, false, true); - } - /** * Create a chart with the specified settings * @param settings The settings from the chart builder @@ -1358,7 +1337,6 @@ export class IrisGridPanel extends PureComponent< onCreateChart={this.handleCreateChart} onDataSelected={this.handleDataSelected} onError={this.handleError} - onPartitionAppend={this.handlePartitionAppend} onStateChange={this.handleGridStateChange} onContextMenu={this.handleContextMenu} onAdvancedSettingsChange={this.handleAdvancedSettingsChange} diff --git a/packages/iris-grid/src/IrisGrid.tsx b/packages/iris-grid/src/IrisGrid.tsx index 90fcb670d8..4f8163a178 100644 --- a/packages/iris-grid/src/IrisGrid.tsx +++ b/packages/iris-grid/src/IrisGrid.tsx @@ -283,10 +283,6 @@ export interface IrisGridProps { onError: (error: unknown) => void; onDataSelected: (index: ModelIndex, map: Record) => void; onStateChange: (irisGridState: IrisGridState, gridState: GridState) => void; - onPartitionAppend?: ( - partitionColumns: Column[], - values: (string | null)[] - ) => void; onAdvancedSettingsChange: AdvancedSettingsMenuCallback; partitions: (string | null)[]; partitionColumns: Column[]; @@ -580,7 +576,6 @@ export class IrisGrid extends Component { this.handleCancelDownloadTable = this.handleCancelDownloadTable.bind(this); this.handleDownloadCanceled = this.handleDownloadCanceled.bind(this); this.handleDownloadCompleted = this.handleDownloadCompleted.bind(this); - this.handlePartitionAppend = this.handlePartitionAppend.bind(this); this.handlePartitionChange = this.handlePartitionChange.bind(this); this.handlePartitionFetchAll = this.handlePartitionFetchAll.bind(this); this.handlePartitionDone = this.handlePartitionDone.bind(this); @@ -2376,15 +2371,6 @@ export class IrisGrid extends Component { this.isAnimating = false; } - handlePartitionAppend(values: (string | null)[]): void { - const { onPartitionAppend } = this.props; - const { partitionColumns } = this.state; - if (partitionColumns.length === 0) { - return; - } - onPartitionAppend?.(partitionColumns, values); - } - handlePartitionChange(partitions: (string | null)[]): void { const { partitionColumns } = this.state; if (partitionColumns.length === 0) { @@ -3914,7 +3900,6 @@ export class IrisGrid extends Component { onAdvancedSettingsChange, canDownloadCsv, onCreateChart, - onPartitionAppend, } = this.props; const { metricCalculator, @@ -4473,11 +4458,6 @@ export class IrisGrid extends Component { partitions={partitions} onChange={this.handlePartitionChange} onFetchAll={this.handlePartitionFetchAll} - onAppend={ - onPartitionAppend !== undefined - ? this.handlePartitionAppend - : undefined - } onDone={this.handlePartitionDone} /> )} diff --git a/packages/iris-grid/src/IrisGridPartitionSelector.tsx b/packages/iris-grid/src/IrisGridPartitionSelector.tsx index fbbf0a0fbb..7b9b3cd77e 100644 --- a/packages/iris-grid/src/IrisGridPartitionSelector.tsx +++ b/packages/iris-grid/src/IrisGridPartitionSelector.tsx @@ -19,7 +19,6 @@ interface IrisGridPartitionSelectorProps { table: Table; columns: Column[]; partitions: (string | null)[]; - onAppend?: (partitions: (string | null)[]) => void; onFetchAll: () => void; onDone: (event?: React.MouseEvent) => void; onChange: (partitions: (string | null)[]) => void; @@ -42,7 +41,6 @@ class IrisGridPartitionSelector extends Component< constructor(props: IrisGridPartitionSelectorProps) { super(props); - this.handleAppendClick = this.handleAppendClick.bind(this); this.handleCloseClick = this.handleCloseClick.bind(this); this.handleIgnoreClick = this.handleIgnoreClick.bind(this); this.handlePartitionChange = this.handlePartitionChange.bind(this); @@ -85,14 +83,6 @@ class IrisGridPartitionSelector extends Component< selectorSearch: (PartitionSelectorSearch | null)[]; - handleAppendClick(): void { - log.debug2('handleAppendClick'); - - const { onAppend } = this.props; - const { partitions } = this.state; - onAppend?.(partitions); - } - handleCloseClick(): void { log.debug2('handleCloseClick'); @@ -246,7 +236,7 @@ class IrisGridPartitionSelector extends Component< } render(): JSX.Element { - const { columns, dh, getFormattedString, onAppend, onDone } = this.props; + const { columns, dh, getFormattedString, onDone } = this.props; const { partitionTables } = this.state; const partitionSelectorSearch = columns.map( @@ -314,15 +304,6 @@ class IrisGridPartitionSelector extends Component< > Ignore & Fetch All - {onAppend !== undefined && ( - - )}