Commit 63665dcc by Torkel Ödegaard

fix(grafana datasource): fixed the built in test data source, fixes #2795

parent 792b194d
define([
'angular',
'lodash',
'kbn',
'./directives',
],
function (angular, _, kbn) {
function (angular, _) {
'use strict';
var module = angular.module('grafana.services');
......@@ -15,11 +14,11 @@ function (angular, _, kbn) {
}
GrafanaDatasource.prototype.query = function(options) {
// get from & to in seconds
var from = kbn.parseDate(options.range.from).getTime();
var to = kbn.parseDate(options.range.to).getTime();
return backendSrv.get('/api/metrics/test', { from: from, to: to, maxDataPoints: options.maxDataPoints });
return backendSrv.get('/api/metrics/test', {
from: options.range.from.valueOf(),
to: options.range.to.valueOf(),
maxDataPoints: options.maxDataPoints
});
};
GrafanaDatasource.prototype.metricFindQuery = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment