@@ -8718,6 +8718,23 @@ function toggleInactiveItems(type) {
87188718 // ignore (shouldn't happen)
87198719 }
87208720
8721+ // For servers (catalog), use loadServers function if available, otherwise reload page
8722+ if (type === "servers") {
8723+ if (typeof window.loadServers === "function") {
8724+ window.loadServers();
8725+ return;
8726+ }
8727+ // Fallback to page reload
8728+ const fallbackUrl = new URL(window.location);
8729+ if (checkbox.checked) {
8730+ fallbackUrl.searchParams.set("include_inactive", "true");
8731+ } else {
8732+ fallbackUrl.searchParams.delete("include_inactive");
8733+ }
8734+ window.location = fallbackUrl;
8735+ return;
8736+ }
8737+
87218738 // Try to find the HTMX container that loads this entity's partial
87228739 // Prefer an element with hx-get containing the admin partial endpoint
87238740 const selector = `[hx-get*="/admin/${type}/partial"]`;
@@ -14804,7 +14821,28 @@ function initializeTabState() {
1480414821// GLOBAL EXPORTS - Make functions available to HTML onclick handlers
1480514822// ===================================================================
1480614823
14824+ /**
14825+ * Load servers (Virtual Servers / Catalog) with optional include_inactive parameter
14826+ */
14827+ async function loadServers() {
14828+ const checkbox = safeGetElement("show-inactive-servers");
14829+ const includeInactive = checkbox ? checkbox.checked : false;
14830+
14831+ // Build URL with include_inactive parameter
14832+ const url = new URL(window.location);
14833+ if (includeInactive) {
14834+ url.searchParams.set("include_inactive", "true");
14835+ } else {
14836+ url.searchParams.delete("include_inactive");
14837+ }
14838+
14839+ // Reload the page with the updated parameters
14840+ // Since the catalog panel is server-side rendered, we need a full page reload
14841+ window.location.href = url.toString();
14842+ }
14843+
1480714844window.toggleInactiveItems = toggleInactiveItems;
14845+ window.loadServers = loadServers;
1480814846window.handleToggleSubmit = handleToggleSubmit;
1480914847window.handleSubmitWithConfirmation = handleSubmitWithConfirmation;
1481014848window.viewTool = viewTool;
0 commit comments