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
88d991ef
Commit
88d991ef
authored
Aug 15, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another angular binding/watcher optimization
parent
dc382a6d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
src/app/controllers/row.js
+13
-0
src/app/panels/graph/module.html
+1
-2
src/app/panels/graph/module.js
+1
-1
src/app/partials/dashboard.html
+1
-1
No files found.
src/app/controllers/row.js
View file @
88d991ef
...
...
@@ -124,4 +124,17 @@ function (angular, app, _) {
};
});
module
.
directive
(
'panelDropZone'
,
function
()
{
return
function
(
scope
,
element
)
{
scope
.
$watch
(
'dashboard.$$panelDragging'
,
function
(
newVal
)
{
if
(
newVal
&&
scope
.
dashboard
.
rowSpan
(
scope
.
row
)
<
10
)
{
element
.
show
();
}
else
{
element
.
hide
();
}
});
};
});
});
src/app/panels/graph/module.html
View file @
88d991ef
<div
ng-controller=
'GraphCtrl'
>
<div
ng-controller=
'GraphCtrl'
>
<div
class=
"graph-wrapper"
ng-class=
"{'graph-legend-rightside': panel.legend.rightSide}"
>
<div
class=
"graph-canvas-wrapper"
>
...
...
src/app/panels/graph/module.js
View file @
88d991ef
...
...
@@ -243,7 +243,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
var
data
=
_
.
map
(
results
.
data
,
$scope
.
seriesHandler
);
$scope
.
datapointsWarning
=
$scope
.
datapointsCount
||
!
$scope
.
datapointsOutside
;
$scope
.
datapointsWarning
=
$scope
.
datapointsCount
===
0
||
$scope
.
datapointsOutside
;
$scope
.
annotationsPromise
.
then
(
function
(
annotations
)
{
...
...
src/app/partials/dashboard.html
View file @
88d991ef
...
...
@@ -110,7 +110,7 @@
<grafana-panel
type=
"panel.type"
ng-cloak
></grafana-panel>
</div>
<div
ng-show=
"dashboard.rowSpan(row) < 10 && dashboard.$$panelDragging"
class=
"panel"
style=
"margin:5px;width:30%;background:rgba(100,100,100,0.50)"
ng-class=
"{'dragInProgress':dashboard.panelDragging}
"
ng-style=
"{height:row.height}"
data-drop=
"true"
ng-model=
"row.panels"
data-jqyoui-options
jqyoui-droppable=
"{index:row.panels.length,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver',onOut:'panelMoveOut'}"
>
<div
panel-drop-zone
class=
"panel dragInProgress"
style=
"margin:5px;width:30%;background:rgba(100,100,100,0.50)
"
ng-style=
"{height:row.height}"
data-drop=
"true"
ng-model=
"row.panels"
data-jqyoui-options
jqyoui-droppable=
"{index:row.panels.length,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver',onOut:'panelMoveOut'}"
>
</div>
<div
class=
"clearfix"
></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