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
0a97a243
Commit
0a97a243
authored
Oct 16, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StatsPanel: more progress
parent
5c80f03e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/app/panels/stats/module.js
+11
-3
No files found.
src/app/panels/stats/module.js
View file @
0a97a243
...
...
@@ -52,7 +52,7 @@ function (angular, app, _, TimeSeries, kbn) {
};
$scope
.
formatValue
=
function
(
value
)
{
return
kbn
.
valueFormats
.
bytes
(
value
,
0
,
-
7
);
return
kbn
.
valueFormats
[
$scope
.
panel
.
format
]
(
value
,
0
,
-
7
);
};
$scope
.
updateTimeRange
=
function
()
{
...
...
@@ -105,26 +105,34 @@ function (angular, app, _, TimeSeries, kbn) {
});
series
.
points
=
series
.
getFlotPairs
(
'connected'
);
series
.
updateLegendValues
(
kbn
.
valueFormats
.
bytes
,
2
,
-
7
);
return
series
;
};
$scope
.
render
=
function
()
{
var
i
,
series
;
var
data
=
{
series
:
$scope
.
series
,
stats
:
[]
};
for
(
i
=
0
;
i
<
data
.
series
.
length
;
i
++
)
{
series
=
data
.
series
[
i
];
series
.
updateLegendValues
(
kbn
.
valueFormats
[
$scope
.
panel
.
format
],
2
,
-
7
);
}
var
main
=
data
.
series
[
0
];
if
(
$scope
.
panel
.
avg
)
{
data
.
stats
.
push
({
value
:
$scope
.
formatValue
(
main
.
stats
.
avg
),
func
:
'avg'
});
}
if
(
$scope
.
panel
.
total
)
{
data
.
stats
.
push
({
value
:
$scope
.
formatValue
(
main
.
stats
.
total
),
func
:
'total'
});
}
if
(
$scope
.
panel
.
current
)
{
data
.
stats
.
push
({
value
:
$scope
.
formatValue
(
main
.
stats
.
current
),
func
:
'current'
});
}
$scope
.
data
=
data
;
$scope
.
$emit
(
'render'
);
...
...
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