mirror of
https://github.com/apache/superset.git
synced 2026-04-10 11:55:24 +00:00
[hotfix] fixing the build
This commit is contained in:
@@ -28,26 +28,6 @@ export default class DisplayQueryButton extends React.PureComponent {
|
||||
this.beforeOpen = this.beforeOpen.bind(this);
|
||||
this.fetchQuery = this.fetchQuery.bind(this);
|
||||
}
|
||||
fetchQuery() {
|
||||
this.setState({ isLoading: true });
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: this.props.queryEndpoint,
|
||||
success: data => {
|
||||
this.setState({
|
||||
language: data.language,
|
||||
query: data.query,
|
||||
isLoading: false,
|
||||
});
|
||||
},
|
||||
error: data => {
|
||||
this.setState({
|
||||
error: data.error,
|
||||
isLoading: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
setStateFromQueryResponse() {
|
||||
const qr = this.props.queryResponse;
|
||||
this.setState({
|
||||
@@ -56,6 +36,26 @@ export default class DisplayQueryButton extends React.PureComponent {
|
||||
isLoading: false,
|
||||
});
|
||||
}
|
||||
fetchQuery() {
|
||||
this.setState({ isLoading: true });
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: this.props.queryEndpoint,
|
||||
success: (data) => {
|
||||
this.setState({
|
||||
language: data.language,
|
||||
query: data.query,
|
||||
isLoading: false,
|
||||
});
|
||||
},
|
||||
error: (data) => {
|
||||
this.setState({
|
||||
error: data.error,
|
||||
isLoading: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
beforeOpen() {
|
||||
if (this.props.chartStatus === 'loading' || this.props.chartStatus === null) {
|
||||
this.fetchQuery();
|
||||
|
||||
Reference in New Issue
Block a user