From 25d7b8d08dd0395266b52850501c37f7ec1db4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 23 Sep 2015 21:13:19 +0200 Subject: [PATCH] feat(cloudwatch): resumed work on cloudwath datasource, #684, #2445 --- public/app/plugins/datasource/cloudwatch/datasource.js | 6 +++--- .../datasource/cloudwatch/partials/query.editor.html | 6 +++--- .../datasource/cloudwatch/{_plugin.json => plugin.json} | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename public/app/plugins/datasource/cloudwatch/{_plugin.json => plugin.json} (100%) 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