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
dc3cd430
Commit
dc3cd430
authored
Aug 15, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved binding expression in panels to directive and watchGroup
parent
98486003
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
src/app/controllers/grafanaCtrl.js
+4
-1
src/app/directives/grafanaPanel.js
+8
-0
src/app/panels/graph/module.html
+1
-2
src/app/panels/text/module.html
+1
-1
No files found.
src/app/controllers/grafanaCtrl.js
View file @
dc3cd430
...
@@ -95,9 +95,12 @@ function (angular, config, _, $) {
...
@@ -95,9 +95,12 @@ function (angular, config, _, $) {
var
timeTaken
=
$rootScope
.
performance
.
allPanelsInitialized
-
$rootScope
.
performance
.
dashboardLoadStart
;
var
timeTaken
=
$rootScope
.
performance
.
allPanelsInitialized
-
$rootScope
.
performance
.
dashboardLoadStart
;
console
.
log
(
"Dashboard::Performance - All panels initialized in "
+
timeTaken
+
" ms"
);
console
.
log
(
"Dashboard::Performance - All panels initialized in "
+
timeTaken
+
" ms"
);
// measure digest performance
var
rootDigestStart
=
window
.
performance
.
now
();
var
rootDigestStart
=
window
.
performance
.
now
();
for
(
var
i
=
0
;
i
<
30
;
i
++
)
{
$rootScope
.
$apply
();
$rootScope
.
$apply
();
console
.
log
(
"Dashboard::Performance Root Digest "
+
(
window
.
performance
.
now
()
-
rootDigestStart
));
}
console
.
log
(
"Dashboard::Performance Root Digest "
+
((
window
.
performance
.
now
()
-
rootDigestStart
)
/
30
));
},
3000
);
},
3000
);
...
...
src/app/directives/grafanaPanel.js
View file @
dc3cd430
...
@@ -69,6 +69,14 @@ function (angular, $) {
...
@@ -69,6 +69,14 @@ function (angular, $) {
/* jshint indent:false */
/* jshint indent:false */
$compile
(
elem
.
contents
())(
newScope
);
$compile
(
elem
.
contents
())(
newScope
);
elem
.
removeClass
(
"ng-cloak"
);
elem
.
removeClass
(
"ng-cloak"
);
var
panelCtrlElem
=
$
(
elem
.
children
()[
0
]);
var
panelCtrlScope
=
panelCtrlElem
.
data
().
$scope
;
panelCtrlScope
.
$watchGroup
([
'fullscreen'
,
'panel.height'
,
'row.height'
],
function
()
{
panelCtrlElem
.
css
({
minHeight
:
panelCtrlScope
.
panel
.
height
||
panelCtrlScope
.
row
.
height
});
panelCtrlElem
.
toggleClass
(
'panel-fullscreen'
,
panelCtrlScope
.
fullscreen
?
true
:
false
);
});
}
}
newScope
.
$on
(
'$destroy'
,
function
()
{
newScope
.
$on
(
'$destroy'
,
function
()
{
...
...
src/app/panels/graph/module.html
View file @
dc3cd430
<div
ng-controller=
'GraphCtrl'
<div
ng-controller=
'GraphCtrl'
style=
"min-height:{{panel.height || row.height}}"
>
ng-class=
"{'panel-fullscreen': fullscreen}"
>
<div
class=
"graph-wrapper"
ng-class=
"{'graph-legend-rightside': panel.legend.rightSide}"
>
<div
class=
"graph-wrapper"
ng-class=
"{'graph-legend-rightside': panel.legend.rightSide}"
>
<div
class=
"graph-canvas-wrapper"
>
<div
class=
"graph-canvas-wrapper"
>
...
...
src/app/panels/text/module.html
View file @
dc3cd430
<div
ng-controller=
'text'
style=
"min-height:{{panel.height || row.height}}"
>
<div
ng-controller=
'text'
>
<p
ng-bind-html=
"content"
>
<p
ng-bind-html=
"content"
>
</p>
</p>
</div>
</div>
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