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
c6bb86d8
Commit
c6bb86d8
authored
Dec 06, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/ryantxu/grafana
into ryantxu-master
parents
d56b9a72
0534d43a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
public/app/plugins/datasource/influxdb/datasource.ts
+9
-3
No files found.
public/app/plugins/datasource/influxdb/datasource.ts
View file @
c6bb86d8
...
...
@@ -250,8 +250,10 @@ export default class InfluxDatasource {
};
getTimeFilter
(
options
)
{
var
from
=
this
.
getInfluxTime
(
options
.
rangeRaw
.
from
,
false
);
var
until
=
this
.
getInfluxTime
(
options
.
rangeRaw
.
to
,
true
);
var
inMS
=
elapsed
<
(
5
*
60000
);
var
from
=
this
.
getInfluxTime
(
options
.
rangeRaw
.
from
,
false
,
inMS
);
var
until
=
this
.
getInfluxTime
(
options
.
rangeRaw
.
to
,
true
,
inMS
);
var
fromIsAbsolute
=
from
[
from
.
length
-
1
]
===
's'
;
if
(
until
===
'now()'
&&
!
fromIsAbsolute
)
{
...
...
@@ -261,7 +263,7 @@ export default class InfluxDatasource {
return
'time > '
+
from
+
' and time < '
+
until
;
}
getInfluxTime
(
date
,
roundUp
)
{
getInfluxTime
(
date
,
roundUp
,
inMS
)
{
if
(
_
.
isString
(
date
))
{
if
(
date
===
'now'
)
{
return
'now()'
;
...
...
@@ -275,6 +277,10 @@ export default class InfluxDatasource {
}
date
=
dateMath
.
parse
(
date
,
roundUp
);
}
if
(
inMS
)
{
return
date
.
valueOf
()
+
'ms'
;
}
return
(
date
.
valueOf
()
/
1000
).
toFixed
(
0
)
+
's'
;
}
}
...
...
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