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
f00cbc0a
Commit
f00cbc0a
authored
May 20, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(panel height): fixed issue with singlestat height, fixes #4679, fixes #4894, fixes #5113
parent
ee86d247
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
public/app/features/panel/panel_ctrl.ts
+2
-1
public/app/plugins/panel/graph/graph.js
+1
-1
public/app/plugins/panel/singlestat/module.html
+0
-1
public/app/plugins/panel/singlestat/module.ts
+3
-2
public/sass/components/_panel_singlestat.scss
+0
-1
No files found.
public/app/features/panel/panel_ctrl.ts
View file @
f00cbc0a
...
...
@@ -8,6 +8,7 @@ import $ from 'jquery';
const
TITLE_HEIGHT
=
25
;
const
EMPTY_TITLE_HEIGHT
=
9
;
const
PANEL_PADDING
=
5
;
const
PANEL_BORDER
=
2
;
import
{
Emitter
}
from
'app/core/core'
;
...
...
@@ -141,7 +142,7 @@ export class PanelCtrl {
}
}
this
.
height
=
this
.
containerHeight
-
(
PANEL_PADDING
+
(
this
.
panel
.
title
?
TITLE_HEIGHT
:
EMPTY_TITLE_HEIGHT
));
this
.
height
=
this
.
containerHeight
-
(
PANEL_
BORDER
+
PANEL_
PADDING
+
(
this
.
panel
.
title
?
TITLE_HEIGHT
:
EMPTY_TITLE_HEIGHT
));
}
render
(
payload
?)
{
...
...
public/app/plugins/panel/graph/graph.js
View file @
f00cbc0a
...
...
@@ -66,7 +66,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
function
getLegendHeight
(
panelHeight
)
{
if
(
!
panel
.
legend
.
show
||
panel
.
legend
.
rightSide
)
{
return
2
;
return
0
;
}
if
(
panel
.
legend
.
alignAsTable
)
{
...
...
public/app/plugins/panel/singlestat/module.html
View file @
f00cbc0a
<div
class=
"singlestat-panel"
>
</div>
<div
class=
"clearfix"
></div>
public/app/plugins/panel/singlestat/module.ts
View file @
f00cbc0a
...
...
@@ -234,10 +234,13 @@ class SingleStatCtrl extends MetricsPanelCtrl {
var
panel
=
ctrl
.
panel
;
var
templateSrv
=
this
.
templateSrv
;
var
data
,
linkInfo
;
var
width
,
height
;
var
$panelContainer
=
elem
.
find
(
'.panel-container'
);
elem
=
elem
.
find
(
'.singlestat-panel'
);
function
setElementHeight
()
{
width
=
elem
.
width
();
height
=
elem
.
height
();
elem
.
css
(
'height'
,
ctrl
.
height
+
'px'
);
}
...
...
@@ -291,8 +294,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
}
var
plotCanvas
=
$
(
'<div></div>'
);
var
width
=
elem
.
width
();
var
height
=
elem
.
height
();
var
plotCss
=
{
top
:
'10px'
,
margin
:
'auto'
,
...
...
public/sass/components/_panel_singlestat.scss
View file @
f00cbc0a
...
...
@@ -5,7 +5,6 @@
}
.singlestat-panel-value-container
{
padding
:
20px
;
display
:
table-cell
;
vertical-align
:
middle
;
text-align
:
center
;
...
...
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