forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Explore] applying refresh chart overlay when chart is stale (apache#…
…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
- Loading branch information
Gabe Lyons
authored and
Grace Guo
committed
Feb 28, 2018
1 parent
849a2ce
commit 764a92c
Showing
6 changed files
with
105 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
superset/assets/javascripts/components/RefreshChartOverlay.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters