Commit 2a50bc35 by Patrick O'Carroll

converted file to ts

parent 40332832
define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angular, _, $, rst2html, Drop) { import angular from 'angular';
'use strict'; import _ from 'lodash';
import $ from 'jquery';
import rst2html from 'rst2html';
import Drop from 'tether-drop';
angular.module('grafana.directives').directive('graphiteAddFunc', function($compile) { export function graphiteAddFunc($compile) {
var inputTemplate = var inputTemplate =
'<input type="text"' + ' class="gf-form-input"' + ' spellcheck="false" style="display:none"></input>'; '<input type="text"' + ' class="gf-form-input"' + ' spellcheck="false" style="display:none"></input>';
...@@ -40,7 +43,7 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu ...@@ -40,7 +43,7 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
}); });
if (!funcDef) { if (!funcDef) {
return; return '';
} }
} }
...@@ -124,9 +127,11 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu ...@@ -124,9 +127,11 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
$scope.$on('$destroy', cleanUpDrop); $scope.$on('$destroy', cleanUpDrop);
}, },
}; };
}); }
function createFunctionDropDownMenu(funcDefs) { angular.module('grafana.directives').directive('graphiteAddFunc', graphiteAddFunc);
function createFunctionDropDownMenu(funcDefs) {
var categories = {}; var categories = {};
_.forEach(funcDefs, function(funcDef) { _.forEach(funcDefs, function(funcDef) {
...@@ -151,5 +156,4 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu ...@@ -151,5 +156,4 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
}), }),
'text' 'text'
); );
} }
});
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