Visualization passes thru templates to AutoRefresh (#1352)

pull/746/merge
lukevmorris 2017-04-28 14:36:55 -07:00 committed by GitHub
parent 89c379299b
commit 6514b425bd
3 changed files with 15 additions and 8 deletions

View File

@ -156,6 +156,7 @@ class CellEditorOverlay extends Component {
<Visualization <Visualization
autoRefresh={autoRefresh} autoRefresh={autoRefresh}
timeRange={timeRange} timeRange={timeRange}
templates={templates}
queryConfigs={queriesWorkingDraft} queryConfigs={queriesWorkingDraft}
activeQueryIndex={0} activeQueryIndex={0}
cellType={cellWorkingType} cellType={cellWorkingType}

View File

@ -11,6 +11,7 @@ const VisView = ({
view, view,
queries, queries,
cellType, cellType,
templates,
autoRefresh, autoRefresh,
heightPixels, heightPixels,
editQueryStatus, editQueryStatus,
@ -35,7 +36,13 @@ const VisView = ({
} }
if (cellType === 'single-stat') { if (cellType === 'single-stat') {
return <RefreshingSingleStat queries={[queries[0]]} autoRefresh={autoRefresh} /> return (
<RefreshingSingleStat
queries={[queries[0]]}
autoRefresh={autoRefresh}
templates={templates}
/>
)
} }
const displayOptions = { const displayOptions = {
@ -47,6 +54,7 @@ const VisView = ({
<RefreshingLineGraph <RefreshingLineGraph
queries={queries} queries={queries}
autoRefresh={autoRefresh} autoRefresh={autoRefresh}
templates={templates}
activeQueryIndex={activeQueryIndex} activeQueryIndex={activeQueryIndex}
isInDataExplorer={true} isInDataExplorer={true}
showSingleStat={cellType === 'line-plus-single-stat'} showSingleStat={cellType === 'line-plus-single-stat'}
@ -56,18 +64,13 @@ const VisView = ({
) )
} }
const { const {arrayOf, func, number, shape, string} = PropTypes
arrayOf,
func,
number,
shape,
string,
} = PropTypes
VisView.propTypes = { VisView.propTypes = {
view: string.isRequired, view: string.isRequired,
queries: arrayOf(shape()).isRequired, queries: arrayOf(shape()).isRequired,
cellType: string, cellType: string,
templates: arrayOf(shape()),
autoRefresh: number.isRequired, autoRefresh: number.isRequired,
heightPixels: number, heightPixels: number,
editQueryStatus: func.isRequired, editQueryStatus: func.isRequired,

View File

@ -14,6 +14,7 @@ const Visualization = React.createClass({
cellName: string, cellName: string,
cellType: string, cellType: string,
autoRefresh: number.isRequired, autoRefresh: number.isRequired,
templates: arrayOf(shape()),
timeRange: shape({ timeRange: shape({
upper: string, upper: string,
lower: string, lower: string,
@ -79,6 +80,7 @@ const Visualization = React.createClass({
cellType, cellType,
cellName, cellName,
timeRange, timeRange,
templates,
autoRefresh, autoRefresh,
heightPixels, heightPixels,
queryConfigs, queryConfigs,
@ -113,6 +115,7 @@ const Visualization = React.createClass({
<VisView <VisView
view={view} view={view}
queries={queries} queries={queries}
templates={templates}
cellType={cellType} cellType={cellType}
autoRefresh={autoRefresh} autoRefresh={autoRefresh}
heightPixels={heightPixels} heightPixels={heightPixels}