Peel templates off of dashboard

pull/1315/head
Luke Morris 2017-04-18 16:09:55 -07:00
parent 2516f980f1
commit 02f68fc823
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ const Dashboard = ({
return null return null
} }
const {templates} = dashboard
const cells = dashboard.cells.map((cell) => { const cells = dashboard.cells.map((cell) => {
const dashboardCell = {...cell} const dashboardCell = {...cell}
dashboardCell.queries = dashboardCell.queries.map(({label, query, queryConfig, db}) => dashboardCell.queries = dashboardCell.queries.map(({label, query, queryConfig, db}) =>
@ -47,7 +49,7 @@ const Dashboard = ({
</div> </div>
<div className="page-header__right"> <div className="page-header__right">
{ {
dashboard.templates.map(({id, values, selected}) => { templates.map(({id, values, selected}) => {
const items = values ? values.map(value => ({text: value})) : [] const items = values ? values.map(value => ({text: value})) : []
return ( return (
<Dropdown <Dropdown