Merge branch 'dev' into Lokowitz-feature-i18n

This commit is contained in:
Owen
2025-06-09 14:53:32 -04:00
11 changed files with 355 additions and 425 deletions

View File

@@ -28,6 +28,7 @@ import { createApiClient } from "@app/lib/api";
import { useEnvContext } from "@app/hooks/useEnvContext";
import CreateSiteFormModal from "./CreateSiteModal";
import { useTranslations } from "next-intl";
import { parseDataSize } from '@app/lib/dataSize';
export type SiteRow = {
id: number;
@@ -199,7 +200,9 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
sortingFn: (rowA, rowB) =>
parseDataSize(rowA.original.mbIn) - parseDataSize(rowB.original.mbIn)
},
{
accessorKey: "mbOut",
@@ -215,7 +218,9 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
sortingFn: (rowA, rowB) =>
parseDataSize(rowA.original.mbOut) - parseDataSize(rowB.original.mbOut),
},
{
accessorKey: "type",

View File

@@ -33,6 +33,15 @@ import { useEnvContext } from "@app/hooks/useEnvContext";
import { useState } from "react";
import { SwitchInput } from "@app/components/SwitchInput";
import { useTranslations } from "next-intl";
import Link from "next/link";
import { ArrowRight } from "lucide-react";
const GeneralFormSchema = z.object({
name: z.string().nonempty("Name is required"),
dockerSocketEnabled: z.boolean().optional()
});
type GeneralFormValues = z.infer<typeof GeneralFormSchema>;
export default function GeneralPage() {
const { site, updateSite } = useSiteContext();
@@ -154,6 +163,20 @@ export default function GeneralPage() {
discovery for populating
container information,
useful in resource targets.
<Link
href="https://docs.fossorial.io/Newt/overview#docker-socket-integration"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
<span>
{" "}
Docker socket path
must be provided to
Newt in order to use
this feature.
</span>
</Link>
</FormDescription>
</FormItem>
)}