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
0047ce06
Commit
0047ce06
authored
May 25, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SingleStatPanel: fix for color thresholds and value to text mapping combo, Fixes #2044
parent
58f743f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
public/app/panels/singlestat/module.js
+7
-6
public/app/partials/login.html
+2
-2
No files found.
public/app/panels/singlestat/module.js
View file @
0047ce06
...
...
@@ -190,7 +190,12 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
data
.
flotpairs
=
$scope
.
series
[
0
].
flotpairs
;
}
// first check value to text mappings
var
decimalInfo
=
$scope
.
getDecimalsForValue
(
data
.
value
);
var
formatFunc
=
kbn
.
valueFormats
[
$scope
.
panel
.
format
];
data
.
valueFormated
=
formatFunc
(
data
.
value
,
decimalInfo
.
decimals
,
decimalInfo
.
scaledDecimals
);
data
.
valueRounded
=
kbn
.
roundValue
(
data
.
value
,
decimalInfo
.
decimals
);
// check value to text mappings
for
(
var
i
=
0
;
i
<
$scope
.
panel
.
valueMaps
.
length
;
i
++
)
{
var
map
=
$scope
.
panel
.
valueMaps
[
i
];
// special null case
...
...
@@ -201,6 +206,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
}
continue
;
}
// value/number to text mapping
var
value
=
parseFloat
(
map
.
value
);
if
(
value
===
data
.
value
)
{
...
...
@@ -212,11 +218,6 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
if
(
data
.
value
===
null
||
data
.
value
===
void
0
)
{
data
.
valueFormated
=
"no value"
;
}
var
decimalInfo
=
$scope
.
getDecimalsForValue
(
data
.
value
);
var
formatFunc
=
kbn
.
valueFormats
[
$scope
.
panel
.
format
];
data
.
valueFormated
=
formatFunc
(
data
.
value
,
decimalInfo
.
decimals
,
decimalInfo
.
scaledDecimals
);
data
.
valueRounded
=
kbn
.
roundValue
(
data
.
value
,
decimalInfo
.
decimals
);
};
$scope
.
removeValueMap
=
function
(
map
)
{
...
...
public/app/partials/login.html
View file @
0047ce06
...
...
@@ -19,7 +19,7 @@
<form
name=
"loginForm"
class=
"login-form"
>
<div
class=
"tight-form"
ng-if=
"loginMode"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width:
80
px"
>
<li
class=
"tight-form-item"
style=
"width:
78
px"
>
<strong>
User
</strong>
</li>
<li>
...
...
@@ -30,7 +30,7 @@
</div>
<div
class=
"tight-form"
ng-if=
"loginMode"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width:
80
px"
>
<li
class=
"tight-form-item"
style=
"width:
78
px"
>
<strong>
Password
</strong>
</li>
<li>
...
...
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