From 78d93315a90a99381d4923d2dfa75e683928bef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 20 Mar 2019 12:06:40 +0100 Subject: [PATCH] fix(graphite): nonNegativeDerivative argument hidden if 0, fixes #12488 --- public/app/plugins/datasource/graphite/func_editor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/graphite/func_editor.ts b/public/app/plugins/datasource/graphite/func_editor.ts index f2522f2ab18..25c007fcb19 100644 --- a/public/app/plugins/datasource/graphite/func_editor.ts +++ b/public/app/plugins/datasource/graphite/func_editor.ts @@ -183,8 +183,9 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { } 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) { paramValue = '+'; } @@ -197,7 +198,7 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { '' + - (paramValue || ' ') + + (hasValue ? paramValue : ' ') + '' ); const $input = $(paramTemplate);