File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
public/app/plugins/datasource/influxdb Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -250,11 +250,9 @@ export default class InfluxDatasource {
250
250
} ;
251
251
252
252
getTimeFilter ( options ) {
253
- var inMS = elapsed < ( 5 * 60000 ) ;
254
-
255
- var from = this . getInfluxTime ( options . rangeRaw . from , false , inMS ) ;
256
- var until = this . getInfluxTime ( options . rangeRaw . to , true , inMS ) ;
257
- var fromIsAbsolute = from [ from . length - 1 ] === 's' ;
253
+ var from = this . getInfluxTime ( options . rangeRaw . from , false ) ;
254
+ var until = this . getInfluxTime ( options . rangeRaw . to , true ) ;
255
+ var fromIsAbsolute = from [ from . length - 1 ] === 'ms' ;
258
256
259
257
if ( until === 'now()' && ! fromIsAbsolute ) {
260
258
return 'time > ' + from ;
@@ -263,7 +261,7 @@ export default class InfluxDatasource {
263
261
return 'time > ' + from + ' and time < ' + until ;
264
262
}
265
263
266
- getInfluxTime ( date , roundUp , inMS ) {
264
+ getInfluxTime ( date , roundUp ) {
267
265
if ( _ . isString ( date ) ) {
268
266
if ( date === 'now' ) {
269
267
return 'now()' ;
@@ -278,10 +276,7 @@ export default class InfluxDatasource {
278
276
date = dateMath . parse ( date , roundUp ) ;
279
277
}
280
278
281
- if ( inMS ) {
282
- return date . valueOf ( ) + 'ms' ;
283
- }
284
- return ( date . valueOf ( ) / 1000 ) . toFixed ( 0 ) + 's' ;
279
+ return date . valueOf ( ) + 'ms' ;
285
280
}
286
281
}
287
282
You can’t perform that action at this time.
0 commit comments