feat(dashboard): hide zero-count path and transport rows
This commit is contained in:
@@ -939,7 +939,9 @@ function renderMemory(mem, stats) {
|
|||||||
|
|
||||||
function renderBarChart(containerId, defs, data, total) {
|
function renderBarChart(containerId, defs, data, total) {
|
||||||
total = total || 1;
|
total = total || 1;
|
||||||
document.getElementById(containerId).innerHTML = defs.map(d => {
|
document.getElementById(containerId).innerHTML = defs
|
||||||
|
.filter(d => (data[d.key] || 0) > 0)
|
||||||
|
.map(d => {
|
||||||
const count = data[d.key] || 0;
|
const count = data[d.key] || 0;
|
||||||
const pct = ((count / total) * 100).toFixed(1);
|
const pct = ((count / total) * 100).toFixed(1);
|
||||||
return `
|
return `
|
||||||
|
|||||||
Reference in New Issue
Block a user