From 53075e0ec7a1ba1be39cbd8f7a4c37e2d97e938a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 18 Feb 2014 12:18:52 +0100 Subject: [PATCH] Fixes #104, improvements to graphite target editor and use of wildcard, the "select metric" should now behave/appear correctly --- src/app/controllers/graphiteTarget.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/controllers/graphiteTarget.js b/src/app/controllers/graphiteTarget.js index 8ec5bde50ac..6c0f4aca09d 100644 --- a/src/app/controllers/graphiteTarget.js +++ b/src/app/controllers/graphiteTarget.js @@ -168,11 +168,12 @@ function (angular, _, config, gfunc, Parser) { segments.unshift({ type: 'template', html: '[[' + filter.name + ']]', - val: '[[' + filter.name + ']]' + val: '[[' + filter.name + ']]', + expandable: true, }); }); - segments.unshift({val: '*', html: '' }); + segments.unshift({val: '*', html: '', expandable: true }); $scope.altSegments = segments; }) .then(null, function(err) { @@ -193,6 +194,9 @@ function (angular, _, config, gfunc, Parser) { $scope.targetChanged(); }); } + else { + $scope.segments = $scope.segments.splice(0, segmentIndex + 1); + } setSegmentFocus(segmentIndex + 1); $scope.targetChanged();