diff --git a/superset/assets/javascripts/dashboard/components/GridCell.jsx b/superset/assets/javascripts/dashboard/components/GridCell.jsx
index 1a59a92dd..26d8eeb6e 100644
--- a/superset/assets/javascripts/dashboard/components/GridCell.jsx
+++ b/superset/assets/javascripts/dashboard/components/GridCell.jsx
@@ -11,6 +11,8 @@ const propTypes = {
timeout: PropTypes.number,
datasource: PropTypes.object,
isLoading: PropTypes.bool,
+ isCached: PropTypes.bool,
+ cachedDttm: PropTypes.number,
isExpanded: PropTypes.bool,
widgetHeight: PropTypes.number,
widgetWidth: PropTypes.number,
@@ -78,8 +80,9 @@ class GridCell extends React.PureComponent {
render() {
const {
- exploreChartUrl, exportCSVUrl, isExpanded, isLoading, removeSlice, updateSliceName,
- toggleExpandSlice, forceRefresh, chartKey, slice, datasource, formData, timeout,
+ exploreChartUrl, exportCSVUrl, isExpanded, isLoading, isCached, cachedDttm,
+ removeSlice, updateSliceName, toggleExpandSlice, forceRefresh,
+ chartKey, slice, datasource, formData, timeout,
} = this.props;
return (
{
+ const chartKey = `slice_${slice.slice_id}`;
+ const currentChart = this.props.charts[chartKey];
+ const queryResponse = currentChart.queryResponse || {};
+ return (
+
+
+
);
+ });
+
return (
- {this.props.dashboard.slices.map(slice => (
-
-
-
- ))}
+ {cells}
);
}
diff --git a/superset/assets/javascripts/dashboard/components/SliceHeader.jsx b/superset/assets/javascripts/dashboard/components/SliceHeader.jsx
index d1a2d9ec9..8360017d4 100644
--- a/superset/assets/javascripts/dashboard/components/SliceHeader.jsx
+++ b/superset/assets/javascripts/dashboard/components/SliceHeader.jsx
@@ -11,6 +11,8 @@ const propTypes = {
exploreChartUrl: PropTypes.string,
exportCSVUrl: PropTypes.string,
isExpanded: PropTypes.bool,
+ isCached: PropTypes.bool,
+ cachedDttm: PropTypes.number,
formDataExtra: PropTypes.object,
removeSlice: PropTypes.func,
updateSliceName: PropTypes.func,
@@ -40,9 +42,9 @@ class SliceHeader extends React.PureComponent {
render() {
const slice = this.props.slice;
- const isCached = slice.is_cached;
+ const isCached = this.props.isCached;
const isExpanded = !!this.props.isExpanded;
- const cachedWhen = moment.utc(slice.cached_dttm).fromNow();
+ const cachedWhen = moment.utc(this.props.cachedDttm).fromNow();
const refreshTooltip = isCached ?
t('Served from data cached %s . Click to force refresh.', cachedWhen) :
t('Force refresh data');