MCPcopy Create free account
hub / github.com/cppla/ServerStatus / trafficCaps

Function trafficCaps

web/js/app.js:264–268  ·  view source on GitHub ↗
(s, small)

Source from the content-addressed store, hash-verified

262 return `<span class="pill ${m.online ? 'on' : 'off'}">${proto}</span>`;
263}
264function trafficCaps(s, small){
265 const m = metrics(s);
266 const heavy = m.traffic >= 1000 * 1000 * 1000 * 1000;
267 return `<span class="caps-traffic duo ${heavy ? 'heavy' : 'normal'}${small ? ' sm' : ''}" title="本月下行 | 上行"><span class="half in">${humanMinMBFromB(m.monthIn)}</span><span class="half out">${humanMinMBFromB(m.monthOut)}</span></span>`;
268}
269function gaugeHTML(type, value){
270 const pct = clamp(num(value), 0, 100);
271 const thresholds = {

Callers 3

renderServersFunction · 0.85
renderServersCardsFunction · 0.85
refreshDetailFunction · 0.85

Calls 2

metricsFunction · 0.85
humanMinMBFromBFunction · 0.85

Tested by

no test coverage detected