mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 14:09:41 -08:00
Keep total counter outside out loop.
This was causing only the last expression to be graphed.
This commit is contained in:
parent
01f2bc4ee7
commit
2b07cd3875
|
@ -395,10 +395,10 @@ PromConsole.Graph.prototype._render = function(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the data into the right format.
|
// Get the data into the right format.
|
||||||
|
var seriesLen = 0;
|
||||||
for (var e = 0; e < data.length; e++) {
|
for (var e = 0; e < data.length; e++) {
|
||||||
var len = 0;
|
|
||||||
for (var i = 0; i < data[e].Value.length; i++) {
|
for (var i = 0; i < data[e].Value.length; i++) {
|
||||||
series[len++] = {
|
series[seriesLen++] = {
|
||||||
data: data[e].Value[i].Values.map(function(s) {return {x: s.Timestamp, y: parseFloat(s.Value)} }),
|
data: data[e].Value[i].Values.map(function(s) {return {x: s.Timestamp, y: parseFloat(s.Value)} }),
|
||||||
color: palette.color(),
|
color: palette.color(),
|
||||||
name: nameFunc(data[e].Value[i].Metric),
|
name: nameFunc(data[e].Value[i].Metric),
|
||||||
|
|
Loading…
Reference in a new issue