mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
* adding refresh chart overlay when chart is out of sync with control panel * fading the visualization when stale * addressing comments from team on layout of UI
43 lines
1004 B
JavaScript
43 lines
1004 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Button from '../components/Button';
|
|
import { t } from '../locales';
|
|
|
|
const propTypes = {
|
|
height: PropTypes.number.isRequired,
|
|
width: PropTypes.number.isRequired,
|
|
onQuery: PropTypes.func,
|
|
onDismiss: PropTypes.func,
|
|
};
|
|
|
|
class RefreshChartOverlay extends React.PureComponent {
|
|
render() {
|
|
return (
|
|
<div
|
|
style={{ height: this.props.height, width: this.props.width }}
|
|
className="explore-chart-overlay"
|
|
>
|
|
<div>
|
|
<Button
|
|
className="refresh-overlay-btn"
|
|
onClick={this.props.onQuery}
|
|
bsStyle="primary"
|
|
>
|
|
{t('Run Query')}
|
|
</Button>
|
|
<Button
|
|
className="dismiss-overlay-btn"
|
|
onClick={this.props.onDismiss}
|
|
>
|
|
{t('Dismiss')}
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
RefreshChartOverlay.propTypes = propTypes;
|
|
|
|
export default RefreshChartOverlay;
|