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
autoRefresh={autoRefresh}
timeRange={timeRange}
templates={templates}
queryConfigs={queriesWorkingDraft}
activeQueryIndex={0}
cellType={cellWorkingType}

View File

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

View File

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