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
c7e7a0cd
Commit
c7e7a0cd
authored
May 05, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(singlestat): rerender singlestat and reevaluate thresholds on render, fixes #4920
parent
70f71770
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
public/app/plugins/panel/singlestat/module.ts
+7
-6
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
c7e7a0cd
...
...
@@ -91,11 +91,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
var
data
:
any
=
{};
this
.
setValues
(
data
);
data
.
thresholds
=
this
.
panel
.
thresholds
.
split
(
','
).
map
(
function
(
strVale
)
{
return
Number
(
strVale
.
trim
());
});
data
.
colorMap
=
this
.
panel
.
colors
;
this
.
data
=
data
;
this
.
render
();
}
...
...
@@ -435,8 +430,14 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
render
()
{
if
(
!
ctrl
.
data
)
{
return
;
}
ctrl
.
setValues
(
ctrl
.
data
);
data
=
ctrl
.
data
;
// get thresholds
data
.
thresholds
=
panel
.
thresholds
.
split
(
','
).
map
(
function
(
strVale
)
{
return
Number
(
strVale
.
trim
());
});
data
.
colorMap
=
panel
.
colors
;
setElementHeight
();
var
body
=
panel
.
gauge
.
show
?
''
:
getBigValueHtml
();
...
...
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