From 8a184e9d30629d2d9d7f200b5886968502ba6f45 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Fri, 13 Nov 2015 04:01:55 -0800 Subject: [PATCH] Made tags editable in opentsdb query --- .../plugins/datasource/opentsdb/partials/query.editor.html | 7 +++++-- public/app/plugins/datasource/opentsdb/queryCtrl.js | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/opentsdb/partials/query.editor.html b/public/app/plugins/datasource/opentsdb/partials/query.editor.html index 5ab9f226dc3..8a3c0c0f753 100644 --- a/public/app/plugins/datasource/opentsdb/partials/query.editor.html +++ b/public/app/plugins/datasource/opentsdb/partials/query.editor.html @@ -118,8 +118,11 @@ Tags
  • - {{key}} = {{value}} - + {{key}} = {{value}} + + + +
  • diff --git a/public/app/plugins/datasource/opentsdb/queryCtrl.js b/public/app/plugins/datasource/opentsdb/queryCtrl.js index 94b2cbee8fa..8af3af206b6 100644 --- a/public/app/plugins/datasource/opentsdb/queryCtrl.js +++ b/public/app/plugins/datasource/opentsdb/queryCtrl.js @@ -86,6 +86,13 @@ function (angular, _, kbn) { $scope.targetBlur(); }; + $scope.editTag = function(key, value) { + $scope.removeTag(key); + $scope.target.currentTagKey = key; + $scope.target.currentTagValue = value; + $scope.addTag(); + }; + function validateTarget(target) { var errs = {};