Просмотр исходного кода

Plugins: Custom datasource example adapted to return timestamps in millieseconds, Fixes #1263

Torkel Ödegaard 11 лет назад
Родитель
Сommit
32ae0ea13e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/plugins/datasource.example.js

+ 2 - 2
src/plugins/datasource.example.js

@@ -21,8 +21,8 @@ function (angular, _, kbn) {
 
 
     CustomDatasource.prototype.query = function(options) {
     CustomDatasource.prototype.query = function(options) {
       // get from & to in seconds
       // get from & to in seconds
-      var from = kbn.parseDate(options.range.from).getTime() / 1000;
-      var to = kbn.parseDate(options.range.to).getTime() / 1000;
+      var from = kbn.parseDate(options.range.from).getTime();
+      var to = kbn.parseDate(options.range.to).getTime();
 
 
       var series = [];
       var series = [];
       var stepInSeconds = (to - from) / options.maxDataPoints;
       var stepInSeconds = (to - from) / options.maxDataPoints;