diff --git a/public/app/plugins/datasource/cloudwatch/datasource.js b/public/app/plugins/datasource/cloudwatch/datasource.js index 1dc87def301..3afe338bc53 100644 --- a/public/app/plugins/datasource/cloudwatch/datasource.js +++ b/public/app/plugins/datasource/cloudwatch/datasource.js @@ -2,13 +2,13 @@ define([ 'angular', 'lodash', - 'kbn', + 'app/core/utils/datemath', 'moment', './queryCtrl', './directives', 'aws-sdk', ], -function (angular, _, kbn) { +function (angular, _, dateMath) { 'use strict'; var module = angular.module('grafana.services'); @@ -543,7 +543,7 @@ function (angular, _, kbn) { } function convertToCloudWatchTime(date) { - return Math.round(kbn.parseDate(date).getTime() / 1000); + return date.valueOf() / 1000; } function convertDimensionFormat(dimensions) { diff --git a/public/app/plugins/datasource/cloudwatch/partials/query.editor.html b/public/app/plugins/datasource/cloudwatch/partials/query.editor.html index 1da41fc2020..47db2821158 100644 --- a/public/app/plugins/datasource/cloudwatch/partials/query.editor.html +++ b/public/app/plugins/datasource/cloudwatch/partials/query.editor.html @@ -37,13 +37,13 @@ Metric
  • - +
  • - +
  • - +
  • diff --git a/public/app/plugins/datasource/cloudwatch/_plugin.json b/public/app/plugins/datasource/cloudwatch/plugin.json similarity index 100% rename from public/app/plugins/datasource/cloudwatch/_plugin.json rename to public/app/plugins/datasource/cloudwatch/plugin.json