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

Function chartLegend

web/js/app.js:309–311  ·  view source on GitHub ↗
(series)

Source from the content-addressed store, hash-verified

307 return [s.ping_10010, s.ping_189, s.ping_10086].map(p => `${clamp(num(p), 0, 100).toFixed(0)}%`).join('|');
308}
309function chartLegend(series){
310 return `<div class="chart-legend">${series.map(item => `<span><i style="background:${esc(item.color)}"></i>${esc(item.label)}</span>`).join('')}</div>`;
311}
312function buckets(s){
313 return `<div class="buckets" title="联通 / 电信 / 移动">${[s.ping_10010, s.ping_189, s.ping_10086].map(p => {
314 const v = clamp(num(p), 0, 100);

Callers 1

refreshDetailFunction · 0.85

Calls 1

escFunction · 0.85

Tested by

no test coverage detected