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

Function protoPill

web/js/app.js:259–263  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

257}
258
259function protoPill(s){
260 const m = metrics(s);
261 const proto = m.online ? (s.online4 && s.online6 ? '双栈' : (s.online4 ? 'IPv4' : 'IPv6')) : '离线';
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;

Callers 5

renderServersFunction · 0.85
renderServersCardsFunction · 0.85
renderMonitorsFunction · 0.85
renderMonitorsCardsFunction · 0.85
refreshDetailFunction · 0.85

Calls 1

metricsFunction · 0.85

Tested by

no test coverage detected