mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-15 04:26:14 +00:00
🚨 run eslint --fix
This commit is contained in:
@@ -304,7 +304,7 @@ export async function getNextAvailableOrgSubnet(): Promise<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function generateRemoteSubnets(allSiteResources: SiteResource[]): string[] {
|
export function generateRemoteSubnets(allSiteResources: SiteResource[]): string[] {
|
||||||
let remoteSubnets = allSiteResources
|
const remoteSubnets = allSiteResources
|
||||||
.filter((sr) => {
|
.filter((sr) => {
|
||||||
if (sr.mode === "cidr") return true;
|
if (sr.mode === "cidr") return true;
|
||||||
if (sr.mode === "host") {
|
if (sr.mode === "host") {
|
||||||
@@ -344,7 +344,7 @@ export function generateSubnetProxyTargets(
|
|||||||
subnet: string | null;
|
subnet: string | null;
|
||||||
}[]
|
}[]
|
||||||
): SubnetProxyTarget[] {
|
): SubnetProxyTarget[] {
|
||||||
let targets: SubnetProxyTarget[] = [];
|
const targets: SubnetProxyTarget[] = [];
|
||||||
|
|
||||||
if (clients.length === 0) {
|
if (clients.length === 0) {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
@@ -392,9 +392,9 @@ async function handleMessagesForSiteClients(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newtJobs: Promise<any>[] = [];
|
const newtJobs: Promise<any>[] = [];
|
||||||
let olmJobs: Promise<any>[] = [];
|
const olmJobs: Promise<any>[] = [];
|
||||||
let exitNodeJobs: Promise<any>[] = [];
|
const exitNodeJobs: Promise<any>[] = [];
|
||||||
|
|
||||||
// Combine all clients that need processing (those being added or removed)
|
// Combine all clients that need processing (those being added or removed)
|
||||||
const clientsToProcess = new Map<
|
const clientsToProcess = new Map<
|
||||||
@@ -678,8 +678,8 @@ async function handleSubnetProxyTargetUpdates(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let proxyJobs = [];
|
const proxyJobs = [];
|
||||||
let olmJobs = [];
|
const olmJobs = [];
|
||||||
// Generate targets for added associations
|
// Generate targets for added associations
|
||||||
if (clientSiteResourcesToAdd.length > 0) {
|
if (clientSiteResourcesToAdd.length > 0) {
|
||||||
const addedClients = allClients.filter((client) =>
|
const addedClients = allClients.filter((client) =>
|
||||||
|
|||||||
@@ -1043,7 +1043,7 @@ hybridRouter.get(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let rules = await db
|
const rules = await db
|
||||||
.select()
|
.select()
|
||||||
.from(resourceRules)
|
.from(resourceRules)
|
||||||
.where(eq(resourceRules.resourceId, resourceId));
|
.where(eq(resourceRules.resourceId, resourceId));
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
|||||||
.from(siteResources)
|
.from(siteResources)
|
||||||
.where(eq(siteResources.siteId, siteId));
|
.where(eq(siteResources.siteId, siteId));
|
||||||
|
|
||||||
let targetsToSend: SubnetProxyTarget[] = [];
|
const targetsToSend: SubnetProxyTarget[] = [];
|
||||||
|
|
||||||
for (const resource of allSiteResources) {
|
for (const resource of allSiteResources) {
|
||||||
// Get clients associated with this specific resource
|
// Get clients associated with this specific resource
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ export async function updateSiteResource(
|
|||||||
newTargets: newTargets
|
newTargets: newTargets
|
||||||
});
|
});
|
||||||
|
|
||||||
let olmJobs: Promise<void>[] = [];
|
const olmJobs: Promise<void>[] = [];
|
||||||
for (const client of mergedAllClients) {
|
for (const client of mergedAllClients) {
|
||||||
// we also need to update the remote subnets on the olms for each client that has access to this site
|
// we also need to update the remote subnets on the olms for each client that has access to this site
|
||||||
olmJobs.push(
|
olmJobs.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user