Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1998c08d
Commit
1998c08d
authored
Nov 27, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use default range from time picker
parent
109ff1a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
public/app/features/explore/Explore.tsx
+1
-1
public/app/features/explore/QueryEditor.tsx
+1
-1
public/app/features/explore/TimePicker.tsx
+8
-2
No files found.
public/app/features/explore/Explore.tsx
View file @
1998c08d
...
...
@@ -139,7 +139,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
this
.
modifiedQueries
=
initialQueries
.
slice
();
this
.
timeSrv
=
getTimeSrv
();
this
.
timeSrv
.
init
({
time
:
{
from
:
'now-6h'
,
to
:
'now'
}
,
time
:
DEFAULT_RANGE
,
refresh
:
false
,
getTimezone
:
()
=>
'utc'
,
timeRangeUpdated
:
()
=>
console
.
log
(
'refreshDashboard!'
),
...
...
public/app/features/explore/QueryEditor.tsx
View file @
1998c08d
...
...
@@ -25,7 +25,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
const
{
datasource
,
initialQuery
,
exploreEvents
}
=
this
.
props
;
const
loader
=
getAngularLoader
();
const
template
=
'<plugin-component type="query-ctrl"> </plugin-component>'
;
const
target
=
{
datasource
:
datasource
.
name
};
const
target
=
{
datasource
:
datasource
.
name
,
...
initialQuery
};
const
scopeProps
=
{
target
,
ctrl
:
{
...
...
public/app/features/explore/TimePicker.tsx
View file @
1998c08d
...
...
@@ -3,7 +3,7 @@ import moment from 'moment';
import
*
as
dateMath
from
'app/core/utils/datemath'
;
import
*
as
rangeUtil
from
'app/core/utils/rangeutil'
;
import
{
RawTimeRange
}
from
'app/types/series'
;
import
{
RawTimeRange
,
TimeRange
}
from
'app/types/series'
;
const
DATE_FORMAT
=
'YYYY-MM-DD HH:mm:ss'
;
export
const
DEFAULT_RANGE
=
{
...
...
@@ -120,6 +120,12 @@ export default class TimePicker extends PureComponent<TimePickerProps, TimePicke
to
:
moment
(
nextTo
),
};
const
nextTimeRange
:
TimeRange
=
{
raw
:
nextRange
,
from
,
to
,
};
this
.
setState
(
{
rangeString
:
rangeUtil
.
describeTimeRange
(
nextRange
),
...
...
@@ -127,7 +133,7 @@ export default class TimePicker extends PureComponent<TimePickerProps, TimePicke
toRaw
:
nextRange
.
to
.
format
(
DATE_FORMAT
),
},
()
=>
{
onChangeTime
(
nextRange
);
onChangeTime
(
next
Time
Range
);
}
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment