You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/26 22:49:56 UTC

[GitHub] mistercrunch commented on a change in pull request #4486: [Explore] applying refresh chart overlay when chart is stale

mistercrunch commented on a change in pull request #4486: [Explore] applying refresh chart overlay when chart is stale
URL: https://github.com/apache/incubator-superset/pull/4486#discussion_r170762742
 
 

 ##########
 File path: superset/assets/javascripts/components/RefreshChartOverlay.jsx
 ##########
 @@ -0,0 +1,39 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import Button from '../components/Button';
+import Link from '../SqlLab/components/Link';
+
+const propTypes = {
+  height: PropTypes.number.isRequired,
+  width: PropTypes.number.isRequired,
+  errorMessage: PropTypes.node,
+  onQuery: PropTypes.func,
+  onDismiss: PropTypes.func,
+};
+
+class RefreshChartOverlay extends React.PureComponent {
+  render() {
+    return (
+      <div
+        style={{ height: this.props.height, width: this.props.width }}
+        className="refresh-chart-overlay"
+      >
+        <div>
+          <Button 
+            className="query" 
+            onClick={this.props.onQuery} 
+            disabled={!!this.props.errorMessage}
+            bsStyle={this.props.errorMessage ? 'danger' : 'primary'}
+          >
+            <i className="fa fa-bolt" /> Refresh Chart
 
 Review comment:
   i18n: `t('Refresh Chart')`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services