diff --git a/web/explorer/src/assets/main.css b/web/explorer/src/assets/main.css index a9492c03..1ec66bb3 100644 --- a/web/explorer/src/assets/main.css +++ b/web/explorer/src/assets/main.css @@ -22,6 +22,13 @@ a:hover { cursor: default; } +/* mute and minimize match count text labels, e.g. "(2 matches)" */ +.match-count { + font-size: 0.85em; + color: #6c757d; + margin-left: 0.2rem; +} + /* remove the border from rows other than rule names */ .p-treetable-tbody > tr:not(:is([aria-level="1"])) > td { border: none !important; diff --git a/web/explorer/src/components/FunctionCapabilities.vue b/web/explorer/src/components/FunctionCapabilities.vue index bfa170b6..9f5639e3 100644 --- a/web/explorer/src/components/FunctionCapabilities.vue +++ b/web/explorer/src/components/FunctionCapabilities.vue @@ -29,8 +29,8 @@ @@ -104,9 +104,10 @@ onMounted(() => { const tableData = computed(() => { const data = []; for (const fcaps of functionCapabilities.value) { - const capabilities = fcaps.capabilities; - for (const capability of capabilities) { - if (capability.lib && !props.showLibraryRules) continue; + // when props.showLibraryRules is true, all capabilities are included. + // when props.showLibraryRules is false, only non-library capabilities (where cap.lib is false) are included. + const capabilities = fcaps.capabilities.filter((cap) => props.showLibraryRules || !cap.lib); + capabilities.forEach((capability) => { data.push({ address: fcaps.address, matchCount: capabilities.length, @@ -114,7 +115,7 @@ const tableData = computed(() => { namespace: capability.namespace, lib: capability.lib }); - } + }); } return data; }); diff --git a/web/explorer/src/components/ProcessCapabilities.vue b/web/explorer/src/components/ProcessCapabilities.vue index 63e24597..cd0fa798 100644 --- a/web/explorer/src/components/ProcessCapabilities.vue +++ b/web/explorer/src/components/ProcessCapabilities.vue @@ -23,7 +23,7 @@ {{ slotProps.node.data.processname }} - PID: {{ slotProps.node.data.pid }} - + ({{ slotProps.node.data.uniqueMatchCount }} unique {{ slotProps.node.data.uniqueMatchCount > 1 ? "matches" : "match" }}) @@ -53,7 +53,7 @@ >
• {{ rule.name }} - ({{ rule.matchCount }} {{ rule.scope }} {{ rule.matchCount > 1 ? "matches" : "match" }}) diff --git a/web/explorer/src/components/columns/RuleColumn.vue b/web/explorer/src/components/columns/RuleColumn.vue index d6a4b603..1baab06b 100644 --- a/web/explorer/src/components/columns/RuleColumn.vue +++ b/web/explorer/src/components/columns/RuleColumn.vue @@ -4,7 +4,9 @@