diff --git a/public/app/plugins/datasource/graphite/func_editor.js b/public/app/plugins/datasource/graphite/func_editor.js index 3420d7e97c3..949a6912720 100644 --- a/public/app/plugins/datasource/graphite/func_editor.js +++ b/public/app/plugins/datasource/graphite/func_editor.js @@ -94,9 +94,9 @@ function (angular, _, $, rst2html) { // remove optional empty params if (newValue !== '' || paramDef(paramIndex).optional) { func.updateParam(newValue, paramIndex); + $link.html(newValue ? templateSrv.highlightVariablesAsHtml(newValue) : ' '); } - $link.html(templateSrv.highlightVariablesAsHtml(newValue)); scheduledRelinkIfNeeded(); $scope.$apply(function() { diff --git a/public/app/plugins/datasource/graphite/partials/query.editor.html b/public/app/plugins/datasource/graphite/partials/query.editor.html index 8ff0b9c7adf..6414a39c94f 100755 --- a/public/app/plugins/datasource/graphite/partials/query.editor.html +++ b/public/app/plugins/datasource/graphite/partials/query.editor.html @@ -40,7 +40,6 @@ placeholder="Tag value" get-options="ctrl.getTagValues(tag, $index, $query)" on-change="ctrl.tagChanged(tag, $index)" - start-open="!ctrl.showDelimiter($index)" /> @@ -56,11 +55,6 @@
-
diff --git a/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts b/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts index d956447e828..f8b70b05940 100644 --- a/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts +++ b/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts @@ -26,7 +26,7 @@ describe('GraphiteQueryCtrl', function() { ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([])); ctx.datasource.getFuncDefs = sinon.stub().returns(ctx.$q.when(gfunc.getFuncDefs('1.0'))); ctx.datasource.getFuncDef = gfunc.getFuncDef; - ctx.datasource.waitForFuncDefsLoaded = ctx.$q.when(null); + ctx.datasource.waitForFuncDefsLoaded = sinon.stub().returns(ctx.$q.when(null)); ctx.datasource.createFuncInstance = gfunc.createFuncInstance; ctx.panelCtrl = { panel: {} }; ctx.panelCtrl = {