Fix broken upper time range tempvar.

pull/10616/head
Hunter Trujillo 2017-07-07 08:34:03 -06:00
parent ecad98beba
commit ce3305fabd
2 changed files with 12 additions and 17 deletions

View File

@ -280,7 +280,7 @@ class DashboardPage extends Component {
type: 'constant',
values: [
{
value: upper,
value: upper || 'now()',
type: 'constant',
selected: true,
},
@ -301,20 +301,12 @@ class DashboardPage extends Component {
let templatesIncludingDashTime
if (dashboard) {
if (upper) {
templatesIncludingDashTime = [
...dashboard.templates,
dashboardTime,
upperDashboardTime,
interval,
]
} else {
templatesIncludingDashTime = [
...dashboard.templates,
dashboardTime,
interval,
]
}
} else {
templatesIncludingDashTime = []
}

View File

@ -88,7 +88,10 @@ class LayoutRenderer extends Component {
let queryText
if (query.queryConfig) {
const {queryConfig: {rawText, range}} = query
const timeRange = range || {upper: null, lower: ':dashboardTime:'}
const timeRange = range || {
upper: ':upperDashboardTime:',
lower: ':dashboardTime:',
}
queryText = rawText || buildInfluxQLQuery(timeRange, query.queryConfig)
} else {
queryText = this.buildQueryForOldQuerySchema(query)