mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
* Explore control panel - Chart control, TimeFilter, GroupBy, Filters (#1205) * create structure for new forked explore view (#1099) * create structure for new forked explore view * update component name * add bootstrap data pattern * remove console.log * Associate version to entry files (#1060) * Associate version to entry files * Modified path joins for configs * Made changes based on comments * Created store and reducers (#1108) * Created store and reducers * Added spec * Modifications based on comments * Explore control panel components: Chart control, Time filter, SQL, GroupBy and Filters * Modifications based on comments * accommodate old and new explore urls * move bootstrap data up in scope * fix code climate issues * fix long lines * fix syntax error
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import { bindActionCreators } from 'redux';
|
|
import * as actions from '../actions/exploreActions';
|
|
import { connect } from 'react-redux';
|
|
|
|
const propTypes = {
|
|
actions: React.PropTypes.object,
|
|
};
|
|
|
|
class SqlClause extends React.Component {
|
|
changeWhere(whereClause) {
|
|
this.props.actions.setWhereClause(whereClause);
|
|
}
|
|
changeHaving(havingClause) {
|
|
this.props.actions.setHavingClause(havingClause);
|
|
}
|
|
render() {
|
|
return (
|
|
<div className="panel space-1">
|
|
<div className="panel-header">SQL</div>
|
|
<div className="panel-body">
|
|
<div className="row">
|
|
<h5 className="section-heading">Where</h5>
|
|
<input
|
|
type="text"
|
|
onChange={this.changeWhere.bind(this)}
|
|
className="form-control input-sm"
|
|
placeholder="Where Clause"
|
|
/>
|
|
</div>
|
|
<div className="row">
|
|
<h5 className="section-heading">Having</h5>
|
|
<input
|
|
type="text"
|
|
onChange={this.changeHaving.bind(this)}
|
|
className="form-control input-sm"
|
|
placeholder="Having Clause"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
SqlClause.propTypes = propTypes;
|
|
|
|
function mapStateToProps() {
|
|
return {};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators(actions, dispatch),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SqlClause);
|