make separator configurable

This commit is contained in:
Sven Klemm
2018-05-26 23:03:59 +02:00
parent 291d732b36
commit 039e38d510
2 changed files with 4 additions and 1 deletions
@@ -8,6 +8,7 @@ export class SqlPartDef {
defaultParams: any[];
wrapOpen: string;
wrapClose: string;
separator: string;
renderer: any;
category: any;
addStrategy: any;
@@ -23,9 +24,11 @@ export class SqlPartDef {
if (this.style === "function") {
this.wrapOpen = "(";
this.wrapClose = ")";
this.separator = ", ";
} else {
this.wrapOpen = " ";
this.wrapClose = " ";
this.separator = " ";
}
this.params = options.params;
this.defaultParams = options.defaultParams;
@@ -153,7 +153,7 @@ export function sqlPartEditorDirective($compile, templateSrv) {
}
if (index > 0) {
$('<span>, </span>').appendTo($paramsContainer);
$('<span>' + partDef.separator + '</span>').appendTo($paramsContainer);
}
var paramValue = templateSrv.highlightVariablesAsHtml(part.params[index]);