mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
* 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 * Created store and reducers (#1108) * Created store and reducers * Added spec * Modifications based on comments * do use bootstrap data for now * don't deal with bootstrap data for now * use victory as a base * import fake line data, add fake panels, make chart fixed * add fetch support * get slice data from json endpoint * render chart with slicejson * update chart and label demo * remove fetch config * remove dummy control panels * should be a func * make TimeSeriesLineChart * add a comment * inner height for height * don't need fetch yet * trailing comma breaks in package json * pass in viz data from props * add style sheet * set height on explore container * add legend * make chart responsive to window resize * can't use head_css in template bc overrides head_css in basic * fix linting * break labelItem into own SFC, make legend SFC * add propTypes and fix linter
32 lines
831 B
JavaScript
32 lines
831 B
JavaScript
import React, { PropTypes } from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
const propTypes = {
|
|
canAdd: PropTypes.string.isRequired,
|
|
onQuery: PropTypes.func.isRequired,
|
|
};
|
|
|
|
export default function QueryAndSaveBtns({ canAdd, onQuery }) {
|
|
const saveClasses = classnames('btn btn-default btn-sm', {
|
|
'disabled disabledButton': canAdd !== 'True',
|
|
});
|
|
|
|
return (
|
|
<div className="btn-group query-and-save">
|
|
<button type="button" className="btn btn-primary btn-sm" onClick={onQuery}>
|
|
<i className="fa fa-bolt"></i> Query
|
|
</button>
|
|
<button
|
|
type="button"
|
|
className={saveClasses}
|
|
data-target="#save_modal"
|
|
data-toggle="modal"
|
|
>
|
|
<i className="fa fa-plus-circle"></i> Save as
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
QueryAndSaveBtns.propTypes = propTypes;
|