Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
de396b27
Unverified
Commit
de396b27
authored
Mar 20, 2018
by
Marcus Efraimsson
Committed by
GitHub
Mar 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11309 from grafana/add_graphite_func_js_to_ts
convert add_graphite_func.js to typescript
parents
4dcf1b72
3bdd0062
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
public/app/plugins/datasource/graphite/add_graphite_func.ts
+15
-11
No files found.
public/app/plugins/datasource/graphite/add_graphite_func.
j
s
→
public/app/plugins/datasource/graphite/add_graphite_func.
t
s
View file @
de396b27
define
([
'angular'
,
'lodash'
,
'jquery'
,
'rst2html'
,
'tether-drop'
],
function
(
angular
,
_
,
$
,
rst2html
,
Drop
)
{
'use strict'
;
angular
.
module
(
'grafana.directives'
).
directive
(
'graphiteAddFunc'
,
function
(
$compile
)
{
var
inputTemplate
=
import
angular
from
'angular'
;
import
_
from
'lodash'
;
import
$
from
'jquery'
;
import
rst2html
from
'rst2html'
;
import
Drop
from
'tether-drop'
;
export
function
graphiteAddFunc
(
$compile
)
{
const
inputTemplate
=
'<input type="text"'
+
' class="gf-form-input"'
+
' spellcheck="false" style="display:none"></input>'
;
var
buttonTemplate
=
const
buttonTemplate
=
'<a class="gf-form-label query-part dropdown-toggle"'
+
' tabindex="1" gf-dropdown="functionMenu" data-toggle="dropdown">'
+
'<i class="fa fa-plus"></i></a>'
;
...
...
@@ -40,7 +43,7 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
});
if
(
!
funcDef
)
{
return
;
return
''
;
}
}
...
...
@@ -124,9 +127,11 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
$scope
.
$on
(
'$destroy'
,
cleanUpDrop
);
},
};
});
}
angular
.
module
(
'grafana.directives'
).
directive
(
'graphiteAddFunc'
,
graphiteAddFunc
);
function
createFunctionDropDownMenu
(
funcDefs
)
{
function
createFunctionDropDownMenu
(
funcDefs
)
{
var
categories
=
{};
_
.
forEach
(
funcDefs
,
function
(
funcDef
)
{
...
...
@@ -151,5 +156,4 @@ define(['angular', 'lodash', 'jquery', 'rst2html', 'tether-drop'], function(angu
}),
'text'
);
}
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment