mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-12-18 09:55:48 -07:00
Agent Reverse Tunneling - Engine Tunnel Service Implementation
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user