mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-05 23:28:44 +00:00
Working on ui
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user