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
7ae81a21
Commit
7ae81a21
authored
Jan 09, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(plugins): annotations view work again for elasticsearch
parent
cf98a16d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
public/app/features/annotations/partials/editor.html
+0
-0
public/app/features/panel/panel_directive.js
+41
-2
No files found.
public/app/features/annotations/partials/editor.html
View file @
7ae81a21
public/app/features/panel/panel_directive.js
View file @
7ae81a21
...
...
@@ -56,8 +56,8 @@ function (angular, $, config) {
return
;
}
System
.
import
(
scope
.
dsMeta
.
module
).
then
(
function
(
module
)
{
console
.
log
(
'datasourceCustomSettingsView'
,
module
);
System
.
import
(
scope
.
dsMeta
.
module
).
then
(
function
()
{
elem
.
empty
(
);
var
panelEl
=
angular
.
element
(
document
.
createElement
(
'datasource-custom-settings-view-'
+
scope
.
dsMeta
.
id
));
elem
.
append
(
panelEl
);
$compile
(
panelEl
)(
scope
);
...
...
@@ -70,6 +70,45 @@ function (angular, $, config) {
};
});
module
.
service
(
'dynamicDirectiveSrv'
,
function
(
$compile
,
$parse
,
datasourceSrv
)
{
var
self
=
this
;
this
.
addDirective
=
function
(
options
,
type
,
editorScope
)
{
var
panelEl
=
angular
.
element
(
document
.
createElement
(
options
.
name
+
'-'
+
type
));
options
.
parentElem
.
append
(
panelEl
);
$compile
(
panelEl
)(
editorScope
);
};
this
.
define
=
function
(
options
)
{
var
editorScope
;
options
.
scope
.
$watch
(
options
.
datasourceProperty
,
function
(
newVal
)
{
if
(
editorScope
)
{
editorScope
.
$destroy
();
options
.
parentElem
.
empty
();
}
editorScope
=
options
.
scope
.
$new
();
datasourceSrv
.
get
(
newVal
).
then
(
function
(
ds
)
{
self
.
addDirective
(
options
,
ds
.
meta
.
id
,
editorScope
);
});
});
};
});
module
.
directive
(
'datasourceEditorView'
,
function
(
dynamicDirectiveSrv
)
{
return
{
restrict
:
'E'
,
link
:
function
(
scope
,
elem
,
attrs
)
{
dynamicDirectiveSrv
.
define
({
datasourceProperty
:
attrs
.
datasource
,
name
:
attrs
.
name
,
scope
:
scope
,
parentElem
:
elem
,
});
}
};
});
module
.
directive
(
'queryEditorLoader'
,
function
(
$compile
,
$parse
,
datasourceSrv
)
{
return
{
restrict
:
'E'
,
...
...
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