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
523cf21b
Commit
523cf21b
authored
Dec 05, 2015
by
woodsaj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tune pluginConfig directive
parent
3c139016
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
public/app/features/org/partials/pluginEdit.html
+1
-1
public/app/features/org/plugin_directive.js
+13
-9
No files found.
public/app/features/org/partials/pluginEdit.html
View file @
523cf21b
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
</div>
</div>
<br>
<br>
<plugin-config-loader></plugin-config-loader>
<plugin-config-loader
plugin=
"current"
></plugin-config-loader>
<div
class=
"pull-right"
style=
"margin-top: 35px"
>
<div
class=
"pull-right"
style=
"margin-top: 35px"
>
<button
type=
"submit"
class=
"btn btn-success"
ng-click=
"update()"
>
Save
</button>
<button
type=
"submit"
class=
"btn btn-success"
ng-click=
"update()"
>
Save
</button>
<a
class=
"btn btn-inverse"
href=
"plugins"
>
Cancel
</a>
<a
class=
"btn btn-inverse"
href=
"plugins"
>
Cancel
</a>
...
...
public/app/features/org/plugin_directive.js
View file @
523cf21b
...
@@ -11,13 +11,18 @@ function (angular) {
...
@@ -11,13 +11,18 @@ function (angular) {
restrict
:
'E'
,
restrict
:
'E'
,
link
:
function
(
scope
,
elem
)
{
link
:
function
(
scope
,
elem
)
{
var
directive
=
'grafana-plugin-core'
;
var
directive
=
'grafana-plugin-core'
;
if
(
scope
.
current
.
module
)
{
//wait for the parent scope to be applied.
directive
=
'grafana-plugin-'
+
scope
.
current
.
type
;
scope
.
$watch
(
"current"
,
function
(
newVal
)
{
}
if
(
newVal
)
{
scope
.
require
([
scope
.
current
.
module
],
function
()
{
if
(
newVal
.
module
)
{
var
panelEl
=
angular
.
element
(
document
.
createElement
(
directive
));
directive
=
'grafana-plugin-'
+
newVal
.
type
;
elem
.
append
(
panelEl
);
}
$compile
(
panelEl
)(
scope
);
scope
.
require
([
newVal
.
module
],
function
()
{
var
panelEl
=
angular
.
element
(
document
.
createElement
(
directive
));
elem
.
append
(
panelEl
);
$compile
(
panelEl
)(
scope
);
});
}
});
});
}
}
};
};
...
@@ -28,8 +33,7 @@ function (angular) {
...
@@ -28,8 +33,7 @@ function (angular) {
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'app/features/org/partials/pluginConfigCore.html'
,
templateUrl
:
'app/features/org/partials/pluginConfigCore.html'
,
transclude
:
true
,
transclude
:
true
,
link
:
function
(
scope
,
elem
)
{
link
:
function
(
scope
)
{
console
.
log
(
"grafana plugin core"
,
scope
,
elem
);
scope
.
update
=
function
()
{
scope
.
update
=
function
()
{
//Perform custom save events to the plugins own backend if needed.
//Perform custom save events to the plugins own backend if needed.
...
...
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