Permalink
Browse files

fnordmetric-ui: better values_in_fetch_next

  • Loading branch information...
1 parent eda9bd5 commit 785a316dc939f30fb2a636c8e0e9d6a61f4809ee @paulasmuth committed Mar 8, 2013
Showing with 12 additions and 6 deletions.
  1. +6 −3 fnordmetric-ui/fnordmetric-ui.js
  2. +6 −3 fnordmetric-ui/js/fnordmetric.js
View
9 fnordmetric-ui/fnordmetric-ui.js
@@ -9518,9 +9518,12 @@ var FnordMetric = (function(pre){
if (enterprise) {
var all_resp = {};
- function values_in_fetch_next() {
+ function values_in_fetch_next(gauges) {
var this_resp = gauges.shift();
+ if (typeof this_resp == 'undefined')
+ return;
+
execute(
"VALUESIN " + this_resp + " " + since + " " + until,
function(resp) {
@@ -9539,12 +9542,12 @@ var FnordMetric = (function(pre){
if (gauges.length == 0)
callback.apply(FnordMetric.util.zeroFill(all_resp));
else
- values_in_fetch_next();
+ values_in_fetch_next(gauges);
}
);
}
- values_in_fetch_next();
+ values_in_fetch_next(gauges);
}
else {
View
9 fnordmetric-ui/js/fnordmetric.js
@@ -135,9 +135,12 @@ var FnordMetric = (function(pre){
if (enterprise) {
var all_resp = {};
- function values_in_fetch_next() {
+ function values_in_fetch_next(gauges) {
var this_resp = gauges.shift();
+ if (typeof this_resp == 'undefined')
+ return;
+
execute(
"VALUESIN " + this_resp + " " + since + " " + until,
function(resp) {
@@ -156,12 +159,12 @@ var FnordMetric = (function(pre){
if (gauges.length == 0)
callback.apply(FnordMetric.util.zeroFill(all_resp));
else
- values_in_fetch_next();
+ values_in_fetch_next(gauges);
}
);
}
- values_in_fetch_next();
+ values_in_fetch_next(gauges);
}
else {

0 comments on commit 785a316

Please sign in to comment.