show site link in clients table

This commit is contained in:
miloschwartz
2025-02-21 22:20:19 -05:00
parent 1a63669805
commit 9f54f4d81a
5 changed files with 48 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ function queryClients(orgId: string, accessibleClientIds: number[]) {
clientId: clients.clientId,
orgId: clients.orgId,
siteId: clients.siteId,
siteNiceId: sites.niceId,
name: clients.name,
pubKey: clients.pubKey,
subnet: clients.subnet,
@@ -49,10 +50,12 @@ function queryClients(orgId: string, accessibleClientIds: number[]) {
megabytesOut: clients.megabytesOut,
orgName: orgs.name,
type: clients.type,
online: clients.online
online: clients.online,
siteName: sites.name
})
.from(clients)
.leftJoin(orgs, eq(clients.orgId, orgs.orgId))
.innerJoin(sites, eq(clients.siteId, sites.siteId))
.where(
and(
inArray(clients.clientId, accessibleClientIds),