Working on ui

This commit is contained in:
Owen
2026-05-31 17:25:03 -07:00
parent cb2ee9c489
commit b99e9a6468
9 changed files with 40 additions and 33 deletions

View File

@@ -434,7 +434,16 @@ export async function listResources(
.from(targets)
.innerJoin(sites, eq(targets.siteId, sites.siteId))
.where(and(eq(sites.orgId, orgId), eq(sites.siteId, siteId)));
conditions.push(inArray(resources.resourceId, resourcesWithSite));
const resourcesWithBrowserGateway = db
.select({ resourceId: browserGatewayTarget.resourceId })
.from(browserGatewayTarget)
.where(eq(browserGatewayTarget.siteId, siteId));
conditions.push(
or(
inArray(resources.resourceId, resourcesWithSite),
inArray(resources.resourceId, resourcesWithBrowserGateway)
)
);
}
if (isLabelFeatureEnabled && labelFilter && labelFilter.length > 0) {

View File

@@ -144,14 +144,13 @@ const updateSiteResourceSchema = z
data.destinationPort <= 65535
);
} else if (data.mode === "ssh") {
// just check the destinationPort
// destinationPort is optional for native mode; allow null/undefined
return (
data.destinationPort === undefined ||
(data.destinationPort !== null &&
data.destinationPort >= 1 &&
data.destinationPort <= 65535)
data.destinationPort == null ||
(data.destinationPort >= 1 && data.destinationPort <= 65535)
);
}
return true;
},
{
message: