Merge branch 'dev' into feat/login-page-customization

This commit is contained in:
Fred KISSIE
2025-12-04 23:56:16 +01:00
45 changed files with 4123 additions and 310 deletions

View File

@@ -0,0 +1,28 @@
import { LogAnalyticsData } from "@app/components/LogAnalyticsData";
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
import { getTranslations } from "next-intl/server";
import { Suspense } from "react";
export interface AnalyticsPageProps {
params: Promise<{ orgId: string }>;
searchParams: Promise<Record<string, string>>;
}
export default async function AnalyticsPage(props: AnalyticsPageProps) {
const t = await getTranslations();
const orgId = (await props.params).orgId;
return (
<>
<SettingsSectionTitle
title={t("requestAnalytics")}
description={t("requestAnalyticsDescription")}
/>
<div className="container mx-auto max-w-12xl">
<LogAnalyticsData orgId={orgId} />
</div>
</>
);
}

View File

@@ -464,6 +464,7 @@ export default function ReverseProxyTargets(props: {
hcStatus: null,
hcMode: null,
hcUnhealthyInterval: null,
hcTlsServerName: null,
siteType: sites.length > 0 ? sites[0].type : null,
new: true,
updated: false
@@ -629,7 +630,8 @@ export default function ReverseProxyTargets(props: {
hcHealth: "unknown",
hcStatus: null,
hcMode: null,
hcUnhealthyInterval: null
hcUnhealthyInterval: null,
hcTlsServerName: null,
};
setTargets([...targets, newTarget]);
@@ -729,7 +731,8 @@ export default function ReverseProxyTargets(props: {
hcMethod: target.hcMethod || null,
hcStatus: target.hcStatus || null,
hcUnhealthyInterval: target.hcUnhealthyInterval || null,
hcMode: target.hcMode || null
hcMode: target.hcMode || null,
hcTlsServerName: target.hcTlsServerName,
};
// Only include path-related fields for HTTP resources
@@ -1822,7 +1825,9 @@ export default function ReverseProxyTargets(props: {
hcMode: selectedTargetForHealthCheck.hcMode || "http",
hcUnhealthyInterval:
selectedTargetForHealthCheck.hcUnhealthyInterval ||
30
30,
hcTlsServerName: selectedTargetForHealthCheck.hcTlsServerName ||
undefined,
}}
onChanges={async (config) => {
console.log("here");

View File

@@ -297,6 +297,7 @@ export default function Page() {
hcStatus: null,
hcMode: null,
hcUnhealthyInterval: null,
hcTlsServerName: null,
siteType: sites.length > 0 ? sites[0].type : null,
new: true,
updated: false
@@ -454,7 +455,8 @@ export default function Page() {
hcHealth: "unknown",
hcStatus: null,
hcMode: null,
hcUnhealthyInterval: null
hcUnhealthyInterval: null,
hcTlsServerName: null
};
setTargets([...targets, newTarget]);
@@ -576,7 +578,8 @@ export default function Page() {
target.hcFollowRedirects || null,
hcStatus: target.hcStatus || null,
hcUnhealthyInterval: target.hcUnhealthyInterval || null,
hcMode: target.hcMode || null
hcMode: target.hcMode || null,
hcTlsServerName: target.hcTlsServerName
};
// Only include path-related fields for HTTP resources
@@ -1800,7 +1803,10 @@ export default function Page() {
"http",
hcUnhealthyInterval:
selectedTargetForHealthCheck.hcUnhealthyInterval ||
30
30,
hcTlsServerName:
selectedTargetForHealthCheck.hcTlsServerName ||
undefined
}}
onChanges={async (config) => {
if (selectedTargetForHealthCheck) {

View File

@@ -136,6 +136,24 @@
}
}
@layer base {
:root {
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
}
.dark {
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
}
}
p {
word-break: keep-all;
white-space: normal;

View File

@@ -21,6 +21,7 @@ import { build } from "@server/build";
import { TopLoader } from "@app/components/Toploader";
import Script from "next/script";
import { ReactQueryProvider } from "@app/components/react-query-provider";
import { TailwindIndicator } from "@app/components/TailwindIndicator";
export const metadata: Metadata = {
title: `Dashboard - ${process.env.BRANDING_APP_NAME || "Pangolin"}`,
@@ -129,6 +130,10 @@ export default async function RootLayout({
</ThemeProvider>
</NextIntlClientProvider>
</ReactQueryProvider>
{process.env.NODE_ENV === "development" && (
<TailwindIndicator />
)}
</body>
</html>
);

View File

@@ -17,7 +17,8 @@ import {
CreditCard,
Logs,
SquareMousePointer,
ScanEye
ScanEye,
ChartLine
} from "lucide-react";
export type SidebarNavSection = {
@@ -39,7 +40,7 @@ export const orgNavSections = (
enableClients: boolean = true
): SidebarNavSection[] => [
{
heading: "General",
heading: "sidebarGeneral",
items: [
{
title: "sidebarSites",
@@ -61,7 +62,7 @@ export const orgNavSections = (
}
]
: []),
...(build == "saas"
...(build === "saas"
? [
{
title: "sidebarRemoteExitNodes",
@@ -84,7 +85,7 @@ export const orgNavSections = (
]
},
{
heading: "Access Control",
heading: "sidebarAccessControl",
items: [
{
title: "sidebarUsers",
@@ -119,13 +120,18 @@ export const orgNavSections = (
]
},
{
heading: "Analytics",
heading: "sidebarLogAndAnalytics",
items: [
{
title: "sidebarLogsRequest",
href: "/{orgId}/settings/logs/request",
icon: <SquareMousePointer className="h-4 w-4" />
},
{
title: "sidebarLogsAnalytics",
href: "/{orgId}/settings/logs/analytics",
icon: <ChartLine className="h-4 w-4" />
},
...(build != "oss"
? [
{
@@ -143,7 +149,7 @@ export const orgNavSections = (
]
},
{
heading: "Organization",
heading: "sidebarOrganization",
items: [
{
title: "sidebarApiKeys",