[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:
Gabe Lyons
2018-02-28 14:19:06 -08:00
committed by Grace Guo
parent 849a2cecee
commit 764a92cd10
6 changed files with 105 additions and 3 deletions

View File

@@ -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;