Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fnordmetric-ui: better values_in_fetch_next

  • Loading branch information...
commit 785a316dc939f30fb2a636c8e0e9d6a61f4809ee 1 parent eda9bd5
@paulasmuth authored
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 {
Please sign in to comment.
Something went wrong with that request. Please try again.