From: Remi Gacogne Date: Fri, 15 Mar 2019 14:17:39 +0000 (+0100) Subject: dnsdist: Gracefully handle a null latency in the webserver's JS X-Git-Tag: dnsdist-1.4.0-alpha1~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd8b7bd0f280ed37a7043ca6d4c5ca5f48d34a3d;p=thirdparty%2Fpdns.git dnsdist: Gracefully handle a null latency in the webserver's JS --- diff --git a/pdns/dnsdistdist/html/local.js b/pdns/dnsdistdist/html/local.js index 641a2797b4..49304f125c 100644 --- a/pdns/dnsdistdist/html/local.js +++ b/pdns/dnsdistdist/html/local.js @@ -194,7 +194,8 @@ $(document).ready(function() { var bouw=''; $.each(data["servers"], function(a,b) { bouw = bouw + (""); - bouw = bouw + (""); + var latency = (b["latency"] === null) ? 0.0 : b["latency"]; + bouw = bouw + (""); bouw = bouw + (""); }); bouw = bouw + "
#NameAddressStatusLatencyQueriesDropsQPSOutWeightOrderPools
"+b["id"]+""+b["name"]+""+b["address"]+""+b["state"]+""+(b["latency"]).toFixed(2)+""+b["queries"]+""+b["reuseds"]+""+(b["qps"]).toFixed(2)+""+b["outstanding"]+""+latency.toFixed(2)+""+b["queries"]+""+b["reuseds"]+""+(b["qps"]).toFixed(2)+""+b["outstanding"]+""+b["weight"]+""+b["order"]+""+b["pools"]+"
";