mirror of
https://github.com/grafana/grafana.git
synced 2025-01-24 23:37:01 -06:00
fix(grafana datasource): fixed the built in test data source, fixes #2795
This commit is contained in:
parent
792b194d0e
commit
63665dccae
@ -1,10 +1,9 @@
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user