[explorev2] Breaking down large files, fixing JS warnings (#1773)

* Breaking down large files, fixing JS warnings

* fix unit tests
This commit is contained in:
Maxime Beauchemin
2016-12-06 14:39:30 -08:00
committed by GitHub
parent 3597fdb7f8
commit c1558578d7
10 changed files with 1734 additions and 1739 deletions

View File

@@ -165,7 +165,7 @@ class ChartContainer extends React.Component {
id={this.props.containerId}
ref={(ref) => { this.chartContainerRef = ref; }}
className={this.props.viz_type}
style={{ 'overflow-x': 'scroll' }}
style={{ overflowX: 'scroll' }}
/>
);
}

View File

@@ -4,7 +4,7 @@ import { bindActionCreators } from 'redux';
import * as actions from '../actions/exploreActions';
import { connect } from 'react-redux';
import { Panel, Alert } from 'react-bootstrap';
import { visTypes, sectionsToRender, commonControlPanelSections } from '../stores/store';
import visTypes, { sectionsToRender, commonControlPanelSections } from '../stores/visTypes';
import ControlPanelSection from './ControlPanelSection';
import FieldSetRow from './FieldSetRow';
import Filters from './Filters';

View File

@@ -7,7 +7,7 @@ import ChartContainer from './ChartContainer';
import ControlPanelsContainer from './ControlPanelsContainer';
import SaveModal from './SaveModal';
import QueryAndSaveBtns from '../../explore/components/QueryAndSaveBtns';
import { autoQueryFields } from '../stores/store';
import { autoQueryFields } from '../stores/fields';
import { getParamObject } from '../exploreUtils';
const $ = require('jquery');

View File

@@ -3,7 +3,7 @@ import TextField from './TextField';
import CheckboxField from './CheckboxField';
import TextAreaField from './TextAreaField';
import SelectField from './SelectField';
import { fieldTypes } from '../stores/store';
import { fieldTypes } from '../stores/fields';
const propTypes = {
name: PropTypes.string.isRequired,

View File

@@ -30,11 +30,14 @@ class Filters extends React.Component {
}
render() {
const filters = [];
let i = 0;
this.props.filters.forEach((filter) => {
// only display filters with current prefix
i++;
if (filter.prefix === this.props.prefix) {
filters.push(
<Filter
key={i}
filterColumnOpts={this.props.filterColumnOpts}
actions={this.props.actions}
prefix={this.props.prefix}