mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-07 03:06:40 +00:00
add integration routes
This commit is contained in:
@@ -871,3 +871,17 @@ authenticated.get(
|
|||||||
logActionAudit(ActionsEnum.exportLogs),
|
logActionAudit(ActionsEnum.exportLogs),
|
||||||
logs.exportRequestAuditLogs
|
logs.exportRequestAuditLogs
|
||||||
);
|
);
|
||||||
|
|
||||||
|
authenticated.get(
|
||||||
|
"/org/:orgId/logs/analytics",
|
||||||
|
verifyApiKeyOrgAccess,
|
||||||
|
verifyApiKeyHasAction(ActionsEnum.viewLogs),
|
||||||
|
logs.queryRequestAnalytics
|
||||||
|
);
|
||||||
|
|
||||||
|
authenticated.get(
|
||||||
|
"/org/:orgId/resource-names",
|
||||||
|
verifyApiKeyOrgAccess,
|
||||||
|
verifyApiKeyHasAction(ActionsEnum.listResources),
|
||||||
|
resource.listAllResourceNames
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,26 +1,14 @@
|
|||||||
import { Request, Response, NextFunction } from "express";
|
import { Request, Response, NextFunction } from "express";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { db, resourceHeaderAuth } from "@server/db";
|
import { db } from "@server/db";
|
||||||
import {
|
import { resources } from "@server/db";
|
||||||
resources,
|
|
||||||
userResources,
|
|
||||||
roleResources,
|
|
||||||
resourcePassword,
|
|
||||||
resourcePincode,
|
|
||||||
targets,
|
|
||||||
targetHealthCheck
|
|
||||||
} from "@server/db";
|
|
||||||
import response from "@server/lib/response";
|
import response from "@server/lib/response";
|
||||||
import HttpCode from "@server/types/HttpCode";
|
import HttpCode from "@server/types/HttpCode";
|
||||||
import createHttpError from "http-errors";
|
import createHttpError from "http-errors";
|
||||||
import { sql, eq, or, inArray, and, count } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import logger from "@server/logger";
|
import logger from "@server/logger";
|
||||||
import { fromZodError } from "zod-validation-error";
|
import { fromZodError } from "zod-validation-error";
|
||||||
import { OpenAPITags, registry } from "@server/openApi";
|
import { OpenAPITags, registry } from "@server/openApi";
|
||||||
import type {
|
|
||||||
ResourceWithTargets,
|
|
||||||
ListResourcesResponse
|
|
||||||
} from "./listResources";
|
|
||||||
|
|
||||||
const listResourcesParamsSchema = z.strictObject({
|
const listResourcesParamsSchema = z.strictObject({
|
||||||
orgId: z.string()
|
orgId: z.string()
|
||||||
|
|||||||
@@ -139,9 +139,6 @@ export function LogAnalyticsData(props: AnalyticsContentProps) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log({
|
|
||||||
endDate
|
|
||||||
});
|
|
||||||
newSearch.set("timeEnd", endDate.toISOString());
|
newSearch.set("timeEnd", endDate.toISOString());
|
||||||
}
|
}
|
||||||
router.replace(`${path}?${newSearch.toString()}`);
|
router.replace(`${path}?${newSearch.toString()}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user