Commit 47215098 by Patrick O'Carroll

changed var to const, changed to string interpolation

parent 2a903702
...@@ -4,16 +4,17 @@ import $ from 'jquery'; ...@@ -4,16 +4,17 @@ import $ from 'jquery';
import rst2html from 'rst2html'; import rst2html from 'rst2html';
export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { export function graphiteFuncEditor($compile, templateSrv, popoverSrv) {
var funcSpanTemplate = '<a ng-click="">{{func.def.name}}</a><span>(</span>'; const funcSpanTemplate = '<a ng-click="">{{func.def.name}}</a><span>(</span>';
var paramTemplate = '<input type="text" style="display:none"' + ' class="input-small tight-form-func-param"></input>'; const paramTemplate =
'<input type="text" style="display:none"' + ' class="input-small tight-form-func-param"></input>';
var funcControlsTemplate =
'<div class="tight-form-func-controls">' + const funcControlsTemplate = `
'<span class="pointer fa fa-arrow-left"></span>' + <div class="tight-form-func-controls">
'<span class="pointer fa fa-question-circle"></span>' + <span class="pointer fa fa-arrow-left"></span>
'<span class="pointer fa fa-remove" ></span>' + <span class="pointer fa fa-question-circle"></span>
'<span class="pointer fa fa-arrow-right"></span>' + <span class="pointer fa fa-remove" ></span>
'</div>'; <span class="pointer fa fa-arrow-right"></span>
</div>`;
return { return {
restrict: 'A', restrict: 'A',
...@@ -281,13 +282,11 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) { ...@@ -281,13 +282,11 @@ export function graphiteFuncEditor($compile, templateSrv, popoverSrv) {
element: e.target, element: e.target,
position: 'bottom left', position: 'bottom left',
classNames: 'drop-popover drop-function-def', classNames: 'drop-popover drop-function-def',
template: template: `
'<div style="overflow:auto;max-height:30rem;">' + <div style="overflow:auto;max-height:30rem;">
'<h4>' + <h4> ${funcDef.name} </h4>
funcDef.name + ${rst2html(funcDef.description)}
'</h4>' + </div>`,
rst2html(funcDef.description) +
'</div>',
openOn: 'click', openOn: 'click',
}); });
} else { } else {
......
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