mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
import fix step calibration
This commit is contained in:
@@ -209,7 +209,7 @@ function (angular, _, moment, dateMath) {
|
||||
sec = 1;
|
||||
}
|
||||
|
||||
return Math.ceil(sec * intervalFactor) + 's';
|
||||
return Math.ceil(sec * intervalFactor);
|
||||
};
|
||||
|
||||
function transformMetricData(md, options) {
|
||||
@@ -218,7 +218,7 @@ function (angular, _, moment, dateMath) {
|
||||
|
||||
metricLabel = createMetricLabel(md.metric, options);
|
||||
|
||||
var stepMs = parseInt(options.step.slice(0, -1)) * 1000;
|
||||
var stepMs = parseInt(options.step) * 1000;
|
||||
var lastTimestamp = null;
|
||||
_.each(md.values, function(value) {
|
||||
var dp_value = parseFloat(value[1]);
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('PrometheusDatasource', function() {
|
||||
var results;
|
||||
var urlExpected = 'proxied/api/v1/query_range?query=' +
|
||||
encodeURIComponent('test{job="testjob"}') +
|
||||
'&start=1443438675&end=1443460275&step=60s';
|
||||
'&start=1443438675&end=1443460275&step=60';
|
||||
var query = {
|
||||
range: { from: moment(1443438674760), to: moment(1443460274760) },
|
||||
targets: [{ expr: 'test{job="testjob"}' }],
|
||||
|
||||
Reference in New Issue
Block a user