lib/riemann/dash/public/subs.js in riemann-dash-0.2.9 vs lib/riemann/dash/public/subs.js in riemann-dash-0.2.10
- old
+ new
@@ -189,13 +189,18 @@
open(sub);
});
}
var notifyErrors = function() {
+ var errorString;
if (errorQueue.length == 0) {
return;
+ } else if (errorQueue.length == 1) {
+ errorString = "error";
+ } else {
+ errorString = "errors";
}
- toastr.warning(errorQueue.length + " socket errors; check the server field above.");
+ toastr.warning(errorQueue.length + " socket " + errorString + "; check the server field above.");
errorQueue.length = 0;
}
// Periodically notify of errors.
window.setInterval(notifyErrors, 100);