From 923cd045cd5a92ba05d111e05b9f24a8c65e41ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 31 Jul 2014 12:27:49 +0200 Subject: [PATCH] Changed opentsdb metric option chartLabel to Alias to better conform to grafana naming, updated changelog with PR #618 info --- CHANGELOG.md | 1 + src/app/partials/opentsdb/editor.html | 27 +++++++++++-------- .../services/opentsdb/opentsdbDatasource.js | 5 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae62ae6e98d..55195b3d9ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - [Issue #556](https://github.com/grafana/grafana/issues/556). Chart: New legend display option "Right side", will show legend to the right of the graph - [Issue #604](https://github.com/grafana/grafana/issues/604). Chart: New axis format, 'bps' (SI unit in steps of 1000) useful for network gear metics - [Issue #626](https://github.com/grafana/grafana/issues/626). Chart: Downscale y axis to more precise unit, value of 0.1 for seconds format will be formated as 100 ms. Thanks @kamaradclimber +- [Issue #618](https://github.com/grafana/grafana/issues/618). OpenTSDB: Series alias option to override metric name returned from opentsdb. Thanks @heldr **Changes** - [Issue #536](https://github.com/grafana/grafana/issues/536). Graphite: Use unix epoch for Graphite from/to for absolute time ranges diff --git a/src/app/partials/opentsdb/editor.html b/src/app/partials/opentsdb/editor.html index c71fd0805c7..797e7c0fa72 100644 --- a/src/app/partials/opentsdb/editor.html +++ b/src/app/partials/opentsdb/editor.html @@ -57,18 +57,9 @@ -
  • - -
  • -
  • +
  • Aggregator +
  • +
  • +
    diff --git a/src/app/services/opentsdb/opentsdbDatasource.js b/src/app/services/opentsdb/opentsdbDatasource.js index 7a7651ed135..c46c3084678 100644 --- a/src/app/services/opentsdb/opentsdbDatasource.js +++ b/src/app/services/opentsdb/opentsdbDatasource.js @@ -15,6 +15,7 @@ function (angular, _, kbn) { this.editorSrc = 'app/partials/opentsdb/editor.html'; this.url = datasource.url; this.name = datasource.name; + this.supportMetrics = true; } // Called once per panel (graph) @@ -105,8 +106,8 @@ function (angular, _, kbn) { } function createMetricLabel(metric, tagData, options) { - if (options.chartLabel) { - return options.chartLabel; + if (options.alias) { + return options.alias; } if (!_.isEmpty(tagData)) {