diff --git a/src/web/components/httprp.html b/src/web/components/httprp.html
index cdb9873..0e2ce06 100644
--- a/src/web/components/httprp.html
+++ b/src/web/components/httprp.html
@@ -12,6 +12,19 @@
min-width: 200px;
}
+
+
+
+
+
@@ -144,12 +157,42 @@
`);
});
+ populateTagFilterDropdown(data);
}
resolveAccessRuleNameOnHostRPlist();
});
}
+ // Function to populate the tag filter dropdown
+ function populateTagFilterDropdown(data) {
+ let tags = new Set();
+ data.forEach(subd => {
+ subd.Tags.forEach(tag => tags.add(tag));
+ });
+ let dropdownMenu = $("#tagFilterDropdown .menu");
+ dropdownMenu.html('All
');
+ tags.forEach(tag => {
+ dropdownMenu.append(`${tag}
`);
+ });
+ $('#tagFilterDropdown').dropdown();
+ }
+
+ // Function to filter the proxy list
+ function filterProxyList() {
+ let searchInput = $("#searchInput").val().toLowerCase();
+ let selectedTag = $("#tagFilterDropdown").dropdown('get value');
+ $("#httpProxyList tr").each(function() {
+ let host = $(this).find("td[data-label='']").text().toLowerCase();
+ let tags = $(this).find("td[data-label='tags']").text().toLowerCase();
+ if ((host.includes(searchInput) || searchInput === "") && (tags.includes(selectedTag) || selectedTag === "")) {
+ $(this).show();
+ } else {
+ $(this).hide();
+ }
+ });
+ }
+
//Perform realtime alias update without refreshing the whole page
function updateAliasListForEndpoint(endpointName, newAliasDomainList){
let targetEle = $(`.aliasDomains[eptuuid='${endpointName}']`);
@@ -622,4 +665,9 @@
}));
showSideWrapper("snippet/tagEditor.html?t=" + Date.now() + "#" + payload);
}
+
+ // Initialize the proxy list on page load
+ $(document).ready(function() {
+ listProxyEndpoints();
+ });
\ No newline at end of file