mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
Remove fetch results button for async queries (#2084)
This commit is contained in:
@@ -46,6 +46,10 @@ class ResultSet extends React.PureComponent {
|
|||||||
this.clearQueryResults(nextProps.query)
|
this.clearQueryResults(nextProps.query)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (nextProps.query.resultsKey
|
||||||
|
&& nextProps.query.resultsKey !== this.props.query.resultsKey) {
|
||||||
|
this.fetchResults(nextProps.query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getControls() {
|
getControls() {
|
||||||
if (this.props.search || this.props.visualize || this.props.csv) {
|
if (this.props.search || this.props.visualize || this.props.csv) {
|
||||||
@@ -197,20 +201,6 @@ class ResultSet extends React.PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (query.resultsKey) {
|
|
||||||
if (results && data && data.length === 0) {
|
|
||||||
// if fetched result contains zero rows of data
|
|
||||||
return <Alert bsStyle="warning">The asynchronous query returned no data</Alert>;
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Alert bsStyle="warning">This query was run asynchronously
|
|
||||||
<Button bsSize="sm" onClick={this.fetchResults.bind(this, query)}>
|
|
||||||
Fetch results
|
|
||||||
</Button>
|
|
||||||
</Alert>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (query.cached) {
|
if (query.cached) {
|
||||||
|
|||||||
Reference in New Issue
Block a user