Add upperDashboardTime TV.
parent
342d46261e
commit
a8dfb740a4
|
@ -259,16 +259,26 @@ class DashboardPage extends Component {
|
||||||
params: {sourceID},
|
params: {sourceID},
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const value = upper ? `'${lower}' AND time < '${upper}'` : lower
|
|
||||||
|
|
||||||
const dashboard = this.getActiveDashboard()
|
|
||||||
const dashboardTime = {
|
const dashboardTime = {
|
||||||
id: 'dashtime',
|
id: 'dashtime',
|
||||||
tempVar: ':dashboardTime:',
|
tempVar: ':dashboardTime:',
|
||||||
type: 'constant',
|
type: 'constant',
|
||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
value,
|
value: `'${lower}'`,
|
||||||
|
type: 'constant',
|
||||||
|
selected: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
const upperDashboardTime = {
|
||||||
|
id: 'upperdashtime',
|
||||||
|
tempVar: ':upperDashboardTime:',
|
||||||
|
type: 'constant',
|
||||||
|
values: [
|
||||||
|
{
|
||||||
|
value: `'${upper}'`,
|
||||||
type: 'constant',
|
type: 'constant',
|
||||||
selected: true,
|
selected: true,
|
||||||
},
|
},
|
||||||
|
@ -285,10 +295,10 @@ class DashboardPage extends Component {
|
||||||
values: [],
|
values: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
const templatesIncludingDashTime =
|
const dashboard = this.getActiveDashboard()
|
||||||
(dashboard &&
|
const templatesIncludingDashTime = dashboard
|
||||||
dashboard.templates.concat(dashboardTime).concat(interval)) ||
|
? [...dashboard.templates, dashboardTime, upperDashboardTime, interval]
|
||||||
[]
|
: []
|
||||||
|
|
||||||
const {selectedCell, isEditMode, isTemplating} = this.state
|
const {selectedCell, isEditMode, isTemplating} = this.state
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue