mirror of
https://github.com/apache/superset.git
synced 2026-04-22 09:35:23 +00:00
[Explore] applying refresh chart overlay when chart is stale (#4486)
* 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
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user