From 841ddd42de66e1098c9baeb055e435e64d61a6a1 Mon Sep 17 00:00:00 2001 From: Sushant Bhadauria Date: Mon, 1 Jun 2026 22:39:54 +0530 Subject: [PATCH 1/2] dashboard: add adlist filter dropdown to Top Blocked Domains Allow users to filter the Top Blocked Domains table by subscription list (adlist) directly from the dashboard. - index.lp: add a + + +
diff --git a/scripts/js/index.js b/scripts/js/index.js index 84b61b34b4..a3bbc07b90 100644 --- a/scripts/js/index.js +++ b/scripts/js/index.js @@ -358,6 +358,68 @@ function updateTopClientsTable(blocked) { }); } +// Populate the subscription-list dropdown on the "Top Blocked Domains" card. +// Only enabled blocklists are shown; allowlists are excluded. +function populateBlockedListFilter() { + const select = $("#ad-frequency-list-filter"); + // Preserve any previously selected value + const previousVal = select.val(); + + $.getJSON(document.body.dataset.apiurl + "/lists", data => { + // Remove all options except the first "All lists" placeholder + select.find("option:not(:first)").remove(); + + if (!data.lists) return; + + data.lists.forEach(list => { + if (list.type === "block" && list.enabled) { + const label = + list.address.length > 50 ? list.address.substring(0, 47) + "..." : list.address; + select.append($("