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
a5d1e9ee
Commit
a5d1e9ee
authored
Feb 07, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(singlestat): fix for singlestat background and sparklines, fixes #3955
parent
ff4dbea1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
public/app/plugins/panel/singlestat/module.ts
+9
-8
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
a5d1e9ee
...
...
@@ -241,7 +241,8 @@ class SingleStatCtrl extends MetricsPanelCtrl {
var
panel
=
ctrl
.
panel
;
var
templateSrv
=
this
.
templateSrv
;
var
data
,
linkInfo
;
var
$panelContainer
=
elem
.
parents
(
'.panel-container'
);
var
elemHeight
;
var
$panelContainer
=
elem
.
find
(
'.panel-container'
);
// change elem to singlestat panel
elem
=
elem
.
find
(
'.singlestat-panel'
);
hookupDrilldownLinkTooltip
();
...
...
@@ -253,15 +254,15 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
setElementHeight
()
{
try
{
var
height
=
scope
.
height
||
panel
.
height
||
ctrl
.
row
.
height
;
if
(
_
.
isString
(
h
eight
))
{
height
=
parseInt
(
h
eight
.
replace
(
'px'
,
''
),
10
);
elemHeight
=
ctrl
.
height
||
panel
.
height
||
ctrl
.
row
.
height
;
if
(
_
.
isString
(
elemH
eight
))
{
elemHeight
=
parseInt
(
elemH
eight
.
replace
(
'px'
,
''
),
10
);
}
h
eight
-=
5
;
// padding
h
eight
-=
panel
.
title
?
24
:
9
;
// subtract panel title bar
elemH
eight
-=
5
;
// padding
elemH
eight
-=
panel
.
title
?
24
:
9
;
// subtract panel title bar
elem
.
css
(
'height'
,
h
eight
+
'px'
);
elem
.
css
(
'height'
,
elemH
eight
+
'px'
);
return
true
;
}
catch
(
e
)
{
// IE throws errors sometimes
...
...
@@ -305,7 +306,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
addSparkline
()
{
var
width
=
elem
.
width
()
+
20
;
var
height
=
elem
.
height
()
||
100
;
var
height
=
elem
Height
;
var
plotCanvas
=
$
(
'<div></div>'
);
var
plotCss
:
any
=
{};
...
...
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