Commit 78d93315 by Torkel Ödegaard

fix(graphite): nonNegativeDerivative argument hidden if 0, fixes #12488

parent e5d84f8c
...@@ -183,8 +183,9 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { ...@@ -183,8 +183,9 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) {
} }
let paramValue = templateSrv.highlightVariablesAsHtml(func.params[index]); let paramValue = templateSrv.highlightVariablesAsHtml(func.params[index]);
const hasValue = paramValue !== null && paramValue !== undefined;
const last = index >= func.params.length - 1 && param.optional && !paramValue; const last = index >= func.params.length - 1 && param.optional && !hasValue;
if (last && param.multiple) { if (last && param.multiple) {
paramValue = '+'; paramValue = '+';
} }
...@@ -197,7 +198,7 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { ...@@ -197,7 +198,7 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) {
'<a ng-click="" class="graphite-func-param-link' + '<a ng-click="" class="graphite-func-param-link' +
(last ? ' query-part__last' : '') + (last ? ' query-part__last' : '') +
'">' + '">' +
(paramValue || '&nbsp;') + (hasValue ? paramValue : '&nbsp;') +
'</a>' '</a>'
); );
const $input = $(paramTemplate); const $input = $(paramTemplate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment