'.format(v.toLowerCase()):"";g="{}{}".format(aHe("th","{}{}".format(q,v)),aHe("td",[(r.requestCounter+r.overCounts.maxIntegerSize*r.overCounts.requestCounter),aPs.getValue("{}.{}".format(j,"requestCounter"),r.requestCounter),mTh(r.requestMsec)]));for(var a in r.responses){d=r.responses[a]+r.overCounts.maxIntegerSize*r.overCounts[a];u+=d;g="{}{}".format(g,aHe("td",d));if(a=="5xx"){break}}g="{}{}".format(g,aHe("td",[u,bTh(r.outBytes+r.overCounts.maxIntegerSize*r.overCounts.outBytes),bTh(r.inBytes+r.overCounts.maxIntegerSize*r.overCounts.inBytes),bTh(aPs.getValue("{}.{}".format(j,"outBytes"),r.outBytes)),bTh(aPs.getValue("{}.{}".format(j,"inBytes"),r.inBytes))]));if(h){var p=0;for(var a in r.responses){if(p++<5){continue}c=(r.responses[a]+r.overCounts.maxIntegerSize*r.overCounts[a]);t+=c;g="{}{}".format(g,aHe("td",c))}g="{}{}".format(g,aHe("td",t))}l="{}{}".format(l,aHe('tr class="{}"'.format(b),g))}return l}function templateUpstreamZone(c,i,b){var e=0;var l="";var d="";while(e5?true:false}function template(e){aPs.refresh(e.nowMsec);var d="";var f="";var h="";var g="";var c=[];var a=true;d=templateMainZone(e);a=haveCache(e);h=templateServerHeader(a);c[0]=templateServerZone(e.serverZones,"server",vtsStatusVars.ids.server,a);g=aHe("tbody",c[0]);d="{}{}".format(d,aHe('div id="{}"'.format(vtsStatusVars.ids.server),"{}{}".format(aHe("h2",vtsStatusVars.titles.server),aHe("table","{}{}".format(h,g)))));if(vtsStatusVars.ids.filter in e){f="";for(var i in e.filterZones){var b=e.filterZones[i];h=templateServerHeader(a);c[0]=templateServerZone(b,i,vtsStatusVars.ids.filter,a);g=aHe("tbody",c[0]);f="{}{}{}".format(f,aHe("h3",i),aHe("table","{}{}".format(h,g)))}d="{}{}".format(d,aHe('div id="{}"'.format(vtsStatusVars.ids.filter),"{}{}".format(aHe("h2",vtsStatusVars.titles.filter),f)))}if(vtsStatusVars.ids.upstream in e){f="";for(var i in e.upstreamZones){var b=e.upstreamZones[i];h=templateUpstreamHeader();c[0]=templateUpstreamZone(b,i,vtsStatusVars.ids.upstream);g=aHe("tbody",c[0]);f="{}{}{}".format(f,aHe("h3",i),aHe("table","{}{}".format(h,g)))}d="{}{}".format(d,aHe('div id="{}"'.format(vtsStatusVars.ids.upstream),"{}{}".format(aHe("h2",vtsStatusVars.titles.upstream),f)))}if(vtsStatusVars.ids.cache in e){h=templateCacheHeader();c[0]=templateCacheZone(e.cacheZones,"cache",vtsStatusVars.ids.cache);g=aHe("tbody",c[0]);d="{}{}".format(d,aHe('div id="{}"'.format(vtsStatusVars.ids.cache),"{}{}".format(aHe("h2",vtsStatusVars.titles.cache),aHe("table","{}{}".format(h,g)))))}return d}function vtsGetData(){var a=document.getElementById("monitor");var b=new XMLHttpRequest;b.onload=function(){if(this.status!=200){return}a.innerHTML=template(JSON.parse(this.responseText))};b.open("GET",vtsStatusURI);b.send()}function vtsSetInterval(a){clearInterval(vtsUpdate);vtsUpdate=setInterval(vtsGetData,a)}document.getElementById("jsonUri").href=vtsStatusURI;vtsGetData();vtsSetInterval(vtsUpdateInterval);