mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 20:26:40 +00:00
Fix lint
This commit is contained in:
@@ -43,8 +43,7 @@ async function startServers() {
|
|||||||
const apiServer = createApiServer();
|
const apiServer = createApiServer();
|
||||||
const internalServer = createInternalServer();
|
const internalServer = createInternalServer();
|
||||||
|
|
||||||
let nextServer;
|
const nextServer = await createNextServer();
|
||||||
nextServer = await createNextServer();
|
|
||||||
if (config.getRawConfig().traefik.file_mode) {
|
if (config.getRawConfig().traefik.file_mode) {
|
||||||
const monitor = new TraefikConfigManager();
|
const monitor = new TraefikConfigManager();
|
||||||
await monitor.start();
|
await monitor.start();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
export async function getOrgTierData(
|
export async function getOrgTierData(
|
||||||
orgId: string
|
orgId: string
|
||||||
): Promise<{ tier: string | null; active: boolean }> {
|
): Promise<{ tier: string | null; active: boolean }> {
|
||||||
let tier = null;
|
const tier = null;
|
||||||
let active = false;
|
const active = false;
|
||||||
|
|
||||||
return { tier, active };
|
return { tier, active };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -789,7 +789,7 @@ export async function getTraefikConfig(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let tls = {};
|
const tls = {};
|
||||||
if (
|
if (
|
||||||
!privateConfig.getRawPrivateConfig().flags.use_pangolin_dns
|
!privateConfig.getRawPrivateConfig().flags.use_pangolin_dns
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ authenticated.get(
|
|||||||
verifyOrgAccess,
|
verifyOrgAccess,
|
||||||
verifyUserHasAction(ActionsEnum.exportLogs),
|
verifyUserHasAction(ActionsEnum.exportLogs),
|
||||||
logs.queryActionAuditLogs
|
logs.queryActionAuditLogs
|
||||||
)
|
);
|
||||||
|
|
||||||
authenticated.get(
|
authenticated.get(
|
||||||
"/org/:orgId/logs/action/export",
|
"/org/:orgId/logs/action/export",
|
||||||
@@ -364,7 +364,7 @@ authenticated.get(
|
|||||||
verifyUserHasAction(ActionsEnum.exportLogs),
|
verifyUserHasAction(ActionsEnum.exportLogs),
|
||||||
logActionAudit(ActionsEnum.exportLogs),
|
logActionAudit(ActionsEnum.exportLogs),
|
||||||
logs.exportActionAuditLogs
|
logs.exportActionAuditLogs
|
||||||
)
|
);
|
||||||
|
|
||||||
authenticated.get(
|
authenticated.get(
|
||||||
"/org/:orgId/logs/access",
|
"/org/:orgId/logs/access",
|
||||||
@@ -373,7 +373,7 @@ authenticated.get(
|
|||||||
verifyOrgAccess,
|
verifyOrgAccess,
|
||||||
verifyUserHasAction(ActionsEnum.exportLogs),
|
verifyUserHasAction(ActionsEnum.exportLogs),
|
||||||
logs.queryAccessAuditLogs
|
logs.queryAccessAuditLogs
|
||||||
)
|
);
|
||||||
|
|
||||||
authenticated.get(
|
authenticated.get(
|
||||||
"/org/:orgId/logs/access/export",
|
"/org/:orgId/logs/access/export",
|
||||||
@@ -383,4 +383,4 @@ authenticated.get(
|
|||||||
verifyUserHasAction(ActionsEnum.exportLogs),
|
verifyUserHasAction(ActionsEnum.exportLogs),
|
||||||
logActionAudit(ActionsEnum.exportLogs),
|
logActionAudit(ActionsEnum.exportLogs),
|
||||||
logs.exportAccessAuditLogs
|
logs.exportAccessAuditLogs
|
||||||
)
|
);
|
||||||
@@ -887,7 +887,7 @@ authenticated.get(
|
|||||||
verifyOrgAccess,
|
verifyOrgAccess,
|
||||||
verifyUserHasAction(ActionsEnum.viewLogs),
|
verifyUserHasAction(ActionsEnum.viewLogs),
|
||||||
logs.queryRequestAuditLogs
|
logs.queryRequestAuditLogs
|
||||||
)
|
);
|
||||||
|
|
||||||
authenticated.get(
|
authenticated.get(
|
||||||
"/org/:orgId/logs/request/export",
|
"/org/:orgId/logs/request/export",
|
||||||
@@ -895,7 +895,7 @@ authenticated.get(
|
|||||||
verifyUserHasAction(ActionsEnum.exportLogs),
|
verifyUserHasAction(ActionsEnum.exportLogs),
|
||||||
logActionAudit(ActionsEnum.exportLogs),
|
logActionAudit(ActionsEnum.exportLogs),
|
||||||
logs.exportRequestAuditLogs
|
logs.exportRequestAuditLogs
|
||||||
)
|
);
|
||||||
|
|
||||||
// Auth routes
|
// Auth routes
|
||||||
export const authRouter = Router();
|
export const authRouter = Router();
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ export default function GeneralPage() {
|
|||||||
<DropdownMenuContent className="w-full">
|
<DropdownMenuContent className="w-full">
|
||||||
{LOG_RETENTION_OPTIONS.filter((option) => {
|
{LOG_RETENTION_OPTIONS.filter((option) => {
|
||||||
if (build == "saas" && !subscription?.subscribed && option.value > 30) {
|
if (build == "saas" && !subscription?.subscribed && option.value > 30) {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}).map(
|
}).map(
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ export default function GeneralPage() {
|
|||||||
const activeFilters = filtersParam || filters;
|
const activeFilters = filtersParam || filters;
|
||||||
|
|
||||||
// Convert the date/time values to API parameters
|
// Convert the date/time values to API parameters
|
||||||
let params: any = {
|
const params: any = {
|
||||||
limit: size,
|
limit: size,
|
||||||
offset: page * size,
|
offset: page * size,
|
||||||
...activeFilters
|
...activeFilters
|
||||||
@@ -312,7 +312,7 @@ export default function GeneralPage() {
|
|||||||
setIsExporting(true);
|
setIsExporting(true);
|
||||||
|
|
||||||
// Prepare query params for export
|
// Prepare query params for export
|
||||||
let params: any = {
|
const params: any = {
|
||||||
timeStart: dateRange.startDate?.date
|
timeStart: dateRange.startDate?.date
|
||||||
? new Date(dateRange.startDate.date).toISOString()
|
? new Date(dateRange.startDate.date).toISOString()
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default function GeneralPage() {
|
|||||||
const activeFilters = filtersParam || filters;
|
const activeFilters = filtersParam || filters;
|
||||||
|
|
||||||
// Convert the date/time values to API parameters
|
// Convert the date/time values to API parameters
|
||||||
let params: any = {
|
const params: any = {
|
||||||
limit: size,
|
limit: size,
|
||||||
offset: page * size,
|
offset: page * size,
|
||||||
...activeFilters
|
...activeFilters
|
||||||
@@ -296,7 +296,7 @@ export default function GeneralPage() {
|
|||||||
setIsExporting(true);
|
setIsExporting(true);
|
||||||
|
|
||||||
// Prepare query params for export
|
// Prepare query params for export
|
||||||
let params: any = {
|
const params: any = {
|
||||||
timeStart: dateRange.startDate?.date
|
timeStart: dateRange.startDate?.date
|
||||||
? new Date(dateRange.startDate.date).toISOString()
|
? new Date(dateRange.startDate.date).toISOString()
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ export default function GeneralPage() {
|
|||||||
const activeFilters = filtersParam || filters;
|
const activeFilters = filtersParam || filters;
|
||||||
|
|
||||||
// Convert the date/time values to API parameters
|
// Convert the date/time values to API parameters
|
||||||
let params: any = {
|
const params: any = {
|
||||||
limit: size,
|
limit: size,
|
||||||
offset: page * size,
|
offset: page * size,
|
||||||
...activeFilters
|
...activeFilters
|
||||||
@@ -301,7 +301,7 @@ export default function GeneralPage() {
|
|||||||
setIsExporting(true);
|
setIsExporting(true);
|
||||||
|
|
||||||
// Prepare query params for export
|
// Prepare query params for export
|
||||||
let params: any = {
|
const params: any = {
|
||||||
timeStart: dateRange.startDate?.date
|
timeStart: dateRange.startDate?.date
|
||||||
? new Date(dateRange.startDate.date).toISOString()
|
? new Date(dateRange.startDate.date).toISOString()
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
"use client"
|
"use client";
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react";
|
||||||
import {
|
import {
|
||||||
ChevronDownIcon,
|
ChevronDownIcon,
|
||||||
ChevronLeftIcon,
|
ChevronLeftIcon,
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
} from "lucide-react"
|
} from "lucide-react";
|
||||||
import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
|
import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker";
|
||||||
|
|
||||||
import { Button, buttonVariants } from "@/components/ui/button"
|
import { Button, buttonVariants } from "@/components/ui/button";
|
||||||
import { cn } from "@app/lib/cn"
|
import { cn } from "@app/lib/cn";
|
||||||
|
|
||||||
function Calendar({
|
function Calendar({
|
||||||
className,
|
className,
|
||||||
@@ -23,7 +23,7 @@ function Calendar({
|
|||||||
}: React.ComponentProps<typeof DayPicker> & {
|
}: React.ComponentProps<typeof DayPicker> & {
|
||||||
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
||||||
}) {
|
}) {
|
||||||
const defaultClassNames = getDefaultClassNames()
|
const defaultClassNames = getDefaultClassNames();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DayPicker
|
<DayPicker
|
||||||
@@ -133,13 +133,13 @@ function Calendar({
|
|||||||
className={cn(className)}
|
className={cn(className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
Chevron: ({ className, orientation, ...props }) => {
|
Chevron: ({ className, orientation, ...props }) => {
|
||||||
if (orientation === "left") {
|
if (orientation === "left") {
|
||||||
return (
|
return (
|
||||||
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (orientation === "right") {
|
if (orientation === "right") {
|
||||||
@@ -148,12 +148,12 @@ function Calendar({
|
|||||||
className={cn("size-4", className)}
|
className={cn("size-4", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
DayButton: CalendarDayButton,
|
DayButton: CalendarDayButton,
|
||||||
WeekNumber: ({ children, ...props }) => {
|
WeekNumber: ({ children, ...props }) => {
|
||||||
@@ -163,13 +163,13 @@ function Calendar({
|
|||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
...components,
|
...components,
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalendarDayButton({
|
function CalendarDayButton({
|
||||||
@@ -178,12 +178,12 @@ function CalendarDayButton({
|
|||||||
modifiers,
|
modifiers,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof DayButton>) {
|
}: React.ComponentProps<typeof DayButton>) {
|
||||||
const defaultClassNames = getDefaultClassNames()
|
const defaultClassNames = getDefaultClassNames();
|
||||||
|
|
||||||
const ref = React.useRef<HTMLButtonElement>(null)
|
const ref = React.useRef<HTMLButtonElement>(null);
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (modifiers.focused) ref.current?.focus()
|
if (modifiers.focused) ref.current?.focus();
|
||||||
}, [modifiers.focused])
|
}, [modifiers.focused]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
@@ -207,7 +207,7 @@ function CalendarDayButton({
|
|||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Calendar, CalendarDayButton }
|
export { Calendar, CalendarDayButton };
|
||||||
|
|||||||
Reference in New Issue
Block a user