QueryEditor: Clean-up interface to only have one PanelData (#19249)

* QueryEditor: Clean-up interface to only have one PanelData

* Renamed to prop name to data
This commit is contained in:
Torkel Ödegaard
2019-09-23 11:13:33 +02:00
committed by GitHub
parent fd7e2a21a1
commit bbf2bd18fd
9 changed files with 32 additions and 39 deletions

View File

@@ -92,7 +92,7 @@ export class PromQueryEditor extends PureComponent<Props, State> {
};
render() {
const { datasource, query, panelData, queryResponse } = this.props;
const { datasource, query, data } = this.props;
const { formatOption, instant, interval, intervalFactorOption, legendFormat } = this.state;
return (
@@ -103,8 +103,7 @@ export class PromQueryEditor extends PureComponent<Props, State> {
onRunQuery={this.onRunQuery}
onChange={this.onFieldChange}
history={[]}
panelData={panelData}
queryResponse={queryResponse}
data={data}
datasourceStatus={DataSourceStatus.Connected} // TODO: replace with real DataSourceStatus
/>
@@ -165,7 +164,7 @@ export class PromQueryEditor extends PureComponent<Props, State> {
<PromLink
datasource={datasource}
query={this.query} // Use modified query
panelData={panelData}
panelData={data}
/>
</FormLabel>
</div>