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
9316bcf3
Commit
9316bcf3
authored
Apr 26, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(singlestat): enables autoupdate on change
closes #4809 closes #4812
parent
60855643
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
public/app/plugins/panel/singlestat/module.ts
+10
-1
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
9316bcf3
...
@@ -278,6 +278,14 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -278,6 +278,14 @@ class SingleStatCtrl extends MetricsPanelCtrl {
return
body
;
return
body
;
}
}
function
getValueText
()
{
var
result
=
panel
.
prefix
?
panel
.
prefix
:
''
;
result
+=
data
.
valueFormated
;
result
+=
panel
.
postfix
?
panel
.
postfix
:
''
;
return
result
;
}
function
addGauge
()
{
function
addGauge
()
{
var
plotCanvas
=
$
(
'<div></div>'
);
var
plotCanvas
=
$
(
'<div></div>'
);
var
plotCss
=
{
var
plotCss
=
{
...
@@ -332,7 +340,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -332,7 +340,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
},
},
value
:
{
value
:
{
color
:
panel
.
colorValue
?
getColorForValue
(
data
,
data
.
valueRounded
)
:
null
,
color
:
panel
.
colorValue
?
getColorForValue
(
data
,
data
.
valueRounded
)
:
null
,
formatter
:
function
()
{
return
data
.
valueFormated
;
},
formatter
:
function
()
{
return
getValueText
()
;
},
font
:
{
size
:
getGaugeFontSize
()
}
font
:
{
size
:
getGaugeFontSize
()
}
},
},
show
:
true
show
:
true
...
@@ -419,6 +427,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -419,6 +427,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
render
()
{
function
render
()
{
if
(
!
ctrl
.
data
)
{
return
;
}
if
(
!
ctrl
.
data
)
{
return
;
}
ctrl
.
setValues
(
ctrl
.
data
);
data
=
ctrl
.
data
;
data
=
ctrl
.
data
;
setElementHeight
();
setElementHeight
();
...
...
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