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
f3090d8c
Commit
f3090d8c
authored
Nov 01, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dashboard): fixed issue with resizing panel, #6442
parent
18056e53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
public/app/features/panel/panel_directive.ts
+15
-7
No files found.
public/app/features/panel/panel_directive.ts
View file @
f3090d8c
...
@@ -56,7 +56,7 @@ var panelTemplate = `
...
@@ -56,7 +56,7 @@ var panelTemplate = `
</div>
</div>
`
;
`
;
module
.
directive
(
'grafanaPanel'
,
function
()
{
module
.
directive
(
'grafanaPanel'
,
function
(
$rootScope
)
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
template
:
panelTemplate
,
template
:
panelTemplate
,
...
@@ -72,8 +72,14 @@ module.directive('grafanaPanel', function() {
...
@@ -72,8 +72,14 @@ module.directive('grafanaPanel', function() {
var
lastHasAlertRule
;
var
lastHasAlertRule
;
var
lastAlertState
;
var
lastAlertState
;
var
hasAlertRule
;
var
hasAlertRule
;
var
lastHeight
=
0
;
ctrl
.
events
.
on
(
'render'
,
()
=>
{
ctrl
.
events
.
on
(
'render'
,
()
=>
{
if
(
lastHeight
!==
ctrl
.
containerHeight
)
{
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
lastHeight
=
ctrl
.
containerHeight
;
}
if
(
transparentLastState
!==
ctrl
.
panel
.
transparent
)
{
if
(
transparentLastState
!==
ctrl
.
panel
.
transparent
)
{
panelContainer
.
toggleClass
(
'panel-transparent'
,
ctrl
.
panel
.
transparent
===
true
);
panelContainer
.
toggleClass
(
'panel-transparent'
,
ctrl
.
panel
.
transparent
===
true
);
transparentLastState
=
ctrl
.
panel
.
transparent
;
transparentLastState
=
ctrl
.
panel
.
transparent
;
...
@@ -102,10 +108,13 @@ module.directive('grafanaPanel', function() {
...
@@ -102,10 +108,13 @@ module.directive('grafanaPanel', function() {
}
}
});
});
scope
.
$watchGroup
([
'ctrl.fullscreen'
,
'ctrl.containerHeight'
],
function
()
{
var
lastFullscreen
;
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
$rootScope
.
onAppEvent
(
'panel-change-view'
,
function
(
evt
,
payload
)
{
elem
.
toggleClass
(
'panel-fullscreen'
,
ctrl
.
fullscreen
?
true
:
false
);
if
(
lastFullscreen
!==
ctrl
.
fullscreen
)
{
});
elem
.
toggleClass
(
'panel-fullscreen'
,
ctrl
.
fullscreen
?
true
:
false
);
lastFullscreen
=
ctrl
.
fullscreen
;
}
},
scope
);
}
}
};
};
});
});
...
@@ -171,11 +180,10 @@ module.directive('panelResizer', function($rootScope) {
...
@@ -171,11 +180,10 @@ module.directive('panelResizer', function($rootScope) {
lastPanel
.
span
=
Math
.
round
(
lastPanel
.
span
);
lastPanel
.
span
=
Math
.
round
(
lastPanel
.
span
);
}
}
ctrl
.
row
.
panelSpanChanged
();
// first digest to propagate panel width change
// first digest to propagate panel width change
// then render
// then render
$rootScope
.
$apply
(
function
()
{
$rootScope
.
$apply
(
function
()
{
ctrl
.
row
.
panelSpanChanged
();
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$rootScope
.
$broadcast
(
'render'
);
$rootScope
.
$broadcast
(
'render'
);
});
});
...
...
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