mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
changed var to const, changed to string interpolation
This commit is contained in:
@@ -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 =
|
const funcControlsTemplate = `
|
||||||
'<div class="tight-form-func-controls">' +
|
<div class="tight-form-func-controls">
|
||||||
'<span class="pointer fa fa-arrow-left"></span>' +
|
<span class="pointer fa fa-arrow-left"></span>
|
||||||
'<span class="pointer fa fa-question-circle"></span>' +
|
<span class="pointer fa fa-question-circle"></span>
|
||||||
'<span class="pointer fa fa-remove" ></span>' +
|
<span class="pointer fa fa-remove" ></span>
|
||||||
'<span class="pointer fa fa-arrow-right"></span>' +
|
<span class="pointer fa fa-arrow-right"></span>
|
||||||
'</div>';
|
</div>`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user