Agent Reverse Tunneling - Engine Tunnel Service Implementation

This commit is contained in:
2025-12-01 01:40:23 -07:00
parent 33b6351c78
commit db8dd423f6
12 changed files with 1638 additions and 13 deletions

View File

@@ -917,11 +917,14 @@ export default function DeviceFilterEditor({ initialFilter, onCancel, onSaved, o
id: initialFilter?.id || initialFilter?.filter_id,
name: name.trim() || "Unnamed Filter",
site_scope: siteScope,
site_scope_value: primarySite,
site_scope_values: scopedSites,
sites: scopedSites,
site_ids: scopedSites,
site_names: siteScope === "scoped" ? selectedSiteLabels : [],
site: siteScope === "scoped" ? primarySite : null,
site_scope_value: primarySite,
scope: siteScope,
type: siteScope,
site: primarySite,
groups: groups.map((g, gIdx) => ({
join_with: gIdx === 0 ? null : g.joinWith || "OR",
conditions: (g.conditions || []).map((c, cIdx) => ({

View File

@@ -147,7 +147,13 @@ function normalizeFilters(raw) {
id: f.id || f.filter_id || `filter-${idx}`,
name: f.name || f.title || "Unnamed Filter",
type: (f.site_scope || f.scope || f.type || "global") === "scoped" ? "site" : "global",
site: f.site || f.site_scope || f.site_name || f.target_site || null,
site: (() => {
if (Array.isArray(f.site_scope_values) && f.site_scope_values.length) return f.site_scope_values.join(", ");
if (Array.isArray(f.sites) && f.sites.length) return f.sites.join(", ");
if (Array.isArray(f.site_ids) && f.site_ids.length) return f.site_ids.join(", ");
if (Array.isArray(f.site_names) && f.site_names.length) return f.site_names.join(", ");
return f.site || f.site_scope || f.site_name || f.target_site || null;
})(),
lastEditedBy: resolveLastEditor(f),
lastEdited: f.last_edited || f.updated_at || f.updated || f.created_at || null,
deviceCount: