Skip to content

Commit

Permalink
[hotfix] fixing the build
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 13, 2017
1 parent 6c68a21 commit c43a9fd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ class ChartContainer extends React.PureComponent {

<div className="pull-right">
{this.props.chartStatus === 'success' &&
this.props.queryResponse &&
this.props.queryResponse.is_cached &&
this.props.queryResponse &&
this.props.queryResponse.is_cached &&
<TooltipWrapper
tooltip="Loaded from cache. Click to force refresh"
label="cache-desc"
Expand All @@ -275,7 +275,7 @@ class ChartContainer extends React.PureComponent {
>
cached
</Label>
</TooltipWrapper>
</TooltipWrapper>
}
<Timer
startTime={this.props.chartUpdateStartTime}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,34 @@ export default class DisplayQueryButton extends React.PureComponent {
this.beforeOpen = this.beforeOpen.bind(this);
this.fetchQuery = this.fetchQuery.bind(this);
}
setStateFromQueryResponse() {
const qr = this.props.queryResponse;
this.setState({
language: qr.language,
query: qr.query,
isLoading: false,
});
}
fetchQuery() {
this.setState({ isLoading: true });
$.ajax({
type: 'GET',
url: this.props.queryEndpoint,
success: data => {
success: (data) => {
this.setState({
language: data.language,
query: data.query,
isLoading: false,
});
},
error: data => {
error: (data) => {
this.setState({
error: data.error,
isLoading: false,
});
},
});
}
setStateFromQueryResponse() {
const qr = this.props.queryResponse;
this.setState({
language: qr.language,
query: qr.query,
isLoading: false,
});
}
beforeOpen() {
if (this.props.chartStatus === 'loading' || this.props.chartStatus === null) {
this.fetchQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect } from 'chai';
import { describe, it } from 'mocha';
import { mount } from 'enzyme';
import { Modal } from 'react-bootstrap';
import ModalTrigger from './../../../../javascripts/components/ModalTrigger.jsx';
import ModalTrigger from './../../../../javascripts/components/ModalTrigger';

import DisplayQueryButton from '../../../../javascripts/explorev2/components/DisplayQueryButton';

Expand Down
12 changes: 0 additions & 12 deletions superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,6 @@ def fetch_result_sets(cls, db, datasource_type, force=False):
row['table_schema'], row['table_name']))
return result_sets

@classmethod
def extract_error_message(cls, e):
"""Extract error message for queries"""
logging.error(e)
print("-="*100)
print("-="*100)
print("-="*100)
print("-="*100)
print(type(e))
print(dir(e))
return error_msg_from_exception(e)

@classmethod
def extra_table_metadata(cls, database, table_name, schema_name):
indexes = database.get_indexes(table_name, schema_name)
Expand Down

0 comments on commit c43a9fd

Please sign in to comment.