Compare commits

..
110 changed files with 1202 additions and 6011 deletions

No files matched your search

-4
View File
@@ -28,10 +28,6 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
# DB_PASSWORD='password' # DB_PASSWORD='password'
# DB_NAME='name-of-database' # DB_NAME='name-of-database'
# The below path can be used to store trusted certificates during development, it is not required and can be left empty.
# If it is used, please use the full path to the directory where the certificates are stored.
# LOCAL_CERTIFICATE_PATH='FULL_PATH_TO_CERTIFICATES'
TURBO_TELEMETRY_DISABLED=1 TURBO_TELEMETRY_DISABLED=1
# Configure logging to use winston logger # Configure logging to use winston logger
-5
View File
@@ -6,11 +6,6 @@
matchPackagePatterns: ["^@homarr/"], matchPackagePatterns: ["^@homarr/"],
enabled: false, enabled: false,
}, },
// Disable Dockerode updates see https://github.com/apocas/dockerode/issues/787
{
matchPackagePatterns: ["^dockerode$"],
enabled: false,
},
{ {
matchUpdateTypes: ["minor", "patch", "pin", "digest"], matchUpdateTypes: ["minor", "patch", "pin", "digest"],
automerge: true, automerge: true,
@@ -37,7 +37,7 @@ jobs:
token: ${{ github.token }} token: ${{ github.token }}
branch: dev branch: dev
- name: Create pull request - name: Create pull request
run: 'gh pr create --title "chore(release): automatic release ${{ steps.semver.outputs.next }}" --body "**This is an automatic release**.<br/>Manual action may be required for major bumps.<br/>Detected change to be ``${{ steps.semver.outputs.bump }}``<br/>Bump version from ``${{ steps.semver.outputs.current }}`` to ``${{ steps.semver.outputs.next }}``" --base main --head dev --label automerge' run: 'gh pr create --title "chore(release): automatic release ${{ steps.semver.outputs.next }}" --body "**This is an automatic release**.<br/>Manual action may be required for major bumps.<br/>Detected change to be ``${{ steps.semver.outputs.bump }}``<br/>Bump version from ``${{ steps.semver.outputs.current }}`` to ``${{ steps.semver.outputs.next }}``" --base beta --head dev --label automerge'
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Discord notification - name: Discord notification
+1 -1
View File
@@ -64,4 +64,4 @@ packages/cli/cli.cjs
e2e/shared/tmp e2e/shared/tmp
#personal backgrounds #personal backgrounds
apps/nextjs/public/images/background.png apps/nextjs/public/images/background.png
+1 -1167
View File
File diff suppressed because it is too large. Load diff
+2 -3
View File
@@ -18,7 +18,6 @@
"@homarr/analytics": "workspace:^0.1.0", "@homarr/analytics": "workspace:^0.1.0",
"@homarr/api": "workspace:^0.1.0", "@homarr/api": "workspace:^0.1.0",
"@homarr/auth": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0",
"@homarr/certificates": "workspace:^0.1.0",
"@homarr/common": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0",
"@homarr/cron-job-status": "workspace:^0.1.0", "@homarr/cron-job-status": "workspace:^0.1.0",
"@homarr/db": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0",
@@ -62,7 +61,7 @@
"clsx": "^2.1.1", "clsx": "^2.1.1",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"flag-icons": "^7.3.1", "flag-icons": "^7.2.3",
"glob": "^11.0.1", "glob": "^11.0.1",
"jotai": "^2.11.0", "jotai": "^2.11.0",
"mantine-react-table": "2.0.0-beta.8", "mantine-react-table": "2.0.0-beta.8",
@@ -83,7 +82,7 @@
"@homarr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"@types/chroma-js": "3.1.0", "@types/chroma-js": "3.1.0",
"@types/node": "^22.10.7", "@types/node": "^22.10.6",
"@types/prismjs": "^1.26.5", "@types/prismjs": "^1.26.5",
"@types/react": "19.0.7", "@types/react": "19.0.7",
"@types/react-dom": "19.0.3", "@types/react-dom": "19.0.3",
@@ -1,4 +1,4 @@
import { IconGrid3x3, IconKey, IconPassword, IconServer, IconUser } from "@tabler/icons-react"; import { IconKey, IconPassword, IconUser } from "@tabler/icons-react";
import type { IntegrationSecretKind } from "@homarr/definitions"; import type { IntegrationSecretKind } from "@homarr/definitions";
import type { TablerIcon } from "@homarr/ui"; import type { TablerIcon } from "@homarr/ui";
@@ -7,6 +7,4 @@ export const integrationSecretIcons = {
username: IconUser, username: IconUser,
apiKey: IconKey, apiKey: IconKey,
password: IconPassword, password: IconPassword,
realm: IconServer,
tokenId: IconGrid3x3,
} satisfies Record<IntegrationSecretKind, TablerIcon>; } satisfies Record<IntegrationSecretKind, TablerIcon>;
@@ -6,7 +6,6 @@ import {
IconBrandDiscord, IconBrandDiscord,
IconBrandDocker, IconBrandDocker,
IconBrandGithub, IconBrandGithub,
IconCertificate,
IconGitFork, IconGitFork,
IconHome, IconHome,
IconInfoSmall, IconInfoSmall,
@@ -120,12 +119,6 @@ export default async function ManageLayout({ children }: PropsWithChildren) {
href: "/manage/tools/logs", href: "/manage/tools/logs",
hidden: !session?.user.permissions.includes("other-view-logs"), hidden: !session?.user.permissions.includes("other-view-logs"),
}, },
{
label: t("items.tools.items.certificates"),
icon: IconCertificate,
href: "/manage/tools/certificates",
hidden: !session?.user.permissions.includes("admin"),
},
{ {
label: t("items.tools.items.tasks"), label: t("items.tools.items.tasks"),
icon: IconReport, icon: IconReport,
@@ -1,81 +0,0 @@
"use client";
import { Button, FileInput, Group, Stack } from "@mantine/core";
import { IconCertificate } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
import { revalidatePathActionAsync } from "@homarr/common/client";
import { useZodForm } from "@homarr/form";
import { createModal, useModalAction } from "@homarr/modals";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useI18n } from "@homarr/translation/client";
import { superRefineCertificateFile, z } from "@homarr/validation";
export const AddCertificateButton = () => {
const { openModal } = useModalAction(AddCertificateModal);
const t = useI18n();
const handleClick = () => {
openModal({});
};
return <Button onClick={handleClick}>{t("certificate.action.create.label")}</Button>;
};
const AddCertificateModal = createModal(({ actions }) => {
const t = useI18n();
const form = useZodForm(
z.object({
file: z.instanceof(File).nullable().superRefine(superRefineCertificateFile),
}),
{
initialValues: {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
file: null!,
},
},
);
const { mutateAsync } = clientApi.certificates.addCertificate.useMutation();
return (
<form
onSubmit={form.onSubmit(async (values) => {
const formData = new FormData();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
formData.set("file", values.file!);
await mutateAsync(formData, {
async onSuccess() {
showSuccessNotification({
title: t("certificate.action.create.notification.success.title"),
message: t("certificate.action.create.notification.success.message"),
});
await revalidatePathActionAsync("/manage/tools/certificates");
actions.closeModal();
},
onError() {
showErrorNotification({
title: t("certificate.action.create.notification.error.title"),
message: t("certificate.action.create.notification.error.message"),
});
},
});
})}
>
<Stack>
<FileInput leftSection={<IconCertificate size={16} />} {...form.getInputProps("file")} />
<Group justify="end">
<Button onClick={actions.closeModal} variant="subtle" color="gray">
{t("common.action.cancel")}
</Button>
<Button type="submit" loading={form.submitting}>
{t("common.action.add")}
</Button>
</Group>
</Stack>
</form>
);
}).withOptions({
defaultTitle(t) {
return t("certificate.action.create.label");
},
});
@@ -1,54 +0,0 @@
"use client";
import { ActionIcon } from "@mantine/core";
import { IconTrash } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
import { revalidatePathActionAsync } from "@homarr/common/client";
import { useConfirmModal } from "@homarr/modals";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useI18n } from "@homarr/translation/client";
interface RemoveCertificateProps {
fileName: string;
}
export const RemoveCertificate = ({ fileName }: RemoveCertificateProps) => {
const { openConfirmModal } = useConfirmModal();
const { mutateAsync } = clientApi.certificates.removeCertificate.useMutation();
const t = useI18n();
const handleClick = () => {
openConfirmModal({
title: t("certificate.action.remove.label"),
children: t("certificate.action.remove.confirm"),
// eslint-disable-next-line no-restricted-syntax
async onConfirm() {
await mutateAsync(
{ fileName },
{
async onSuccess() {
showSuccessNotification({
title: t("certificate.action.remove.notification.success.title"),
message: t("certificate.action.remove.notification.success.message"),
});
await revalidatePathActionAsync("/manage/tools/certificates");
},
onError() {
showErrorNotification({
title: t("certificate.action.remove.notification.error.title"),
message: t("certificate.action.remove.notification.error.message"),
});
},
},
);
},
});
};
return (
<ActionIcon onClick={handleClick} color="red" variant="subtle">
<IconTrash color="red" size={16} />
</ActionIcon>
);
};
@@ -1,97 +0,0 @@
import { X509Certificate } from "node:crypto";
import { notFound } from "next/navigation";
import { Card, Group, SimpleGrid, Stack, Text, Title } from "@mantine/core";
import { IconCertificate, IconCertificateOff } from "@tabler/icons-react";
import dayjs from "dayjs";
import { auth } from "@homarr/auth/next";
import { loadCustomRootCertificatesAsync } from "@homarr/certificates/server";
import { getMantineColor } from "@homarr/common";
import type { SupportedLanguage } from "@homarr/translation";
import { getI18n } from "@homarr/translation/server";
import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { NoResults } from "~/components/no-results";
import { AddCertificateButton } from "./_components/add-certificate";
import { RemoveCertificate } from "./_components/remove-certificate";
interface CertificatesPageProps {
params: Promise<{
locale: SupportedLanguage;
}>;
}
export default async function CertificatesPage({ params }: CertificatesPageProps) {
const session = await auth();
if (!session?.user.permissions.includes("admin")) {
notFound();
}
const { locale } = await params;
const t = await getI18n();
const certificates = await loadCustomRootCertificatesAsync();
const x509Certificates = certificates
.map((cert) => ({
...cert,
x509: new X509Certificate(cert.content),
}))
.sort((certA, certB) => certA.x509.validToDate.getTime() - certB.x509.validToDate.getTime());
return (
<>
<DynamicBreadcrumb />
<Stack>
<Group justify="space-between">
<Stack gap={4}>
<Title>{t("certificate.page.list.title")}</Title>
<Text>{t("certificate.page.list.description")}</Text>
</Stack>
<AddCertificateButton />
</Group>
{x509Certificates.length === 0 && (
<NoResults icon={IconCertificateOff} title={t("certificate.page.list.noResults.title")} />
)}
<SimpleGrid cols={{ sm: 1, lg: 2, xl: 3 }} spacing="lg">
{x509Certificates.map((cert) => (
<Card key={cert.x509.fingerprint} withBorder>
<Group wrap="nowrap">
<IconCertificate color={getMantineColor(iconColor(cert.x509.validToDate), 6)} size={32} stroke={1.5} />
<Stack flex={1} gap="xs">
<Group justify="space-between">
<Text fw={500}>{cert.x509.subject}</Text>
<Text c="gray.6" ta="end" size="sm">
{cert.fileName}
</Text>
</Group>
<Group justify="space-between">
<Text size="sm" c="gray.6" title={cert.x509.validToDate.toISOString()}>
{t("certificate.page.list.expires", {
when: new Intl.RelativeTimeFormat(locale).format(
dayjs(cert.x509.validToDate).diff(dayjs(), "days"),
"days",
),
})}
</Text>
<RemoveCertificate fileName={cert.fileName} />
</Group>
</Stack>
</Group>
</Card>
))}
</SimpleGrid>
</Stack>
</>
);
}
const iconColor = (validTo: Date) => {
const daysUntilInvalid = dayjs(validTo).diff(new Date(), "days");
if (daysUntilInvalid < 1) return "red";
if (daysUntilInvalid < 7) return "orange";
if (daysUntilInvalid < 30) return "yellow";
return "green";
};
+2 -2
View File
@@ -38,13 +38,13 @@
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"superjson": "2.2.2", "superjson": "2.2.2",
"undici": "7.2.3" "undici": "7.2.1"
}, },
"devDependencies": { "devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"@types/node": "^22.10.7", "@types/node": "^22.10.6",
"dotenv-cli": "^8.0.0", "dotenv-cli": "^8.0.0",
"eslint": "^9.18.0", "eslint": "^9.18.0",
"prettier": "^3.4.2", "prettier": "^3.4.2",
@@ -3,7 +3,7 @@ import { describe, expect, test, vi } from "vitest";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { LoggingAgent } from "../fetch-agent"; import { LoggingAgent } from "~/undici-log-agent-override";
vi.mock("undici", () => { vi.mock("undici", () => {
return { return {
+31 -2
View File
@@ -1,6 +1,35 @@
import { setGlobalDispatcher } from "undici"; import type { Dispatcher } from "undici";
import { Agent, setGlobalDispatcher } from "undici";
import { LoggingAgent } from "@homarr/common/server"; import { logger } from "@homarr/log";
export class LoggingAgent extends Agent {
constructor(...props: ConstructorParameters<typeof Agent>) {
super(...props);
}
dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
const url = new URL(`${options.origin as string}${options.path}`);
// The below code should prevent sensitive data from being logged as
// some integrations use query parameters for auth
url.searchParams.forEach((value, key) => {
if (value === "") return; // Skip empty values
if (/^-?\d{1,12}$/.test(value)) return; // Skip small numbers
if (value === "true" || value === "false") return; // Skip boolean values
if (/^[a-zA-Z]{1,12}$/.test(value)) return; // Skip short strings
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) return; // Skip dates
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(value)) return; // Skip date times
url.searchParams.set(key, "REDACTED");
});
logger.info(
`Dispatching request ${url.toString().replaceAll("=&", "&")} (${Object.keys(options.headers ?? {}).length} headers)`,
);
return super.dispatch(options, handler);
}
}
const agent = new LoggingAgent(); const agent = new LoggingAgent();
setGlobalDispatcher(agent); setGlobalDispatcher(agent);
+1 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "homarr", "name": "homarr",
"version": "1.0.0", "version": "1.0.0-beta.13",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "cross-env CI=true turbo build", "build": "cross-env CI=true turbo build",
@@ -59,9 +59,6 @@
}, },
"pnpm": { "pnpm": {
"allowNonAppliedPatches": true, "allowNonAppliedPatches": true,
"overrides": {
"proxmox-api>undici": "7.2.3"
},
"patchedDependencies": { "patchedDependencies": {
"pretty-print-error": "patches/pretty-print-error.patch" "pretty-print-error": "patches/pretty-print-error.patch"
} }
+1 -2
View File
@@ -22,7 +22,6 @@
"prettier": "@homarr/prettier-config", "prettier": "@homarr/prettier-config",
"dependencies": { "dependencies": {
"@homarr/auth": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0",
"@homarr/certificates": "workspace:^0.1.0",
"@homarr/common": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0",
"@homarr/cron-job-runner": "workspace:^0.1.0", "@homarr/cron-job-runner": "workspace:^0.1.0",
"@homarr/cron-job-status": "workspace:^0.1.0", "@homarr/cron-job-status": "workspace:^0.1.0",
@@ -42,7 +41,7 @@
"@trpc/client": "next", "@trpc/client": "next",
"@trpc/react-query": "next", "@trpc/react-query": "next",
"@trpc/server": "next", "@trpc/server": "next",
"dockerode": "4.0.2", "dockerode": "^4.0.3",
"lodash.clonedeep": "^4.5.0", "lodash.clonedeep": "^4.5.0",
"next": "15.1.4", "next": "15.1.4",
"react": "19.0.0", "react": "19.0.0",
-2
View File
@@ -1,7 +1,6 @@
import { apiKeysRouter } from "./router/apiKeys"; import { apiKeysRouter } from "./router/apiKeys";
import { appRouter as innerAppRouter } from "./router/app"; import { appRouter as innerAppRouter } from "./router/app";
import { boardRouter } from "./router/board"; import { boardRouter } from "./router/board";
import { certificateRouter } from "./router/certificates/certificate-router";
import { cronJobsRouter } from "./router/cron-jobs"; import { cronJobsRouter } from "./router/cron-jobs";
import { dockerRouter } from "./router/docker/docker-router"; import { dockerRouter } from "./router/docker/docker-router";
import { groupRouter } from "./router/group"; import { groupRouter } from "./router/group";
@@ -42,7 +41,6 @@ export const appRouter = createTRPCRouter({
apiKeys: apiKeysRouter, apiKeys: apiKeysRouter,
media: mediaRouter, media: mediaRouter,
updateChecker: updateCheckerRouter, updateChecker: updateCheckerRouter,
certificates: certificateRouter,
}); });
// export type definition of API // export type definition of API
+182 -449
View File
@@ -4,7 +4,7 @@ import superjson from "superjson";
import { constructBoardPermissions } from "@homarr/auth/shared"; import { constructBoardPermissions } from "@homarr/auth/shared";
import type { DeviceType } from "@homarr/common/server"; import type { DeviceType } from "@homarr/common/server";
import type { Database, InferInsertModel, InferSelectModel, SQL } from "@homarr/db"; import type { Database, InferInsertModel, InferSelectModel, SQL } from "@homarr/db";
import { and, createId, eq, handleTransactionsAsync, inArray, like, or } from "@homarr/db"; import { and, createId, eq, inArray, like, or } from "@homarr/db";
import { getServerSettingByKeyAsync } from "@homarr/db/queries"; import { getServerSettingByKeyAsync } from "@homarr/db/queries";
import { import {
boardGroupPermissions, boardGroupPermissions,
@@ -204,49 +204,21 @@ export const boardRouter = createTRPCRouter({
.input(validation.board.create) .input(validation.board.create)
.mutation(async ({ ctx, input }) => { .mutation(async ({ ctx, input }) => {
const boardId = createId(); const boardId = createId();
await handleTransactionsAsync(ctx.db, { await ctx.db.transaction(async (transaction) => {
async handleAsync(db, schema) { await transaction.insert(boards).values({
await db.transaction(async (transaction) => { id: boardId,
await transaction.insert(schema.boards).values({ name: input.name,
id: boardId, isPublic: input.isPublic,
name: input.name, columnCount: input.columnCount,
isPublic: input.isPublic, creatorId: ctx.session.user.id,
columnCount: input.columnCount, });
creatorId: ctx.session.user.id, await transaction.insert(sections).values({
}); id: createId(),
await transaction.insert(schema.sections).values({ kind: "empty",
id: createId(), xOffset: 0,
kind: "empty", yOffset: 0,
xOffset: 0, boardId,
yOffset: 0, });
boardId,
});
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction
.insert(boards)
.values({
id: boardId,
name: input.name,
isPublic: input.isPublic,
columnCount: input.columnCount,
creatorId: ctx.session.user.id,
})
.run();
transaction
.insert(sections)
.values({
id: createId(),
kind: "empty",
xOffset: 0,
yOffset: 0,
boardId,
})
.run();
});
},
}); });
}), }),
duplicateBoard: permissionRequiredProcedure duplicateBoard: permissionRequiredProcedure
@@ -330,54 +302,28 @@ export const boardRouter = createTRPCRouter({
})), })),
); );
await handleTransactionsAsync(ctx.db, { ctx.db.transaction((transaction) => {
async handleAsync(db, schema) { transaction
await db.transaction(async (transaction) => { .insert(boards)
transaction.insert(schema.boards).values({ .values({
...boardProps, ...boardProps,
id: newBoardId, id: newBoardId,
name: input.name, name: input.name,
creatorId: ctx.session.user.id, creatorId: ctx.session.user.id,
}); })
.run();
if (sectionsToInsert.length > 0) { if (sectionsToInsert.length > 0) {
await transaction.insert(schema.sections).values(sectionsToInsert); transaction.insert(sections).values(sectionsToInsert).run();
} }
if (itemsToInsert.length > 0) { if (itemsToInsert.length > 0) {
await transaction.insert(schema.items).values(itemsToInsert); transaction.insert(items).values(itemsToInsert).run();
} }
if (itemIntegrationsToInsert.length > 0) { if (itemIntegrationsToInsert.length > 0) {
await transaction.insert(schema.integrationItems).values(itemIntegrationsToInsert); transaction.insert(integrationItems).values(itemIntegrationsToInsert).run();
} }
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction
.insert(boards)
.values({
...boardProps,
id: newBoardId,
name: input.name,
creatorId: ctx.session.user.id,
})
.run();
if (sectionsToInsert.length > 0) {
transaction.insert(sections).values(sectionsToInsert).run();
}
if (itemsToInsert.length > 0) {
transaction.insert(items).values(itemsToInsert).run();
}
if (itemIntegrationsToInsert.length > 0) {
transaction.insert(integrationItems).values(itemIntegrationsToInsert).run();
}
});
},
}); });
}), }),
renameBoard: protectedProcedure.input(validation.board.rename).mutation(async ({ ctx, input }) => { renameBoard: protectedProcedure.input(validation.board.rename).mutation(async ({ ctx, input }) => {
@@ -488,313 +434,148 @@ export const boardRouter = createTRPCRouter({
saveBoard: protectedProcedure.input(validation.board.save).mutation(async ({ input, ctx }) => { saveBoard: protectedProcedure.input(validation.board.save).mutation(async ({ input, ctx }) => {
await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.id), "modify"); await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.id), "modify");
const dbBoard = await getFullBoardWithWhereAsync(ctx.db, eq(boards.id, input.id), ctx.session.user.id); await ctx.db.transaction(async (transaction) => {
const dbBoard = await getFullBoardWithWhereAsync(transaction, eq(boards.id, input.id), ctx.session.user.id);
await handleTransactionsAsync(ctx.db, { const addedSections = filterAddedItems(input.sections, dbBoard.sections);
async handleAsync(db, schema) {
await db.transaction(async (transaction) => {
const addedSections = filterAddedItems(input.sections, dbBoard.sections);
if (addedSections.length > 0) { if (addedSections.length > 0) {
await transaction.insert(schema.sections).values( await transaction.insert(sections).values(
addedSections.map((section) => ({ addedSections.map((section) => ({
id: section.id, id: section.id,
kind: section.kind, kind: section.kind,
yOffset: section.yOffset, yOffset: section.yOffset,
xOffset: section.kind === "dynamic" ? section.xOffset : 0, xOffset: section.kind === "dynamic" ? section.xOffset : 0,
height: "height" in section ? section.height : null, height: "height" in section ? section.height : null,
width: "width" in section ? section.width : null, width: "width" in section ? section.width : null,
parentSectionId: "parentSectionId" in section ? section.parentSectionId : null, parentSectionId: "parentSectionId" in section ? section.parentSectionId : null,
name: "name" in section ? section.name : null, name: "name" in section ? section.name : null,
boardId: dbBoard.id, boardId: dbBoard.id,
})), })),
); );
} }
const inputItems = input.sections.flatMap((section) => const inputItems = input.sections.flatMap((section) =>
section.items.map((item) => ({ ...item, sectionId: section.id })), section.items.map((item) => ({ ...item, sectionId: section.id })),
); );
const dbItems = dbBoard.sections.flatMap((section) => const dbItems = dbBoard.sections.flatMap((section) =>
section.items.map((item) => ({ ...item, sectionId: section.id })), section.items.map((item) => ({ ...item, sectionId: section.id })),
); );
const addedItems = filterAddedItems(inputItems, dbItems); const addedItems = filterAddedItems(inputItems, dbItems);
if (addedItems.length > 0) { if (addedItems.length > 0) {
await transaction.insert(schema.items).values( await transaction.insert(items).values(
addedItems.map((item) => ({ addedItems.map((item) => ({
id: item.id, id: item.id,
kind: item.kind, kind: item.kind,
height: item.height, height: item.height,
width: item.width, width: item.width,
xOffset: item.xOffset, xOffset: item.xOffset,
yOffset: item.yOffset, yOffset: item.yOffset,
options: superjson.stringify(item.options), options: superjson.stringify(item.options),
advancedOptions: superjson.stringify(item.advancedOptions), advancedOptions: superjson.stringify(item.advancedOptions),
sectionId: item.sectionId, sectionId: item.sectionId,
})), })),
); );
} }
const inputIntegrationRelations = inputItems.flatMap(({ integrationIds, id: itemId }) => const inputIntegrationRelations = inputItems.flatMap(({ integrationIds, id: itemId }) =>
integrationIds.map((integrationId) => ({ integrationIds.map((integrationId) => ({
integrationId, integrationId,
itemId, itemId,
})), })),
); );
const dbIntegrationRelations = dbItems.flatMap(({ integrationIds, id: itemId }) => const dbIntegrationRelations = dbItems.flatMap(({ integrationIds, id: itemId }) =>
integrationIds.map((integrationId) => ({ integrationIds.map((integrationId) => ({
integrationId, integrationId,
itemId, itemId,
})), })),
); );
const addedIntegrationRelations = inputIntegrationRelations.filter( const addedIntegrationRelations = inputIntegrationRelations.filter(
(inputRelation) => (inputRelation) =>
!dbIntegrationRelations.some( !dbIntegrationRelations.some(
(dbRelation) =>
dbRelation.itemId === inputRelation.itemId &&
dbRelation.integrationId === inputRelation.integrationId,
),
);
if (addedIntegrationRelations.length > 0) {
await transaction.insert(schema.integrationItems).values(
addedIntegrationRelations.map((relation) => ({
itemId: relation.itemId,
integrationId: relation.integrationId,
})),
);
}
const updatedItems = filterUpdatedItems(inputItems, dbItems);
for (const item of updatedItems) {
await transaction
.update(schema.items)
.set({
kind: item.kind,
height: item.height,
width: item.width,
xOffset: item.xOffset,
yOffset: item.yOffset,
options: superjson.stringify(item.options),
advancedOptions: superjson.stringify(item.advancedOptions),
sectionId: item.sectionId,
})
.where(eq(items.id, item.id));
}
const updatedSections = filterUpdatedItems(input.sections, dbBoard.sections);
for (const section of updatedSections) {
const prev = dbBoard.sections.find((dbSection) => dbSection.id === section.id);
await transaction
.update(schema.sections)
.set({
yOffset: section.yOffset,
xOffset: section.xOffset,
height: prev?.kind === "dynamic" && "height" in section ? section.height : null,
width: prev?.kind === "dynamic" && "width" in section ? section.width : null,
parentSectionId:
prev?.kind === "dynamic" && "parentSectionId" in section ? section.parentSectionId : null,
name: prev?.kind === "category" && "name" in section ? section.name : null,
})
.where(eq(sections.id, section.id));
}
const removedIntegrationRelations = dbIntegrationRelations.filter(
(dbRelation) => (dbRelation) =>
!inputIntegrationRelations.some( dbRelation.itemId === inputRelation.itemId && dbRelation.integrationId === inputRelation.integrationId,
(inputRelation) => ),
dbRelation.itemId === inputRelation.itemId && );
dbRelation.integrationId === inputRelation.integrationId,
),
);
for (const relation of removedIntegrationRelations) { if (addedIntegrationRelations.length > 0) {
await transaction await transaction.insert(integrationItems).values(
.delete(schema.integrationItems) addedIntegrationRelations.map((relation) => ({
.where( itemId: relation.itemId,
and( integrationId: relation.integrationId,
eq(integrationItems.itemId, relation.itemId), })),
eq(integrationItems.integrationId, relation.integrationId), );
), }
);
}
const removedItems = filterRemovedItems(inputItems, dbItems); const updatedItems = filterUpdatedItems(inputItems, dbItems);
const itemIds = removedItems.map((item) => item.id); for (const item of updatedItems) {
if (itemIds.length > 0) { await transaction
await transaction.delete(schema.items).where(inArray(items.id, itemIds)); .update(items)
} .set({
kind: item.kind,
height: item.height,
width: item.width,
xOffset: item.xOffset,
yOffset: item.yOffset,
options: superjson.stringify(item.options),
advancedOptions: superjson.stringify(item.advancedOptions),
sectionId: item.sectionId,
})
.where(eq(items.id, item.id));
}
const removedSections = filterRemovedItems(input.sections, dbBoard.sections); const updatedSections = filterUpdatedItems(input.sections, dbBoard.sections);
const sectionIds = removedSections.map((section) => section.id);
if (sectionIds.length > 0) { for (const section of updatedSections) {
await transaction.delete(schema.sections).where(inArray(sections.id, sectionIds)); const prev = dbBoard.sections.find((dbSection) => dbSection.id === section.id);
} await transaction
}); .update(sections)
}, .set({
handleSync(db) { yOffset: section.yOffset,
db.transaction((transaction) => { xOffset: section.xOffset,
const addedSections = filterAddedItems(input.sections, dbBoard.sections); height: prev?.kind === "dynamic" && "height" in section ? section.height : null,
width: prev?.kind === "dynamic" && "width" in section ? section.width : null,
parentSectionId: prev?.kind === "dynamic" && "parentSectionId" in section ? section.parentSectionId : null,
name: prev?.kind === "category" && "name" in section ? section.name : null,
})
.where(eq(sections.id, section.id));
}
if (addedSections.length > 0) { const removedIntegrationRelations = dbIntegrationRelations.filter(
transaction (dbRelation) =>
.insert(sections) !inputIntegrationRelations.some(
.values(
addedSections.map((section) => ({
id: section.id,
kind: section.kind,
yOffset: section.yOffset,
xOffset: section.kind === "dynamic" ? section.xOffset : 0,
height: "height" in section ? section.height : null,
width: "width" in section ? section.width : null,
parentSectionId: "parentSectionId" in section ? section.parentSectionId : null,
name: "name" in section ? section.name : null,
boardId: dbBoard.id,
})),
)
.run();
}
const inputItems = input.sections.flatMap((section) =>
section.items.map((item) => ({ ...item, sectionId: section.id })),
);
const dbItems = dbBoard.sections.flatMap((section) =>
section.items.map((item) => ({ ...item, sectionId: section.id })),
);
const addedItems = filterAddedItems(inputItems, dbItems);
if (addedItems.length > 0) {
transaction
.insert(items)
.values(
addedItems.map((item) => ({
id: item.id,
kind: item.kind,
height: item.height,
width: item.width,
xOffset: item.xOffset,
yOffset: item.yOffset,
options: superjson.stringify(item.options),
advancedOptions: superjson.stringify(item.advancedOptions),
sectionId: item.sectionId,
})),
)
.run();
}
const inputIntegrationRelations = inputItems.flatMap(({ integrationIds, id: itemId }) =>
integrationIds.map((integrationId) => ({
integrationId,
itemId,
})),
);
const dbIntegrationRelations = dbItems.flatMap(({ integrationIds, id: itemId }) =>
integrationIds.map((integrationId) => ({
integrationId,
itemId,
})),
);
const addedIntegrationRelations = inputIntegrationRelations.filter(
(inputRelation) => (inputRelation) =>
!dbIntegrationRelations.some( dbRelation.itemId === inputRelation.itemId && dbRelation.integrationId === inputRelation.integrationId,
(dbRelation) => ),
dbRelation.itemId === inputRelation.itemId && );
dbRelation.integrationId === inputRelation.integrationId,
), for (const relation of removedIntegrationRelations) {
await transaction
.delete(integrationItems)
.where(
and(
eq(integrationItems.itemId, relation.itemId),
eq(integrationItems.integrationId, relation.integrationId),
),
); );
}
if (addedIntegrationRelations.length > 0) { const removedItems = filterRemovedItems(inputItems, dbItems);
transaction
.insert(integrationItems)
.values(
addedIntegrationRelations.map((relation) => ({
itemId: relation.itemId,
integrationId: relation.integrationId,
})),
)
.run();
}
const updatedItems = filterUpdatedItems(inputItems, dbItems); const itemIds = removedItems.map((item) => item.id);
if (itemIds.length > 0) {
await transaction.delete(items).where(inArray(items.id, itemIds));
}
for (const item of updatedItems) { const removedSections = filterRemovedItems(input.sections, dbBoard.sections);
transaction const sectionIds = removedSections.map((section) => section.id);
.update(items)
.set({
kind: item.kind,
height: item.height,
width: item.width,
xOffset: item.xOffset,
yOffset: item.yOffset,
options: superjson.stringify(item.options),
advancedOptions: superjson.stringify(item.advancedOptions),
sectionId: item.sectionId,
})
.where(eq(items.id, item.id))
.run();
}
const updatedSections = filterUpdatedItems(input.sections, dbBoard.sections); if (sectionIds.length > 0) {
await transaction.delete(sections).where(inArray(sections.id, sectionIds));
for (const section of updatedSections) { }
const prev = dbBoard.sections.find((dbSection) => dbSection.id === section.id);
transaction
.update(sections)
.set({
yOffset: section.yOffset,
xOffset: section.xOffset,
height: prev?.kind === "dynamic" && "height" in section ? section.height : null,
width: prev?.kind === "dynamic" && "width" in section ? section.width : null,
parentSectionId:
prev?.kind === "dynamic" && "parentSectionId" in section ? section.parentSectionId : null,
name: prev?.kind === "category" && "name" in section ? section.name : null,
})
.where(eq(sections.id, section.id))
.run();
}
const removedIntegrationRelations = dbIntegrationRelations.filter(
(dbRelation) =>
!inputIntegrationRelations.some(
(inputRelation) =>
dbRelation.itemId === inputRelation.itemId &&
dbRelation.integrationId === inputRelation.integrationId,
),
);
for (const relation of removedIntegrationRelations) {
transaction
.delete(integrationItems)
.where(
and(
eq(integrationItems.itemId, relation.itemId),
eq(integrationItems.integrationId, relation.integrationId),
),
)
.run();
}
const removedItems = filterRemovedItems(inputItems, dbItems);
const itemIds = removedItems.map((item) => item.id);
if (itemIds.length > 0) {
transaction.delete(items).where(inArray(items.id, itemIds)).run();
}
const removedSections = filterRemovedItems(input.sections, dbBoard.sections);
const sectionIds = removedSections.map((section) => section.id);
if (sectionIds.length > 0) {
transaction.delete(sections).where(inArray(sections.id, sectionIds)).run();
}
});
},
}); });
}), }),
@@ -874,42 +655,18 @@ export const boardRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.entityId), "full"); await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.entityId), "full");
await handleTransactionsAsync(ctx.db, { await ctx.db.transaction(async (transaction) => {
async handleAsync(db, schema) { await transaction.delete(boardUserPermissions).where(eq(boardUserPermissions.boardId, input.entityId));
await db.transaction(async (transaction) => { if (input.permissions.length === 0) {
await transaction return;
.delete(schema.boardUserPermissions) }
.where(eq(boardUserPermissions.boardId, input.entityId)); await transaction.insert(boardUserPermissions).values(
if (input.permissions.length === 0) { input.permissions.map((permission) => ({
return; userId: permission.principalId,
} permission: permission.permission,
await transaction.insert(schema.boardUserPermissions).values( boardId: input.entityId,
input.permissions.map((permission) => ({ })),
userId: permission.principalId, );
permission: permission.permission,
boardId: input.entityId,
})),
);
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction.delete(boardUserPermissions).where(eq(boardUserPermissions.boardId, input.entityId)).run();
if (input.permissions.length === 0) {
return;
}
transaction
.insert(boardUserPermissions)
.values(
input.permissions.map((permission) => ({
userId: permission.principalId,
permission: permission.permission,
boardId: input.entityId,
})),
)
.run();
});
},
}); });
}), }),
saveGroupBoardPermissions: protectedProcedure saveGroupBoardPermissions: protectedProcedure
@@ -917,42 +674,18 @@ export const boardRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.entityId), "full"); await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.entityId), "full");
await handleTransactionsAsync(ctx.db, { await ctx.db.transaction(async (transaction) => {
async handleAsync(db, schema) { await transaction.delete(boardGroupPermissions).where(eq(boardGroupPermissions.boardId, input.entityId));
await db.transaction(async (transaction) => { if (input.permissions.length === 0) {
await transaction return;
.delete(schema.boardGroupPermissions) }
.where(eq(boardGroupPermissions.boardId, input.entityId)); await transaction.insert(boardGroupPermissions).values(
if (input.permissions.length === 0) { input.permissions.map((permission) => ({
return; groupId: permission.principalId,
} permission: permission.permission,
await transaction.insert(schema.boardGroupPermissions).values( boardId: input.entityId,
input.permissions.map((permission) => ({ })),
groupId: permission.principalId, );
permission: permission.permission,
boardId: input.entityId,
})),
);
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction.delete(boardGroupPermissions).where(eq(boardGroupPermissions.boardId, input.entityId)).run();
if (input.permissions.length === 0) {
return;
}
transaction
.insert(boardGroupPermissions)
.values(
input.permissions.map((permission) => ({
groupId: permission.principalId,
permission: permission.permission,
boardId: input.entityId,
})),
)
.run();
});
},
}); });
}), }),
importOldmarrConfig: permissionRequiredProcedure importOldmarrConfig: permissionRequiredProcedure
@@ -1,27 +0,0 @@
import { z } from "zod";
import { zfd } from "zod-form-data";
import { addCustomRootCertificateAsync, removeCustomRootCertificateAsync } from "@homarr/certificates/server";
import { superRefineCertificateFile, validation } from "@homarr/validation";
import { createTRPCRouter, permissionRequiredProcedure } from "../../trpc";
export const certificateRouter = createTRPCRouter({
addCertificate: permissionRequiredProcedure
.requiresPermission("admin")
.input(
zfd.formData({
file: zfd.file().superRefine(superRefineCertificateFile),
}),
)
.mutation(async ({ input }) => {
const content = await input.file.text();
await addCustomRootCertificateAsync(input.file.name, content);
}),
removeCertificate: permissionRequiredProcedure
.requiresPermission("admin")
.input(z.object({ fileName: validation.certificates.validFileNameSchema }))
.mutation(async ({ input }) => {
await removeCustomRootCertificateAsync(input.fileName);
}),
});
@@ -3,7 +3,7 @@ import { TRPCError } from "@trpc/server";
import { objectEntries } from "@homarr/common"; import { objectEntries } from "@homarr/common";
import { decryptSecret, encryptSecret } from "@homarr/common/server"; import { decryptSecret, encryptSecret } from "@homarr/common/server";
import type { Database } from "@homarr/db"; import type { Database } from "@homarr/db";
import { and, asc, createId, eq, handleTransactionsAsync, inArray, like } from "@homarr/db"; import { and, asc, createId, eq, inArray, like } from "@homarr/db";
import { import {
groupMembers, groupMembers,
groupPermissions, groupPermissions,
@@ -130,16 +130,6 @@ export const integrationRouter = createTRPCRouter({
limit: input.limit, limit: input.limit,
}); });
}), }),
// This is used to get the integrations by their ids it's public because it's needed to get integrations data in the boards
byIds: publicProcedure.input(z.array(z.string())).query(async ({ ctx, input }) => {
return await ctx.db.query.integrations.findMany({
where: inArray(integrations.id, input),
columns: {
id: true,
kind: true,
},
});
}),
byId: protectedProcedure.input(validation.integration.byId).query(async ({ ctx, input }) => { byId: protectedProcedure.input(validation.integration.byId).query(async ({ ctx, input }) => {
await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.id), "full"); await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.id), "full");
const integration = await ctx.db.query.integrations.findFirst({ const integration = await ctx.db.query.integrations.findFirst({
@@ -370,45 +360,20 @@ export const integrationRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.entityId), "full"); await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.entityId), "full");
await handleTransactionsAsync(ctx.db, { await ctx.db.transaction(async (transaction) => {
async handleAsync(db, schema) { await transaction
await ctx.db.transaction(async (transaction) => { .delete(integrationUserPermissions)
await transaction .where(eq(integrationUserPermissions.integrationId, input.entityId));
.delete(schema.integrationUserPermissions) if (input.permissions.length === 0) {
.where(eq(schema.integrationUserPermissions.integrationId, input.entityId)); return;
if (input.permissions.length === 0) { }
return; await transaction.insert(integrationUserPermissions).values(
} input.permissions.map((permission) => ({
await transaction.insert(schema.integrationUserPermissions).values( userId: permission.principalId,
input.permissions.map((permission) => ({ permission: permission.permission,
userId: permission.principalId, integrationId: input.entityId,
permission: permission.permission, })),
integrationId: input.entityId, );
})),
);
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction
.delete(integrationUserPermissions)
.where(eq(integrationUserPermissions.integrationId, input.entityId))
.run();
if (input.permissions.length === 0) {
return;
}
transaction
.insert(integrationUserPermissions)
.values(
input.permissions.map((permission) => ({
userId: permission.principalId,
permission: permission.permission,
integrationId: input.entityId,
})),
)
.run();
});
},
}); });
}), }),
saveGroupIntegrationPermissions: protectedProcedure saveGroupIntegrationPermissions: protectedProcedure
@@ -416,45 +381,20 @@ export const integrationRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.entityId), "full"); await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.entityId), "full");
await handleTransactionsAsync(ctx.db, { await ctx.db.transaction(async (transaction) => {
async handleAsync(db, schema) { await transaction
await db.transaction(async (transaction) => { .delete(integrationGroupPermissions)
await transaction .where(eq(integrationGroupPermissions.integrationId, input.entityId));
.delete(schema.integrationGroupPermissions) if (input.permissions.length === 0) {
.where(eq(schema.integrationGroupPermissions.integrationId, input.entityId)); return;
if (input.permissions.length === 0) { }
return; await transaction.insert(integrationGroupPermissions).values(
} input.permissions.map((permission) => ({
await transaction.insert(schema.integrationGroupPermissions).values( groupId: permission.principalId,
input.permissions.map((permission) => ({ permission: permission.permission,
groupId: permission.principalId, integrationId: input.entityId,
permission: permission.permission, })),
integrationId: input.entityId, );
})),
);
});
},
handleSync(db) {
db.transaction((transaction) => {
transaction
.delete(integrationGroupPermissions)
.where(eq(integrationGroupPermissions.integrationId, input.entityId))
.run();
if (input.permissions.length === 0) {
return;
}
transaction
.insert(integrationGroupPermissions)
.values(
input.permissions.map((permission) => ({
groupId: permission.principalId,
permission: permission.permission,
integrationId: input.entityId,
})),
)
.run();
});
},
}); });
}), }),
searchInIntegration: protectedProcedure searchInIntegration: protectedProcedure
@@ -1,15 +1,15 @@
import { observable } from "@trpc/server/observable"; import { observable } from "@trpc/server/observable";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import type { HealthMonitoring } from "@homarr/integrations"; import type { HealthMonitoring } from "@homarr/integrations";
import type { ProxmoxClusterInfo } from "@homarr/integrations/types"; import { systemInfoRequestHandler } from "@homarr/request-handler/health-monitoring";
import { clusterInfoRequestHandler, systemInfoRequestHandler } from "@homarr/request-handler/health-monitoring";
import { createManyIntegrationMiddleware, createOneIntegrationMiddleware } from "../../middlewares/integration"; import { createManyIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, publicProcedure } from "../../trpc"; import { createTRPCRouter, publicProcedure } from "../../trpc";
export const healthMonitoringRouter = createTRPCRouter({ export const healthMonitoringRouter = createTRPCRouter({
getSystemHealthStatus: publicProcedure getHealthStatus: publicProcedure
.unstable_concat(createManyIntegrationMiddleware("query", "openmediavault", "dashDot")) .unstable_concat(createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("healthMonitoring")))
.query(async ({ ctx }) => { .query(async ({ ctx }) => {
return await Promise.all( return await Promise.all(
ctx.integrations.map(async (integration) => { ctx.integrations.map(async (integration) => {
@@ -25,8 +25,9 @@ export const healthMonitoringRouter = createTRPCRouter({
}), }),
); );
}), }),
subscribeSystemHealthStatus: publicProcedure
.unstable_concat(createManyIntegrationMiddleware("query", "openmediavault", "dashDot")) subscribeHealthStatus: publicProcedure
.unstable_concat(createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("healthMonitoring")))
.subscription(({ ctx }) => { .subscription(({ ctx }) => {
return observable<{ integrationId: string; healthInfo: HealthMonitoring; timestamp: Date }>((emit) => { return observable<{ integrationId: string; healthInfo: HealthMonitoring; timestamp: Date }>((emit) => {
const unsubscribes: (() => void)[] = []; const unsubscribes: (() => void)[] = [];
@@ -48,26 +49,4 @@ export const healthMonitoringRouter = createTRPCRouter({
}; };
}); });
}), }),
getClusterHealthStatus: publicProcedure
.unstable_concat(createOneIntegrationMiddleware("query", "proxmox"))
.query(async ({ ctx }) => {
const innerHandler = clusterInfoRequestHandler.handler(ctx.integration, {});
const { data } = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
return data;
}),
subscribeClusterHealthStatus: publicProcedure
.unstable_concat(createOneIntegrationMiddleware("query", "proxmox"))
.subscription(({ ctx }) => {
return observable<ProxmoxClusterInfo>((emit) => {
const unsubscribes: (() => void)[] = [];
const innerHandler = clusterInfoRequestHandler.handler(ctx.integration, {});
const unsubscribe = innerHandler.subscribe((healthInfo) => {
emit.next(healthInfo);
});
unsubscribes.push(unsubscribe);
return () => {
unsubscribe();
};
});
}),
}); });
-9
View File
@@ -1,9 +0,0 @@
import baseConfig from "@homarr/eslint-config/base";
/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: [],
},
...baseConfig,
];
-35
View File
@@ -1,35 +0,0 @@
{
"name": "@homarr/certificates",
"version": "0.1.0",
"private": true,
"license": "MIT",
"type": "module",
"exports": {
"./server": "./src/server.ts"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit"
},
"prettier": "@homarr/prettier-config",
"dependencies": {
"@homarr/common": "workspace:^0.1.0",
"undici": "7.2.3"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^9.18.0",
"typescript": "^5.7.3"
}
}
-87
View File
@@ -1,87 +0,0 @@
import fsSync from "node:fs";
import fs from "node:fs/promises";
import { Agent } from "node:https";
import path from "node:path";
import { rootCertificates } from "node:tls";
import axios from "axios";
import { fetch } from "undici";
import { LoggingAgent } from "@homarr/common/server";
const getCertificateFolder = () => {
return process.env.NODE_ENV === "production"
? path.join("/appdata", "trusted-certificates")
: process.env.LOCAL_CERTIFICATE_PATH;
};
export const loadCustomRootCertificatesAsync = async () => {
const folder = getCertificateFolder();
if (!folder) {
return [];
}
if (!fsSync.existsSync(folder)) {
await fs.mkdir(folder, { recursive: true });
}
const dirContent = await fs.readdir(folder);
return await Promise.all(
dirContent
.filter((file) => file.endsWith(".crt"))
.map(async (file) => ({
content: await fs.readFile(path.join(folder, file), "utf8"),
fileName: file,
})),
);
};
export const removeCustomRootCertificateAsync = async (fileName: string) => {
const folder = getCertificateFolder();
if (!folder) {
return;
}
await fs.rm(path.join(folder, fileName));
};
export const addCustomRootCertificateAsync = async (fileName: string, content: string) => {
const folder = getCertificateFolder();
if (!folder) {
throw new Error(
"When you want to use custom certificates locally you need to set LOCAL_CERTIFICATE_PATH to an absolute path",
);
}
if (fileName.includes("/")) {
throw new Error("Invalid file name");
}
await fs.writeFile(path.join(folder, fileName), content);
};
export const createCertificateAgentAsync = async () => {
const customCertificates = await loadCustomRootCertificatesAsync();
return new LoggingAgent({
connect: {
ca: rootCertificates.concat(customCertificates.map((cert) => cert.content)),
},
});
};
export const createAxiosCertificateInstanceAsync = async () => {
const customCertificates = await loadCustomRootCertificatesAsync();
return axios.create({
httpsAgent: new Agent({
ca: rootCertificates.concat(customCertificates.map((cert) => cert.content)),
}),
});
};
export const fetchWithTrustedCertificatesAsync: typeof fetch = async (url, options) => {
const agent = await createCertificateAgentAsync();
return fetch(url, {
...options,
dispatcher: agent,
});
};
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["*.ts", "src"],
"exclude": ["node_modules"]
}
-1
View File
@@ -32,7 +32,6 @@
"next": "15.1.4", "next": "15.1.4",
"react": "19.0.0", "react": "19.0.0",
"react-dom": "19.0.0", "react-dom": "19.0.0",
"undici": "7.2.3",
"zod": "^3.24.1" "zod": "^3.24.1"
}, },
"devDependencies": { "devDependencies": {
-32
View File
@@ -1,32 +0,0 @@
import type { Dispatcher } from "undici";
import { Agent } from "undici";
import { logger } from "@homarr/log";
export class LoggingAgent extends Agent {
constructor(...props: ConstructorParameters<typeof Agent>) {
super(...props);
}
dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
const url = new URL(`${options.origin as string}${options.path}`);
// The below code should prevent sensitive data from being logged as
// some integrations use query parameters for auth
url.searchParams.forEach((value, key) => {
if (value === "") return; // Skip empty values
if (/^-?\d{1,12}$/.test(value)) return; // Skip small numbers
if (value === "true" || value === "false") return; // Skip boolean values
if (/^[a-zA-Z]{1,12}$/.test(value)) return; // Skip short strings
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) return; // Skip dates
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(value)) return; // Skip date times
url.searchParams.set(key, "REDACTED");
});
logger.info(
`Dispatching request ${url.toString().replaceAll("=&", "&")} (${Object.keys(options.headers ?? {}).length} headers)`,
);
return super.dispatch(options, handler);
}
}
-1
View File
@@ -1,4 +1,3 @@
export * from "./security"; export * from "./security";
export * from "./encryption"; export * from "./encryption";
export * from "./user-agent"; export * from "./user-agent";
export * from "./fetch-agent";
+35 -73
View File
@@ -1,7 +1,7 @@
import { splitToNChunks, Stopwatch } from "@homarr/common"; import { splitToNChunks, Stopwatch } from "@homarr/common";
import { EVERY_WEEK } from "@homarr/cron-jobs-core/expressions"; import { EVERY_WEEK } from "@homarr/cron-jobs-core/expressions";
import type { InferInsertModel } from "@homarr/db"; import type { InferInsertModel } from "@homarr/db";
import { db, handleTransactionsAsync, inArray, sql } from "@homarr/db"; import { db, inArray, sql } from "@homarr/db";
import { createId } from "@homarr/db/client"; import { createId } from "@homarr/db/client";
import { iconRepositories, icons } from "@homarr/db/schema"; import { iconRepositories, icons } from "@homarr/db/schema";
import { fetchIconsAsync } from "@homarr/icons"; import { fetchIconsAsync } from "@homarr/icons";
@@ -83,81 +83,43 @@ export const iconsUpdaterJob = createCronJob("iconsUpdater", EVERY_WEEK, {
(iconRepository) => !repositoryIconGroups.some((group) => group.slug === iconRepository.slug), (iconRepository) => !repositoryIconGroups.some((group) => group.slug === iconRepository.slug),
); );
await handleTransactionsAsync(db, { db.transaction((transaction) => {
async handleAsync(db, schema) { if (newIconRepositories.length >= 1) {
await db.transaction(async (transaction) => { transaction.insert(iconRepositories).values(newIconRepositories).run();
if (newIconRepositories.length >= 1) { }
await transaction.insert(schema.iconRepositories).values(newIconRepositories);
}
if (newIcons.length >= 1) { if (newIcons.length >= 1) {
// We only insert 5000 icons at a time to avoid SQLite limitations // We only insert 5000 icons at a time to avoid SQLite limitations
for (const chunck of splitToNChunks(newIcons, Math.ceil(newIcons.length / 5000))) { for (const chunck of splitToNChunks(newIcons, Math.ceil(newIcons.length / 5000))) {
await transaction.insert(schema.icons).values(chunck); transaction.insert(icons).values(chunck).run();
} }
} }
if (deadIcons.length >= 1) { if (deadIcons.length >= 1) {
await transaction.delete(schema.icons).where( transaction
inArray( .delete(icons)
// Combine iconRepositoryId and checksum to allow same icons on different repositories .where(
sql`concat(${icons.iconRepositoryId}, '.', ${icons.checksum})`, inArray(
deadIcons.map((icon) => `${icon.iconRepositoryId}.${icon.checksum}`), // Combine iconRepositoryId and checksum to allow same icons on different repositories
), sql`concat(${icons.iconRepositoryId}, '.', ${icons.checksum})`,
); deadIcons.map((icon) => `${icon.iconRepositoryId}.${icon.checksum}`),
} ),
)
.run();
}
if (deadIconRepositories.length >= 1) { if (deadIconRepositories.length >= 1) {
await transaction.delete(schema.iconRepositories).where( transaction
inArray( .delete(iconRepositories)
iconRepositories.id, .where(
deadIconRepositories.map((iconRepository) => iconRepository.id), inArray(
), iconRepositories.id,
); deadIconRepositories.map((iconRepository) => iconRepository.id),
} ),
)
.run();
}
countDeleted += deadIcons.length; countDeleted += deadIcons.length;
});
},
handleSync() {
db.transaction((transaction) => {
if (newIconRepositories.length >= 1) {
transaction.insert(iconRepositories).values(newIconRepositories).run();
}
if (newIcons.length >= 1) {
// We only insert 5000 icons at a time to avoid SQLite limitations
for (const chunck of splitToNChunks(newIcons, Math.ceil(newIcons.length / 5000))) {
transaction.insert(icons).values(chunck).run();
}
}
if (deadIcons.length >= 1) {
transaction
.delete(icons)
.where(
inArray(
// Combine iconRepositoryId and checksum to allow same icons on different repositories
sql`concat(${icons.iconRepositoryId}, '.', ${icons.checksum})`,
deadIcons.map((icon) => `${icon.iconRepositoryId}.${icon.checksum}`),
),
)
.run();
}
if (deadIconRepositories.length >= 1) {
transaction
.delete(iconRepositories)
.where(
inArray(
iconRepositories.id,
deadIconRepositories.map((iconRepository) => iconRepository.id),
),
)
.run();
}
countDeleted += deadIcons.length;
});
},
}); });
logger.info(`Updated database within ${stopWatch.getElapsedInHumanWords()} (-${countDeleted}, +${countInserted})`); logger.info(`Updated database within ${stopWatch.getElapsedInHumanWords()} (-${countDeleted}, +${countInserted})`);
@@ -1,23 +1,14 @@
import { EVERY_5_SECONDS } from "@homarr/cron-jobs-core/expressions"; import { EVERY_5_SECONDS } from "@homarr/cron-jobs-core/expressions";
import { clusterInfoRequestHandler, systemInfoRequestHandler } from "@homarr/request-handler/health-monitoring"; import { systemInfoRequestHandler } from "@homarr/request-handler/health-monitoring";
import { createRequestIntegrationJobHandler } from "@homarr/request-handler/lib/cached-request-integration-job-handler"; import { createRequestIntegrationJobHandler } from "@homarr/request-handler/lib/cached-request-integration-job-handler";
import { createCronJob } from "../../lib"; import { createCronJob } from "../../lib";
export const healthMonitoringJob = createCronJob("healthMonitoring", EVERY_5_SECONDS).withCallback( export const healthMonitoringJob = createCronJob("healthMonitoring", EVERY_5_SECONDS).withCallback(
createRequestIntegrationJobHandler( createRequestIntegrationJobHandler(systemInfoRequestHandler.handler, {
(integration, itemOptions: Record<string, never>) => { widgetKinds: ["healthMonitoring"],
const { kind } = integration; getInput: {
if (kind !== "proxmox") { healthMonitoring: () => ({}),
return systemInfoRequestHandler.handler({ ...integration, kind }, itemOptions);
}
return clusterInfoRequestHandler.handler({ ...integration, kind }, itemOptions);
}, },
{ }),
widgetKinds: ["healthMonitoring"],
getInput: {
healthMonitoring: () => ({}),
},
},
),
); );
+1 -3
View File
@@ -2,7 +2,6 @@ import Database from "better-sqlite3";
import type { Logger } from "drizzle-orm"; import type { Logger } from "drizzle-orm";
import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3"; import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
import { drizzle as drizzleSqlite } from "drizzle-orm/better-sqlite3"; import { drizzle as drizzleSqlite } from "drizzle-orm/better-sqlite3";
import type { MySql2Database } from "drizzle-orm/mysql2";
import { drizzle as drizzleMysql } from "drizzle-orm/mysql2"; import { drizzle as drizzleMysql } from "drizzle-orm/mysql2";
import mysql from "mysql2"; import mysql from "mysql2";
@@ -12,8 +11,7 @@ import { env } from "./env";
import * as mysqlSchema from "./schema/mysql"; import * as mysqlSchema from "./schema/mysql";
import * as sqliteSchema from "./schema/sqlite"; import * as sqliteSchema from "./schema/sqlite";
export type HomarrDatabase = BetterSQLite3Database<typeof sqliteSchema>; type HomarrDatabase = BetterSQLite3Database<typeof sqliteSchema>;
export type HomarrDatabaseMysql = MySql2Database<typeof mysqlSchema>;
const init = () => { const init = () => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
-2
View File
@@ -7,7 +7,5 @@ export * from "drizzle-orm";
export const db = database; export const db = database;
export type Database = typeof db; export type Database = typeof db;
export type { HomarrDatabaseMysql } from "./driver";
export { createId } from "@paralleldrive/cuid2"; export { createId } from "@paralleldrive/cuid2";
export { handleDiffrentDbDriverOperationsAsync as handleTransactionsAsync } from "./transactions";
+3 -3
View File
@@ -45,10 +45,10 @@
"@paralleldrive/cuid2": "^2.2.2", "@paralleldrive/cuid2": "^2.2.2",
"@t3-oss/env-nextjs": "^0.11.1", "@t3-oss/env-nextjs": "^0.11.1",
"@testcontainers/mysql": "^10.16.0", "@testcontainers/mysql": "^10.16.0",
"better-sqlite3": "^11.8.0", "better-sqlite3": "^11.7.2",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"drizzle-kit": "^0.30.2", "drizzle-kit": "^0.30.1",
"drizzle-orm": "^0.38.4", "drizzle-orm": "^0.38.3",
"drizzle-zod": "^0.6.1", "drizzle-zod": "^0.6.1",
"mysql2": "3.12.0" "mysql2": "3.12.0"
}, },
-24
View File
@@ -1,24 +0,0 @@
import type { HomarrDatabase, HomarrDatabaseMysql } from "./driver";
import { env } from "./env";
import * as mysqlSchema from "./schema/mysql";
type MysqlSchema = typeof mysqlSchema;
interface HandleTransactionInput {
handleAsync: (db: HomarrDatabaseMysql, schema: MysqlSchema) => Promise<void>;
handleSync: (db: HomarrDatabase) => void;
}
/**
* The below method is mostly used to handle transactions in different database drivers.
* As better-sqlite3 transactions have to be synchronous, we have to implement them in a different way.
* But it can also generally be used when dealing with different database drivers.
*/
export const handleDiffrentDbDriverOperationsAsync = async (db: HomarrDatabase, input: HandleTransactionInput) => {
if (env.DB_DRIVER !== "mysql2") {
input.handleSync(db);
return;
}
await input.handleAsync(db as unknown as HomarrDatabaseMysql, mysqlSchema);
};
+1 -1
View File
@@ -1,6 +1,6 @@
import type { HomarrDocumentationPath } from "./homarr-docs-sitemap"; import type { HomarrDocumentationPath } from "./homarr-docs-sitemap";
const documentationBaseUrl = "https://homarr.dev"; const documentationBaseUrl = "https://deploy-preview-113--homarr-docs.netlify.app";
// Please use the method so the path can be checked! // Please use the method so the path can be checked!
export const createDocumentationLink = (path: HomarrDocumentationPath, hashTag?: `#${string}`) => export const createDocumentationLink = (path: HomarrDocumentationPath, hashTag?: `#${string}`) =>
-8
View File
@@ -5,8 +5,6 @@ export const integrationSecretKindObject = {
apiKey: { isPublic: false }, apiKey: { isPublic: false },
username: { isPublic: true }, username: { isPublic: true },
password: { isPublic: false }, password: { isPublic: false },
tokenId: { isPublic: true },
realm: { isPublic: true },
} satisfies Record<string, { isPublic: boolean }>; } satisfies Record<string, { isPublic: boolean }>;
export const integrationSecretKinds = objectKeys(integrationSecretKindObject); export const integrationSecretKinds = objectKeys(integrationSecretKindObject);
@@ -139,12 +137,6 @@ export const integrationDefs = {
category: ["mediaTranscoding"], category: ["mediaTranscoding"],
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/tdarr.png", iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/tdarr.png",
}, },
proxmox: {
name: "Proxmox",
secretKinds: [["username", "tokenId", "apiKey", "realm"]],
category: ["healthMonitoring"],
iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/proxmox.png",
},
} as const satisfies Record<string, integrationDefinition>; } as const satisfies Record<string, integrationDefinition>;
export const integrationKinds = objectKeys(integrationDefs) as AtLeastOneOf<IntegrationKind>; export const integrationKinds = objectKeys(integrationDefs) as AtLeastOneOf<IntegrationKind>;
-3
View File
@@ -27,7 +27,6 @@
"@ctrl/deluge": "^7.1.0", "@ctrl/deluge": "^7.1.0",
"@ctrl/qbittorrent": "^9.2.0", "@ctrl/qbittorrent": "^9.2.0",
"@ctrl/transmission": "^7.2.0", "@ctrl/transmission": "^7.2.0",
"@homarr/certificates": "workspace:^0.1.0",
"@homarr/common": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0",
"@homarr/db": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0",
"@homarr/definitions": "workspace:^0.1.0", "@homarr/definitions": "workspace:^0.1.0",
@@ -36,8 +35,6 @@
"@homarr/translation": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0", "@homarr/validation": "workspace:^0.1.0",
"@jellyfin/sdk": "^0.11.0", "@jellyfin/sdk": "^0.11.0",
"proxmox-api": "1.1.1",
"undici": "7.2.3",
"xml2js": "^0.6.2" "xml2js": "^0.6.2"
}, },
"devDependencies": { "devDependencies": {
@@ -1,5 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
import { IntegrationTestConnectionError } from "../base/test-connection-error"; import { IntegrationTestConnectionError } from "../base/test-connection-error";
import type { DnsHoleSummaryIntegration } from "../interfaces/dns-hole-summary/dns-hole-summary-integration"; import type { DnsHoleSummaryIntegration } from "../interfaces/dns-hole-summary/dns-hole-summary-integration";
@@ -8,7 +6,7 @@ import { filteringStatusSchema, statsResponseSchema, statusResponseSchema } from
export class AdGuardHomeIntegration extends Integration implements DnsHoleSummaryIntegration { export class AdGuardHomeIntegration extends Integration implements DnsHoleSummaryIntegration {
public async getSummaryAsync(): Promise<DnsHoleSummary> { public async getSummaryAsync(): Promise<DnsHoleSummary> {
const statsResponse = await fetchWithTrustedCertificatesAsync(this.url("/control/stats"), { const statsResponse = await fetch(this.url("/control/stats"), {
headers: { headers: {
Authorization: `Basic ${this.getAuthorizationHeaderValue()}`, Authorization: `Basic ${this.getAuthorizationHeaderValue()}`,
}, },
@@ -20,7 +18,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
); );
} }
const statusResponse = await fetchWithTrustedCertificatesAsync(this.url("/control/status"), { const statusResponse = await fetch(this.url("/control/status"), {
headers: { headers: {
Authorization: `Basic ${this.getAuthorizationHeaderValue()}`, Authorization: `Basic ${this.getAuthorizationHeaderValue()}`,
}, },
@@ -32,7 +30,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
); );
} }
const filteringStatusResponse = await fetchWithTrustedCertificatesAsync(this.url("/control/filtering/status"), { const filteringStatusResponse = await fetch(this.url("/control/filtering/status"), {
headers: { headers: {
Authorization: `Basic ${this.getAuthorizationHeaderValue()}`, Authorization: `Basic ${this.getAuthorizationHeaderValue()}`,
}, },
@@ -88,7 +86,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/control/status"), { return await fetch(this.url("/control/status"), {
headers: { headers: {
Authorization: `Basic ${this.getAuthorizationHeaderValue()}`, Authorization: `Basic ${this.getAuthorizationHeaderValue()}`,
}, },
@@ -96,7 +94,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
}, },
handleResponseAsync: async (response) => { handleResponseAsync: async (response) => {
try { try {
const result = await response.json(); const result = (await response.json()) as unknown;
if (typeof result === "object" && result !== null) return; if (typeof result === "object" && result !== null) return;
} catch { } catch {
throw new IntegrationTestConnectionError("invalidJson"); throw new IntegrationTestConnectionError("invalidJson");
@@ -108,7 +106,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
} }
public async enableAsync(): Promise<void> { public async enableAsync(): Promise<void> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/control/protection"), { const response = await fetch(this.url("/control/protection"), {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -126,7 +124,7 @@ export class AdGuardHomeIntegration extends Integration implements DnsHoleSummar
} }
public async disableAsync(duration = 0): Promise<void> { public async disableAsync(duration = 0): Promise<void> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/control/protection"), { const response = await fetch(this.url("/control/protection"), {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -23,7 +23,6 @@ import { OverseerrIntegration } from "../overseerr/overseerr-integration";
import { PiHoleIntegration } from "../pi-hole/pi-hole-integration"; import { PiHoleIntegration } from "../pi-hole/pi-hole-integration";
import { PlexIntegration } from "../plex/plex-integration"; import { PlexIntegration } from "../plex/plex-integration";
import { ProwlarrIntegration } from "../prowlarr/prowlarr-integration"; import { ProwlarrIntegration } from "../prowlarr/prowlarr-integration";
import { ProxmoxIntegration } from "../proxmox/proxmox-integration";
import type { Integration, IntegrationInput } from "./integration"; import type { Integration, IntegrationInput } from "./integration";
export const integrationCreator = <TKind extends keyof typeof integrationCreators>( export const integrationCreator = <TKind extends keyof typeof integrationCreators>(
@@ -73,5 +72,4 @@ export const integrationCreators = {
readarr: ReadarrIntegration, readarr: ReadarrIntegration,
dashDot: DashDotIntegration, dashDot: DashDotIntegration,
tdarr: TdarrIntegration, tdarr: TdarrIntegration,
proxmox: ProxmoxIntegration,
} satisfies Record<IntegrationKind, new (integration: IntegrationInput) => Integration>; } satisfies Record<IntegrationKind, new (integration: IntegrationInput) => Integration>;
@@ -1,5 +1,3 @@
import type { Response } from "undici";
import { extractErrorMessage, removeTrailingSlash } from "@homarr/common"; import { extractErrorMessage, removeTrailingSlash } from "@homarr/common";
import type { IntegrationSecretKind } from "@homarr/definitions"; import type { IntegrationSecretKind } from "@homarr/definitions";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
@@ -4,7 +4,6 @@ import "@homarr/redis";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
import { createChannelEventHistory } from "../../../redis/src/lib/channel"; import { createChannelEventHistory } from "../../../redis/src/lib/channel";
@@ -13,7 +12,7 @@ import type { HealthMonitoring } from "../types";
export class DashDotIntegration extends Integration { export class DashDotIntegration extends Integration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/info")); const response = await fetch(this.url("/info"));
await response.json(); await response.json();
} }
@@ -53,7 +52,7 @@ export class DashDotIntegration extends Integration {
} }
private async getInfoAsync() { private async getInfoAsync() {
const infoResponse = await fetchWithTrustedCertificatesAsync(this.url("/info")); const infoResponse = await fetch(this.url("/info"));
const serverInfo = await internalServerInfoApi.parseAsync(await infoResponse.json()); const serverInfo = await internalServerInfoApi.parseAsync(await infoResponse.json());
return { return {
maxAvailableMemoryBytes: serverInfo.ram.size, maxAvailableMemoryBytes: serverInfo.ram.size,
@@ -67,7 +66,7 @@ export class DashDotIntegration extends Integration {
private async getCurrentCpuLoadAsync() { private async getCurrentCpuLoadAsync() {
const channel = this.getChannel(); const channel = this.getChannel();
const cpu = await fetchWithTrustedCertificatesAsync(this.url("/load/cpu")); const cpu = await fetch(this.url("/load/cpu"));
const data = await cpuLoadPerCoreApiList.parseAsync(await cpu.json()); const data = await cpuLoadPerCoreApiList.parseAsync(await cpu.json());
await channel.pushAsync(data); await channel.pushAsync(data);
return { return {
@@ -89,12 +88,12 @@ export class DashDotIntegration extends Integration {
} }
private async getCurrentStorageLoadAsync() { private async getCurrentStorageLoadAsync() {
const storageLoad = await fetchWithTrustedCertificatesAsync(this.url("/load/storage")); const storageLoad = await fetch(this.url("/load/storage"));
return (await storageLoad.json()) as number[]; return (await storageLoad.json()) as number[];
} }
private async getCurrentMemoryLoadAsync() { private async getCurrentMemoryLoadAsync() {
const memoryLoad = await fetchWithTrustedCertificatesAsync(this.url("/load/ram")); const memoryLoad = await fetch(this.url("/load/ram"));
const data = await memoryLoadApi.parseAsync(await memoryLoad.json()); const data = await memoryLoadApi.parseAsync(await memoryLoad.json());
return { return {
loadInBytes: data.load, loadInBytes: data.load,
@@ -1,8 +1,6 @@
import { Deluge } from "@ctrl/deluge"; import { Deluge } from "@ctrl/deluge";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { createCertificateAgentAsync } from "@homarr/certificates/server";
import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data";
import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration";
import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items";
@@ -10,13 +8,13 @@ import type { DownloadClientStatus } from "../../interfaces/downloads/download-c
export class DelugeIntegration extends DownloadClientIntegration { export class DelugeIntegration extends DownloadClientIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const client = await this.getClientAsync(); const client = this.getClient();
await client.login(); await client.login();
} }
public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> { public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> {
const type = "torrent"; const type = "torrent";
const client = await this.getClientAsync(); const client = this.getClient();
const { const {
stats: { download_rate, upload_rate }, stats: { download_rate, upload_rate },
torrents: rawTorrents, torrents: rawTorrents,
@@ -59,7 +57,7 @@ export class DelugeIntegration extends DownloadClientIntegration {
} }
public async pauseQueueAsync() { public async pauseQueueAsync() {
const client = await this.getClientAsync(); const client = this.getClient();
const store = (await client.listTorrents()).result.torrents; const store = (await client.listTorrents()).result.torrents;
await Promise.all( await Promise.all(
Object.entries(store).map(async ([id]) => { Object.entries(store).map(async ([id]) => {
@@ -69,12 +67,11 @@ export class DelugeIntegration extends DownloadClientIntegration {
} }
public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> { public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().pauseTorrent(id);
await client.pauseTorrent(id);
} }
public async resumeQueueAsync() { public async resumeQueueAsync() {
const client = await this.getClientAsync(); const client = this.getClient();
const store = (await client.listTorrents()).result.torrents; const store = (await client.listTorrents()).result.torrents;
await Promise.all( await Promise.all(
Object.entries(store).map(async ([id]) => { Object.entries(store).map(async ([id]) => {
@@ -84,20 +81,17 @@ export class DelugeIntegration extends DownloadClientIntegration {
} }
public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> { public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().resumeTorrent(id);
await client.resumeTorrent(id);
} }
public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> { public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().removeTorrent(id, fromDisk);
await client.removeTorrent(id, fromDisk);
} }
private async getClientAsync() { private getClient() {
return new Deluge({ return new Deluge({
baseUrl: this.url("/").toString(), baseUrl: this.url("/").toString(),
password: this.getSecretValue("password"), password: this.getSecretValue("password"),
dispatcher: await createCertificateAgentAsync(),
}); });
} }
@@ -1,7 +1,5 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data";
import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration";
import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items";
@@ -98,7 +96,7 @@ export class NzbGetIntegration extends DownloadClientIntegration {
const password = this.getSecretValue("password"); const password = this.getSecretValue("password");
const url = this.url(`/${username}:${password}/jsonrpc`); const url = this.url(`/${username}:${password}/jsonrpc`);
const body = JSON.stringify({ method, params }); const body = JSON.stringify({ method, params });
return await fetchWithTrustedCertificatesAsync(url, { method: "POST", body }) return await fetch(url, { method: "POST", body })
.then(async (response) => { .then(async (response) => {
if (!response.ok) { if (!response.ok) {
throw new Error(response.statusText); throw new Error(response.statusText);
@@ -1,8 +1,6 @@
import { QBittorrent } from "@ctrl/qbittorrent"; import { QBittorrent } from "@ctrl/qbittorrent";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { createCertificateAgentAsync } from "@homarr/certificates/server";
import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data";
import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration";
import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items";
@@ -10,13 +8,13 @@ import type { DownloadClientStatus } from "../../interfaces/downloads/download-c
export class QBitTorrentIntegration extends DownloadClientIntegration { export class QBitTorrentIntegration extends DownloadClientIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const client = await this.getClientAsync(); const client = this.getClient();
await client.login(); await client.login();
} }
public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> { public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> {
const type = "torrent"; const type = "torrent";
const client = await this.getClientAsync(); const client = this.getClient();
const torrents = await client.listTorrents(); const torrents = await client.listTorrents();
const rates = torrents.reduce( const rates = torrents.reduce(
({ down, up }, { dlspeed, upspeed }) => ({ down: down + dlspeed, up: up + upspeed }), ({ down, up }, { dlspeed, upspeed }) => ({ down: down + dlspeed, up: up + upspeed }),
@@ -52,36 +50,30 @@ export class QBitTorrentIntegration extends DownloadClientIntegration {
} }
public async pauseQueueAsync() { public async pauseQueueAsync() {
const client = await this.getClientAsync(); await this.getClient().pauseTorrent("all");
await client.pauseTorrent("all");
} }
public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> { public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().pauseTorrent(id);
await client.pauseTorrent(id);
} }
public async resumeQueueAsync() { public async resumeQueueAsync() {
const client = await this.getClientAsync(); await this.getClient().resumeTorrent("all");
await client.resumeTorrent("all");
} }
public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> { public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().resumeTorrent(id);
await client.resumeTorrent(id);
} }
public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> { public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().removeTorrent(id, fromDisk);
await client.removeTorrent(id, fromDisk);
} }
private async getClientAsync() { private getClient() {
return new QBittorrent({ return new QBittorrent({
baseUrl: this.url("/").toString(), baseUrl: this.url("/").toString(),
username: this.getSecretValue("username"), username: this.getSecretValue("username"),
password: this.getSecretValue("password"), password: this.getSecretValue("password"),
dispatcher: await createCertificateAgentAsync(),
}); });
} }
@@ -1,8 +1,6 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import duration from "dayjs/plugin/duration"; import duration from "dayjs/plugin/duration";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data";
import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration";
import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items";
@@ -108,12 +106,12 @@ export class SabnzbdIntegration extends DownloadClientIntegration {
apikey: this.getSecretValue("apiKey"), apikey: this.getSecretValue("apiKey"),
}); });
return await fetchWithTrustedCertificatesAsync(url) return await fetch(url)
.then((response) => { .then((response) => {
if (!response.ok) { if (!response.ok) {
throw new Error(response.statusText); throw new Error(response.statusText);
} }
return response.json(); return response.json() as Promise<unknown>;
}) })
.catch((error) => { .catch((error) => {
if (error instanceof Error) { if (error instanceof Error) {
@@ -1,8 +1,6 @@
import { Transmission } from "@ctrl/transmission"; import { Transmission } from "@ctrl/transmission";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { createCertificateAgentAsync } from "@homarr/certificates/server";
import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data";
import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration";
import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items";
@@ -10,13 +8,12 @@ import type { DownloadClientStatus } from "../../interfaces/downloads/download-c
export class TransmissionIntegration extends DownloadClientIntegration { export class TransmissionIntegration extends DownloadClientIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().getSession();
await client.getSession();
} }
public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> { public async getClientJobsAndStatusAsync(): Promise<DownloadClientJobsAndStatus> {
const type = "torrent"; const type = "torrent";
const client = await this.getClientAsync(); const client = this.getClient();
const { torrents } = (await client.listTorrents()).arguments; const { torrents } = (await client.listTorrents()).arguments;
const rates = torrents.reduce( const rates = torrents.reduce(
({ down, up }, { rateDownload, rateUpload }) => ({ down: down + rateDownload, up: up + rateUpload }), ({ down, up }, { rateDownload, rateUpload }) => ({ down: down + rateDownload, up: up + rateUpload }),
@@ -50,38 +47,34 @@ export class TransmissionIntegration extends DownloadClientIntegration {
} }
public async pauseQueueAsync() { public async pauseQueueAsync() {
const client = await this.getClientAsync(); const client = this.getClient();
const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString); const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString);
await client.pauseTorrent(ids); await this.getClient().pauseTorrent(ids);
} }
public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> { public async pauseItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().pauseTorrent(id);
await client.pauseTorrent(id);
} }
public async resumeQueueAsync() { public async resumeQueueAsync() {
const client = await this.getClientAsync(); const client = this.getClient();
const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString); const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString);
await client.resumeTorrent(ids); await this.getClient().resumeTorrent(ids);
} }
public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> { public async resumeItemAsync({ id }: DownloadClientItem): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().resumeTorrent(id);
await client.resumeTorrent(id);
} }
public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> { public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise<void> {
const client = await this.getClientAsync(); await this.getClient().removeTorrent(id, fromDisk);
await client.removeTorrent(id, fromDisk);
} }
private async getClientAsync() { private getClient() {
return new Transmission({ return new Transmission({
baseUrl: this.url("/").toString(), baseUrl: this.url("/").toString(),
username: this.getSecretValue("username"), username: this.getSecretValue("username"),
password: this.getSecretValue("password"), password: this.getSecretValue("password"),
dispatcher: await createCertificateAgentAsync(),
}); });
} }
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
@@ -8,7 +7,7 @@ export class HomeAssistantIntegration extends Integration {
public async getEntityStateAsync(entityId: string) { public async getEntityStateAsync(entityId: string) {
try { try {
const response = await this.getAsync(`/api/states/${entityId}`); const response = await this.getAsync(`/api/states/${entityId}`);
const body = await response.json(); const body = (await response.json()) as unknown;
if (!response.ok) { if (!response.ok) {
logger.warn(`Response did not indicate success`); logger.warn(`Response did not indicate success`);
return { return {
@@ -72,7 +71,7 @@ export class HomeAssistantIntegration extends Integration {
* @returns the response from the API * @returns the response from the API
*/ */
private async getAsync(path: `/api/${string}`) { private async getAsync(path: `/api/${string}`) {
return await fetchWithTrustedCertificatesAsync(this.url(path), { return await fetch(this.url(path), {
headers: this.getAuthHeaders(), headers: this.getAuthHeaders(),
}); });
} }
@@ -85,7 +84,7 @@ export class HomeAssistantIntegration extends Integration {
* @returns the response from the API * @returns the response from the API
*/ */
private async postAsync(path: `/api/${string}`, body: Record<string, string>) { private async postAsync(path: `/api/${string}`, body: Record<string, string>) {
return await fetchWithTrustedCertificatesAsync(this.url(path), { return await fetch(this.url(path), {
headers: this.getAuthHeaders(), headers: this.getAuthHeaders(),
body: JSON.stringify(body), body: JSON.stringify(body),
method: "POST", method: "POST",
@@ -2,8 +2,6 @@ import { Jellyfin } from "@jellyfin/sdk";
import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api"; import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api";
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api"; import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api";
import { createAxiosCertificateInstanceAsync } from "@homarr/certificates/server";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
import type { StreamSession } from "../interfaces/media-server/session"; import type { StreamSession } from "../interfaces/media-server/session";
@@ -67,13 +65,12 @@ export class JellyfinIntegration extends Integration {
* @returns An instance of Api that has been authenticated * @returns An instance of Api that has been authenticated
*/ */
private async getApiAsync() { private async getApiAsync() {
const httpsAgent = await createAxiosCertificateInstanceAsync();
if (this.hasSecretValue("apiKey")) { if (this.hasSecretValue("apiKey")) {
const apiKey = this.getSecretValue("apiKey"); const apiKey = this.getSecretValue("apiKey");
return this.jellyfin.createApi(this.url("/").toString(), apiKey, httpsAgent); return this.jellyfin.createApi(this.url("/").toString(), apiKey);
} }
const apiClient = this.jellyfin.createApi(this.url("/").toString(), undefined, httpsAgent); const apiClient = this.jellyfin.createApi(this.url("/").toString());
// Authentication state is stored internally in the Api class, so now // Authentication state is stored internally in the Api class, so now
// requests that require authentication can be made normally. // requests that require authentication can be made normally.
// see https://typescript-sdk.jellyfin.org/#usage // see https://typescript-sdk.jellyfin.org/#usage
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
@@ -9,7 +8,7 @@ export class LidarrIntegration extends MediaOrganizerIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/api"), { return await fetch(this.url("/api"), {
headers: { "X-Api-Key": super.getSecretValue("apiKey") }, headers: { "X-Api-Key": super.getSecretValue("apiKey") },
}); });
}, },
@@ -29,7 +28,7 @@ export class LidarrIntegration extends MediaOrganizerIntegration {
unmonitored: includeUnmonitored, unmonitored: includeUnmonitored,
}); });
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
headers: { headers: {
"X-Api-Key": super.getSecretValue("apiKey"), "X-Api-Key": super.getSecretValue("apiKey"),
}, },
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import type { AtLeastOneOf } from "@homarr/common/types"; import type { AtLeastOneOf } from "@homarr/common/types";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
@@ -21,7 +20,7 @@ export class RadarrIntegration extends MediaOrganizerIntegration {
unmonitored: includeUnmonitored, unmonitored: includeUnmonitored,
}); });
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
headers: { headers: {
"X-Api-Key": super.getSecretValue("apiKey"), "X-Api-Key": super.getSecretValue("apiKey"),
}, },
@@ -95,7 +94,7 @@ export class RadarrIntegration extends MediaOrganizerIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/api"), { return await fetch(this.url("/api"), {
headers: { "X-Api-Key": super.getSecretValue("apiKey") }, headers: { "X-Api-Key": super.getSecretValue("apiKey") },
}); });
}, },
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
@@ -9,7 +8,7 @@ export class ReadarrIntegration extends MediaOrganizerIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/api"), { return await fetch(this.url("/api"), {
headers: { "X-Api-Key": super.getSecretValue("apiKey") }, headers: { "X-Api-Key": super.getSecretValue("apiKey") },
}); });
}, },
@@ -35,7 +34,7 @@ export class ReadarrIntegration extends MediaOrganizerIntegration {
includeAuthor, includeAuthor,
}); });
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
headers: { headers: {
"X-Api-Key": super.getSecretValue("apiKey"), "X-Api-Key": super.getSecretValue("apiKey"),
}, },
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
@@ -22,7 +21,7 @@ export class SonarrIntegration extends MediaOrganizerIntegration {
includeEpisodeImages: true, includeEpisodeImages: true,
}); });
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
headers: { headers: {
"X-Api-Key": super.getSecretValue("apiKey"), "X-Api-Key": super.getSecretValue("apiKey"),
}, },
@@ -94,7 +93,7 @@ export class SonarrIntegration extends MediaOrganizerIntegration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/api"), { return await fetch(this.url("/api"), {
headers: { "X-Api-Key": super.getSecretValue("apiKey") }, headers: { "X-Api-Key": super.getSecretValue("apiKey") },
}); });
}, },
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
@@ -10,7 +9,7 @@ import { getNodesResponseSchema, getStatisticsSchema, getStatusTableSchema } fro
export class TdarrIntegration extends Integration { export class TdarrIntegration extends Integration {
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const url = this.url("/api/v2/status"); const url = this.url("/api/v2/status");
const response = await fetchWithTrustedCertificatesAsync(url); const response = await fetch(url);
if (response.status !== 200) { if (response.status !== 200) {
throw new Error(`Unexpected status code: ${response.status}`); throw new Error(`Unexpected status code: ${response.status}`);
} }
@@ -20,7 +19,7 @@ export class TdarrIntegration extends Integration {
public async getStatisticsAsync(): Promise<TdarrStatistics> { public async getStatisticsAsync(): Promise<TdarrStatistics> {
const url = this.url("/api/v2/cruddb"); const url = this.url("/api/v2/cruddb");
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
method: "POST", method: "POST",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
@@ -62,7 +61,7 @@ export class TdarrIntegration extends Integration {
public async getWorkersAsync(): Promise<TdarrWorker[]> { public async getWorkersAsync(): Promise<TdarrWorker[]> {
const url = this.url("/api/v2/get-nodes"); const url = this.url("/api/v2/get-nodes");
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
method: "GET", method: "GET",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
}); });
@@ -102,7 +101,7 @@ export class TdarrIntegration extends Integration {
private async getTranscodingQueueAsync(firstItemIndex: number, pageSize: number) { private async getTranscodingQueueAsync(firstItemIndex: number, pageSize: number) {
const url = this.url("/api/v2/client/status-tables"); const url = this.url("/api/v2/client/status-tables");
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
method: "POST", method: "POST",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
@@ -137,7 +136,7 @@ export class TdarrIntegration extends Integration {
private async getHealthCheckDataAsync(firstItemIndex: number, pageSize: number, totalQueueCount: number) { private async getHealthCheckDataAsync(firstItemIndex: number, pageSize: number, totalQueueCount: number) {
const url = this.url("/api/v2/client/status-tables"); const url = this.url("/api/v2/client/status-tables");
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
method: "POST", method: "POST",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
@@ -1,7 +1,3 @@
import type { Response } from "undici";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
import { IntegrationTestConnectionError } from "../base/test-connection-error"; import { IntegrationTestConnectionError } from "../base/test-connection-error";
import type { HealthMonitoring } from "../types"; import type { HealthMonitoring } from "../types";
@@ -109,7 +105,7 @@ export class OpenMediaVaultIntegration extends Integration {
if (!response.ok) { if (!response.ok) {
throw new IntegrationTestConnectionError("invalidCredentials"); throw new IntegrationTestConnectionError("invalidCredentials");
} }
const result = await response.json(); const result = (await response.json()) as unknown;
if (typeof result !== "object" || result === null || !("response" in result)) { if (typeof result !== "object" || result === null || !("response" in result)) {
throw new IntegrationTestConnectionError("invalidJson"); throw new IntegrationTestConnectionError("invalidJson");
} }
@@ -121,7 +117,7 @@ export class OpenMediaVaultIntegration extends Integration {
params: Record<string, unknown>, params: Record<string, unknown>,
headers: Record<string, string> = {}, headers: Record<string, string> = {},
): Promise<Response> { ): Promise<Response> {
return await fetchWithTrustedCertificatesAsync(this.url("/rpc.php"), { return await fetch(this.url("/rpc.php"), {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -1,4 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { z } from "@homarr/validation"; import { z } from "@homarr/validation";
@@ -21,7 +20,7 @@ interface OverseerrSearchResult {
*/ */
export class OverseerrIntegration extends Integration implements ISearchableIntegration<OverseerrSearchResult> { export class OverseerrIntegration extends Integration implements ISearchableIntegration<OverseerrSearchResult> {
public async searchAsync(query: string) { public async searchAsync(query: string) {
const response = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/search", { query }), { const response = await fetch(this.url("/api/v1/search", { query }), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -45,7 +44,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
public async getSeriesInformationAsync(mediaType: "movie" | "tv", id: number) { public async getSeriesInformationAsync(mediaType: "movie" | "tv", id: number) {
const url = mediaType === "tv" ? this.url(`/api/v1/tv/${id}`) : this.url(`/api/v1/movie/${id}`); const url = mediaType === "tv" ? this.url(`/api/v1/tv/${id}`) : this.url(`/api/v1/movie/${id}`);
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -61,7 +60,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
*/ */
public async requestMediaAsync(mediaType: "movie" | "tv", id: number, seasons?: number[]): Promise<void> { public async requestMediaAsync(mediaType: "movie" | "tv", id: number, seasons?: number[]): Promise<void> {
const url = this.url("/api/v1/request"); const url = this.url("/api/v1/request");
const response = await fetchWithTrustedCertificatesAsync(url, { const response = await fetch(url, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
mediaType, mediaType,
@@ -81,12 +80,13 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
} }
public async testConnectionAsync(): Promise<void> { public async testConnectionAsync(): Promise<void> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/auth/me"), { const response = await fetch(this.url("/api/v1/auth/me"), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
}); });
const json = (await response.json()) as object; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const json: object = await response.json();
if (Object.keys(json).includes("id")) { if (Object.keys(json).includes("id")) {
return; return;
} }
@@ -96,17 +96,14 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
public async getRequestsAsync(): Promise<MediaRequest[]> { public async getRequestsAsync(): Promise<MediaRequest[]> {
//Ensure to get all pending request first //Ensure to get all pending request first
const pendingRequests = await fetchWithTrustedCertificatesAsync( const pendingRequests = await fetch(this.url("/api/v1/request", { take: -1, filter: "pending" }), {
this.url("/api/v1/request", { take: -1, filter: "pending" }), headers: {
{ "X-Api-Key": this.getSecretValue("apiKey"),
headers: {
"X-Api-Key": this.getSecretValue("apiKey"),
},
}, },
); });
//Change 20 to integration setting (set to -1 for all) //Change 20 to integration setting (set to -1 for all)
const allRequests = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/request", { take: 20 }), { const allRequests = await fetch(this.url("/api/v1/request", { take: 20 }), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -154,7 +151,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
} }
public async getStatsAsync(): Promise<RequestStats> { public async getStatsAsync(): Promise<RequestStats> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/request/count"), { const response = await fetch(this.url("/api/v1/request/count"), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -163,7 +160,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
} }
public async getUsersAsync(): Promise<RequestUser[]> { public async getUsersAsync(): Promise<RequestUser[]> {
const response = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/user", { take: -1 }), { const response = await fetch(this.url("/api/v1/user", { take: -1 }), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -180,7 +177,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
public async approveRequestAsync(requestId: number): Promise<void> { public async approveRequestAsync(requestId: number): Promise<void> {
logger.info(`Approving media request id='${requestId}' integration='${this.integration.name}'`); logger.info(`Approving media request id='${requestId}' integration='${this.integration.name}'`);
await fetchWithTrustedCertificatesAsync(this.url(`/api/v1/request/${requestId}/approve`), { await fetch(this.url(`/api/v1/request/${requestId}/approve`), {
method: "POST", method: "POST",
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
@@ -198,7 +195,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
public async declineRequestAsync(requestId: number): Promise<void> { public async declineRequestAsync(requestId: number): Promise<void> {
logger.info(`Declining media request id='${requestId}' integration='${this.integration.name}'`); logger.info(`Declining media request id='${requestId}' integration='${this.integration.name}'`);
await fetchWithTrustedCertificatesAsync(this.url(`/api/v1/request/${requestId}/decline`), { await fetch(this.url(`/api/v1/request/${requestId}/decline`), {
method: "POST", method: "POST",
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
@@ -215,7 +212,7 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
} }
private async getItemInformationAsync(id: number, type: MediaRequest["type"]): Promise<MediaInformation> { private async getItemInformationAsync(id: number, type: MediaRequest["type"]): Promise<MediaInformation> {
const response = await fetchWithTrustedCertificatesAsync(this.url(`/api/v1/${type}/${id}`), { const response = await fetch(this.url(`/api/v1/${type}/${id}`), {
headers: { headers: {
"X-Api-Key": this.getSecretValue("apiKey"), "X-Api-Key": this.getSecretValue("apiKey"),
}, },
@@ -1,5 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
import { IntegrationTestConnectionError } from "../base/test-connection-error"; import { IntegrationTestConnectionError } from "../base/test-connection-error";
import type { DnsHoleSummaryIntegration } from "../interfaces/dns-hole-summary/dns-hole-summary-integration"; import type { DnsHoleSummaryIntegration } from "../interfaces/dns-hole-summary/dns-hole-summary-integration";
@@ -9,7 +7,7 @@ import { summaryResponseSchema } from "./pi-hole-types";
export class PiHoleIntegration extends Integration implements DnsHoleSummaryIntegration { export class PiHoleIntegration extends Integration implements DnsHoleSummaryIntegration {
public async getSummaryAsync(): Promise<DnsHoleSummary> { public async getSummaryAsync(): Promise<DnsHoleSummary> {
const apiKey = super.getSecretValue("apiKey"); const apiKey = super.getSecretValue("apiKey");
const response = await fetchWithTrustedCertificatesAsync(this.url("/admin/api.php?summaryRaw", { auth: apiKey })); const response = await fetch(this.url("/admin/api.php?summaryRaw", { auth: apiKey }));
if (!response.ok) { if (!response.ok) {
throw new Error( throw new Error(
`Failed to fetch summary for ${this.integration.name} (${this.integration.id}): ${response.statusText}`, `Failed to fetch summary for ${this.integration.name} (${this.integration.id}): ${response.statusText}`,
@@ -38,11 +36,11 @@ export class PiHoleIntegration extends Integration implements DnsHoleSummaryInte
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/admin/api.php?status", { auth: apiKey })); return await fetch(this.url("/admin/api.php?status", { auth: apiKey }));
}, },
handleResponseAsync: async (response) => { handleResponseAsync: async (response) => {
try { try {
const result = await response.json(); const result = (await response.json()) as unknown;
if (typeof result === "object" && result !== null && "status" in result) return; if (typeof result === "object" && result !== null && "status" in result) return;
} catch { } catch {
throw new IntegrationTestConnectionError("invalidJson"); throw new IntegrationTestConnectionError("invalidJson");
@@ -55,7 +53,7 @@ export class PiHoleIntegration extends Integration implements DnsHoleSummaryInte
public async enableAsync(): Promise<void> { public async enableAsync(): Promise<void> {
const apiKey = super.getSecretValue("apiKey"); const apiKey = super.getSecretValue("apiKey");
const response = await fetchWithTrustedCertificatesAsync(this.url("/admin/api.php?enable", { auth: apiKey })); const response = await fetch(this.url("/admin/api.php?enable", { auth: apiKey }));
if (!response.ok) { if (!response.ok) {
throw new Error( throw new Error(
`Failed to enable PiHole for ${this.integration.name} (${this.integration.id}): ${response.statusText}`, `Failed to enable PiHole for ${this.integration.name} (${this.integration.id}): ${response.statusText}`,
@@ -66,7 +64,7 @@ export class PiHoleIntegration extends Integration implements DnsHoleSummaryInte
public async disableAsync(duration?: number): Promise<void> { public async disableAsync(duration?: number): Promise<void> {
const apiKey = super.getSecretValue("apiKey"); const apiKey = super.getSecretValue("apiKey");
const url = this.url(`/admin/api.php?disable${duration ? `=${duration}` : ""}`, { auth: apiKey }); const url = this.url(`/admin/api.php?disable${duration ? `=${duration}` : ""}`, { auth: apiKey });
const response = await fetchWithTrustedCertificatesAsync(url); const response = await fetch(url);
if (!response.ok) { if (!response.ok) {
throw new Error( throw new Error(
`Failed to disable PiHole for ${this.integration.name} (${this.integration.id}): ${response.statusText}`, `Failed to disable PiHole for ${this.integration.name} (${this.integration.id}): ${response.statusText}`,
@@ -1,6 +1,5 @@
import { parseStringPromise } from "xml2js"; import { parseStringPromise } from "xml2js";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
@@ -12,7 +11,7 @@ export class PlexIntegration extends Integration {
public async getCurrentSessionsAsync(): Promise<StreamSession[]> { public async getCurrentSessionsAsync(): Promise<StreamSession[]> {
const token = super.getSecretValue("apiKey"); const token = super.getSecretValue("apiKey");
const response = await fetchWithTrustedCertificatesAsync(this.url("/status/sessions"), { const response = await fetch(this.url("/status/sessions"), {
headers: { headers: {
"X-Plex-Token": token, "X-Plex-Token": token,
}, },
@@ -67,7 +66,7 @@ export class PlexIntegration extends Integration {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/"), { return await fetch(this.url("/"), {
headers: { headers: {
"X-Plex-Token": token, "X-Plex-Token": token,
}, },
@@ -1,5 +1,3 @@
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { Integration } from "../base/integration"; import { Integration } from "../base/integration";
import { IntegrationTestConnectionError } from "../base/test-connection-error"; import { IntegrationTestConnectionError } from "../base/test-connection-error";
import type { Indexer } from "../interfaces/indexer-manager/indexer"; import type { Indexer } from "../interfaces/indexer-manager/indexer";
@@ -9,7 +7,7 @@ export class ProwlarrIntegration extends Integration {
public async getIndexersAsync(): Promise<Indexer[]> { public async getIndexersAsync(): Promise<Indexer[]> {
const apiKey = super.getSecretValue("apiKey"); const apiKey = super.getSecretValue("apiKey");
const indexerResponse = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/indexer"), { const indexerResponse = await fetch(this.url("/api/v1/indexer"), {
headers: { headers: {
"X-Api-Key": apiKey, "X-Api-Key": apiKey,
}, },
@@ -20,7 +18,7 @@ export class ProwlarrIntegration extends Integration {
); );
} }
const statusResponse = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/indexerstatus"), { const statusResponse = await fetch(this.url("/api/v1/indexerstatus"), {
headers: { headers: {
"X-Api-Key": apiKey, "X-Api-Key": apiKey,
}, },
@@ -62,7 +60,7 @@ export class ProwlarrIntegration extends Integration {
public async testAllAsync(): Promise<void> { public async testAllAsync(): Promise<void> {
const apiKey = super.getSecretValue("apiKey"); const apiKey = super.getSecretValue("apiKey");
const response = await fetchWithTrustedCertificatesAsync(this.url("/api/v1/indexer/testall"), { const response = await fetch(this.url("/api/v1/indexer/testall"), {
headers: { headers: {
"X-Api-Key": apiKey, "X-Api-Key": apiKey,
}, },
@@ -80,7 +78,7 @@ export class ProwlarrIntegration extends Integration {
await super.handleTestConnectionResponseAsync({ await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => { queryFunctionAsync: async () => {
return await fetchWithTrustedCertificatesAsync(this.url("/api"), { return await fetch(this.url("/api"), {
headers: { headers: {
"X-Api-Key": apiKey, "X-Api-Key": apiKey,
}, },
@@ -88,7 +86,7 @@ export class ProwlarrIntegration extends Integration {
}, },
handleResponseAsync: async (response) => { handleResponseAsync: async (response) => {
try { try {
const result = await response.json(); const result = (await response.json()) as unknown;
if (typeof result === "object" && result !== null) return; if (typeof result === "object" && result !== null) return;
} catch { } catch {
throw new IntegrationTestConnectionError("invalidJson"); throw new IntegrationTestConnectionError("invalidJson");
@@ -1,125 +0,0 @@
import type { Proxmox } from "proxmox-api";
import proxmoxApi from "proxmox-api";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { extractErrorMessage } from "@homarr/common";
import { logger } from "@homarr/log";
import { Integration } from "../base/integration";
import { IntegrationTestConnectionError } from "../base/test-connection-error";
import type {
ComputeResourceBase,
LxcResource,
NodeResource,
QemuResource,
Resource,
StorageResource,
} from "./proxmox-types";
export class ProxmoxIntegration extends Integration {
public async testConnectionAsync(): Promise<void> {
const proxmox = this.getPromoxApi();
await proxmox.nodes.$get().catch((error) => {
throw new IntegrationTestConnectionError("internalServerError", extractErrorMessage(error));
});
}
public async getClusterInfoAsync() {
const proxmox = this.getPromoxApi();
const resources = await proxmox.cluster.resources.$get();
logger.info(
`Found ${resources.length} resources in Proxmox cluster node=${resources.filter((resource) => resource.type === "node").length} lxc=${resources.filter((resource) => resource.type === "lxc").length} qemu=${resources.filter((resource) => resource.type === "qemu").length} storage=${resources.filter((resource) => resource.type === "storage").length}`,
);
const mappedResources = resources.map(mapResource).filter((resource) => resource !== null);
return {
nodes: mappedResources.filter((resource): resource is NodeResource => resource.type === "node"),
lxcs: mappedResources.filter((resource): resource is LxcResource => resource.type === "lxc"),
vms: mappedResources.filter((resource): resource is QemuResource => resource.type === "qemu"),
storages: mappedResources.filter((resource): resource is StorageResource => resource.type === "storage"),
};
}
private getPromoxApi() {
return proxmoxApi({
host: this.url("/").host,
tokenID: `${this.getSecretValue("username")}@${this.getSecretValue("realm")}!${this.getSecretValue("tokenId")}`,
tokenSecret: this.getSecretValue("apiKey"),
fetch: fetchWithTrustedCertificatesAsync,
});
}
}
const mapResource = (resource: Proxmox.clusterResourcesResources): Resource | null => {
switch (resource.type) {
case "node":
return mapNodeResource(resource);
case "lxc":
case "qemu":
return mapVmResource(resource);
case "storage":
return mapStorageResource(resource);
}
return null;
};
const mapComputeResource = (resource: Proxmox.clusterResourcesResources): Omit<ComputeResourceBase<string>, "type"> => {
return {
cpu: {
utilization: resource.cpu ?? 0,
cores: resource.maxcpu ?? 0,
},
memory: {
used: resource.mem ?? 0,
total: resource.maxmem ?? 0,
},
storage: {
used: resource.disk ?? 0,
total: resource.maxdisk ?? 0,
read: (resource.diskread as number | null) ?? null,
write: (resource.diskwrite as number | null) ?? null,
},
network: {
in: (resource.netin as number | null) ?? null,
out: (resource.netout as number | null) ?? null,
},
haState: resource.hastate ?? null,
isRunning: resource.status === "running" || resource.status === "online",
name: resource.name ?? "",
node: resource.node ?? "",
status: resource.status ?? (resource.type === "node" ? "offline" : "stopped"),
uptime: resource.uptime ?? 0,
};
};
const mapNodeResource = (resource: Proxmox.clusterResourcesResources): NodeResource => {
return {
type: "node",
...mapComputeResource(resource),
name: resource.node ?? "",
};
};
const mapVmResource = (resource: Proxmox.clusterResourcesResources): LxcResource | QemuResource => {
return {
type: resource.type as "lxc" | "qemu",
vmId: resource.vmid ?? 0,
...mapComputeResource(resource),
};
};
const mapStorageResource = (resource: Proxmox.clusterResourcesResources): StorageResource => {
return {
type: "storage",
name: resource.storage ?? "",
node: resource.node ?? "",
isRunning: resource.status === "available",
status: resource.status ?? "offline",
storagePlugin: resource.storage ?? "",
total: resource.maxdisk ?? 0,
used: resource.disk ?? 0,
isShared: resource.shared === 1,
};
};
@@ -1,57 +0,0 @@
interface ResourceBase<TType extends string> {
type: TType;
name: string;
node: string;
isRunning: boolean;
status: string;
}
export interface ComputeResourceBase<TType extends string> extends ResourceBase<TType> {
cpu: {
utilization: number; // previously cpu (0-1)
cores: number; // previously cpuCores
};
memory: {
used: number; // previously mem
total: number; // previously maxMem
};
storage: {
used: number; // previously disk
total: number; // previously maxDisk
read: number | null; // previously diskRead
write: number | null; // previously diskWrite
};
network: {
in: number | null; // previously netIn
out: number | null; // previously netOut
};
uptime: number; // expressed in seconds
haState: string | null; // HA service status (for HA managed VMs).
}
export type NodeResource = ComputeResourceBase<"node">;
export interface LxcResource extends ComputeResourceBase<"lxc"> {
vmId: number;
}
export interface QemuResource extends ComputeResourceBase<"qemu"> {
vmId: number;
}
export interface StorageResource extends ResourceBase<"storage"> {
storagePlugin: string;
used: number; // previously disk
total: number; // previously maxDisk
isShared: boolean; // previously storageShared
}
export type ComputeResource = NodeResource | LxcResource | QemuResource;
export type Resource = ComputeResource | StorageResource;
export interface ProxmoxClusterInfo {
nodes: NodeResource[];
lxcs: LxcResource[];
vms: QemuResource[];
storages: StorageResource[];
}
-1
View File
@@ -6,4 +6,3 @@ export * from "./interfaces/media-requests/media-request";
export * from "./pi-hole/pi-hole-types"; export * from "./pi-hole/pi-hole-types";
export * from "./base/searchable-integration"; export * from "./base/searchable-integration";
export * from "./homeassistant/homeassistant-types"; export * from "./homeassistant/homeassistant-types";
export * from "./proxmox/proxmox-types";
-1
View File
@@ -1,4 +1,3 @@
import { Response } from "undici";
import { describe, expect, test } from "vitest"; import { describe, expect, test } from "vitest";
import { IntegrationTestConnectionError } from "../src"; import { IntegrationTestConnectionError } from "../src";
@@ -1,5 +1,5 @@
import { objectEntries } from "@homarr/common"; import { objectEntries } from "@homarr/common";
import type { Database, HomarrDatabaseMysql, InferInsertModel } from "@homarr/db"; import type { Database, InferInsertModel } from "@homarr/db";
import * as schema from "@homarr/db/schema"; import * as schema from "@homarr/db/schema";
type TableKey = { type TableKey = {
@@ -29,15 +29,5 @@ export const createDbInsertCollection = <TTableKey extends TableKey>(tablesInIns
} }
}); });
}, },
insertAllAsync: async (db: HomarrDatabaseMysql) => {
await db.transaction(async (transaction) => {
for (const [key, values] of objectEntries(context)) {
if (values.length >= 1) {
// Below is actually the mysqlSchema when the driver is mysql
await transaction.insert(schema[key] as never).values(values as never);
}
}
});
},
}; };
}; };
@@ -1,7 +1,6 @@
import type { z } from "zod"; import type { z } from "zod";
import { Stopwatch } from "@homarr/common"; import { Stopwatch } from "@homarr/common";
import { handleTransactionsAsync } from "@homarr/db";
import type { Database } from "@homarr/db"; import type { Database } from "@homarr/db";
import { logger } from "@homarr/log"; import { logger } from "@homarr/log";
@@ -35,21 +34,11 @@ export const importInitialOldmarrAsync = async (
logger.info("Inserting import data to database"); logger.info("Inserting import data to database");
await handleTransactionsAsync(db, { // Due to a limitation with better-sqlite it's only possible to use it synchronously
async handleAsync(db) { db.transaction((transaction) => {
await db.transaction(async (transaction) => { boardInsertCollection.insertAll(transaction);
await boardInsertCollection.insertAllAsync(transaction); userInsertCollection.insertAll(transaction);
await userInsertCollection.insertAllAsync(transaction); integrationInsertCollection.insertAll(transaction);
await integrationInsertCollection.insertAllAsync(transaction);
});
},
handleSync(db) {
db.transaction((transaction) => {
boardInsertCollection.insertAll(transaction);
userInsertCollection.insertAll(transaction);
integrationInsertCollection.insertAll(transaction);
});
},
}); });
logger.info(`Import successful (in ${stopwatch.getElapsedInHumanWords()})`); logger.info(`Import successful (in ${stopwatch.getElapsedInHumanWords()})`);
@@ -1,4 +1,4 @@
import { handleTransactionsAsync, inArray } from "@homarr/db"; import { inArray } from "@homarr/db";
import type { Database } from "@homarr/db"; import type { Database } from "@homarr/db";
import { apps } from "@homarr/db/schema"; import { apps } from "@homarr/db/schema";
import type { OldmarrConfig } from "@homarr/old-schema"; import type { OldmarrConfig } from "@homarr/old-schema";
@@ -31,12 +31,6 @@ export const importSingleOldmarrConfigAsync = async (
const boardInsertCollection = createBoardInsertCollection({ preparedApps, preparedBoards }, settings); const boardInsertCollection = createBoardInsertCollection({ preparedApps, preparedBoards }, settings);
await handleTransactionsAsync(db, { // Due to a limitation with better-sqlite it's only possible to use it synchronously
async handleAsync(db) { boardInsertCollection.insertAll(db);
await boardInsertCollection.insertAllAsync(db);
},
handleSync(db) {
boardInsertCollection.insertAll(db);
},
});
}; };
@@ -141,9 +141,6 @@ const optionMapping: OptionMapping = {
"fileSystem" in oldOptions "fileSystem" in oldOptions
? oldOptions.fileSystem ? oldOptions.fileSystem
: oldOptions.graphsOrder.some((graph) => graph.key === "storage" && graph.subValues.enabled), : oldOptions.graphsOrder.some((graph) => graph.key === "storage" && graph.subValues.enabled),
defaultTab: (oldOptions) => ("defaultTabState" in oldOptions ? oldOptions.defaultTabState : undefined),
sectionIndicatorRequirement: (oldOptions) =>
"sectionIndicatorColor" in oldOptions ? oldOptions.sectionIndicatorColor : undefined,
}, },
mediaTranscoding: { mediaTranscoding: {
defaultView: (oldOptions) => oldOptions.defaultView, defaultView: (oldOptions) => oldOptions.defaultView,
@@ -2,13 +2,13 @@ import dayjs from "dayjs";
import type { IntegrationKindByCategory } from "@homarr/definitions"; import type { IntegrationKindByCategory } from "@homarr/definitions";
import { integrationCreator } from "@homarr/integrations"; import { integrationCreator } from "@homarr/integrations";
import type { HealthMonitoring, ProxmoxClusterInfo } from "@homarr/integrations/types"; import type { HealthMonitoring } from "@homarr/integrations/types";
import { createCachedIntegrationRequestHandler } from "./lib/cached-integration-request-handler"; import { createCachedIntegrationRequestHandler } from "./lib/cached-integration-request-handler";
export const systemInfoRequestHandler = createCachedIntegrationRequestHandler< export const systemInfoRequestHandler = createCachedIntegrationRequestHandler<
HealthMonitoring, HealthMonitoring,
Exclude<IntegrationKindByCategory<"healthMonitoring">, "proxmox">, IntegrationKindByCategory<"healthMonitoring">,
Record<string, never> Record<string, never>
>({ >({
async requestAsync(integration, _input) { async requestAsync(integration, _input) {
@@ -18,16 +18,3 @@ export const systemInfoRequestHandler = createCachedIntegrationRequestHandler<
cacheDuration: dayjs.duration(5, "seconds"), cacheDuration: dayjs.duration(5, "seconds"),
queryKey: "systemInfo", queryKey: "systemInfo",
}); });
export const clusterInfoRequestHandler = createCachedIntegrationRequestHandler<
ProxmoxClusterInfo,
"proxmox",
Record<string, never>
>({
async requestAsync(integration, _input) {
const integrationInstance = integrationCreator(integration);
return await integrationInstance.getClusterInfoAsync();
},
cacheDuration: dayjs.duration(5, "seconds"),
queryKey: "clusterInfo",
});
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "密码不符合要求", "passwordRequirements": "密码不符合要求",
"boardAlreadyExists": "具有此名称的面板已存在", "boardAlreadyExists": "具有此名称的面板已存在",
"invalidFileType": "无效的文件类型,例如 {expected}", "invalidFileType": "无效的文件类型,例如 {expected}",
"invalidFileName": "",
"fileTooLarge": "文件太大,最大大小为 {maxSize}", "fileTooLarge": "文件太大,最大大小为 {maxSize}",
"invalidConfiguration": "无效配置", "invalidConfiguration": "无效配置",
"groupNameTaken": "用户组名称已存在" "groupNameTaken": "用户组名称已存在"
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "日志", "logs": "日志",
"api": "API", "api": "API",
"certificates": "",
"tasks": "任务" "tasks": "任务"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "此面板将显示为您的主面板" "tooltip": "此面板将显示为您的主面板"
} }
}, },
"setMobileHomeBoard": {
"label": "设置为您的手机面板",
"badge": {
"label": "手机",
"tooltip": "此面板将显示为您的手机面板"
}
},
"duplicate": { "duplicate": {
"label": "复制面板" "label": "复制面板"
}, },
@@ -2198,13 +2189,7 @@
"title": "通用", "title": "通用",
"item": { "item": {
"language": "语言与地区", "language": "语言与地区",
"board": { "board": "主面板",
"title": "主面板",
"type": {
"general": "通用",
"mobile": "手机"
}
},
"defaultSearchEngine": "默认搜索引擎", "defaultSearchEngine": "默认搜索引擎",
"firstDayOfWeek": "一周的第一天", "firstDayOfWeek": "一周的第一天",
"accessibility": "无障碍服务" "accessibility": "无障碍服务"
@@ -2364,7 +2349,6 @@
"title": "面板", "title": "面板",
"homeBoard": { "homeBoard": {
"label": "全局主面板", "label": "全局主面板",
"mobileLabel": "全局手机面板",
"description": "只有公共面板可供选择" "description": "只有公共面板可供选择"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "日志" "label": "日志"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "设置为主面板" "label": "设置为主面板"
}, },
"mobileBoard": {
"label": "设置为手机面板"
},
"settings": { "settings": {
"label": "打开设置" "label": "打开设置"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "Heslo nesplňuje požadavky", "passwordRequirements": "Heslo nesplňuje požadavky",
"boardAlreadyExists": "Plocha s tímto názvem již existuje", "boardAlreadyExists": "Plocha s tímto názvem již existuje",
"invalidFileType": "Neplatný typ souboru, očekáván {expected}", "invalidFileType": "Neplatný typ souboru, očekáván {expected}",
"invalidFileName": "",
"fileTooLarge": "Soubor je příliš velký, maximální velikost je {maxSize}", "fileTooLarge": "Soubor je příliš velký, maximální velikost je {maxSize}",
"invalidConfiguration": "Neplatná konfigurace", "invalidConfiguration": "Neplatná konfigurace",
"groupNameTaken": "Název skupiny je již používán" "groupNameTaken": "Název skupiny je již používán"
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Obecné", "title": "Obecné",
"item": { "item": {
"language": "Jazyk & oblast", "language": "Jazyk & oblast",
"board": { "board": "Domovská plocha",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "Výchozí vyhledávač", "defaultSearchEngine": "Výchozí vyhledávač",
"firstDayOfWeek": "První den v týdnu", "firstDayOfWeek": "První den v týdnu",
"accessibility": "Přístupnost" "accessibility": "Přístupnost"
@@ -2364,7 +2349,6 @@
"title": "Plochy", "title": "Plochy",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Generelt", "title": "Generelt",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Første ugedag", "firstDayOfWeek": "Første ugedag",
"accessibility": "Hjælpefunktioner" "accessibility": "Hjælpefunktioner"
@@ -2364,7 +2349,6 @@
"title": "", "title": "",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+142 -205
View File
@@ -213,10 +213,10 @@
"changeDefaultSearchEngine": { "changeDefaultSearchEngine": {
"notification": { "notification": {
"success": { "success": {
"message": "Standard-Suchmaschine erfolgreich geändert" "message": ""
}, },
"error": { "error": {
"message": "Standard Suchmaschine kann nicht geändert werden" "message": ""
} }
} }
}, },
@@ -499,7 +499,7 @@
} }
}, },
"app": { "app": {
"search": "App suchen", "search": "",
"page": { "page": {
"list": { "list": {
"title": "Apps", "title": "Apps",
@@ -625,8 +625,8 @@
"label": "URL" "label": "URL"
}, },
"attemptSearchEngineCreation": { "attemptSearchEngineCreation": {
"label": "Suchmaschinen anlegen", "label": "",
"description": "Integration \"{kind}\" kann mit den Suchmaschinen verwendet werden. Wählen Sie dies, um die Suchmaschine automatisch zu konfigurieren." "description": ""
} }
}, },
"action": { "action": {
@@ -897,7 +897,6 @@
"passwordRequirements": "Passwort erfüllt nicht alle Anforderungen", "passwordRequirements": "Passwort erfüllt nicht alle Anforderungen",
"boardAlreadyExists": "Ein Board mit diesem Namen existiert bereits", "boardAlreadyExists": "Ein Board mit diesem Namen existiert bereits",
"invalidFileType": "Ungültiger Dateityp, erwartete {expected}", "invalidFileType": "Ungültiger Dateityp, erwartete {expected}",
"invalidFileName": "",
"fileTooLarge": "Datei ist zu groß, maximale Größe ist {maxSize}", "fileTooLarge": "Datei ist zu groß, maximale Größe ist {maxSize}",
"invalidConfiguration": "Ungültige Konfiguration", "invalidConfiguration": "Ungültige Konfiguration",
"groupNameTaken": "Gruppenname bereits vergeben" "groupNameTaken": "Gruppenname bereits vergeben"
@@ -919,7 +918,7 @@
"category": { "category": {
"field": { "field": {
"name": { "name": {
"label": "Name" "label": ""
} }
}, },
"action": { "action": {
@@ -967,7 +966,7 @@
}, },
"create": { "create": {
"title": "Wählen Sie das hinzuzufügende Element aus", "title": "Wählen Sie das hinzuzufügende Element aus",
"search": "Gegenstände filtern", "search": "",
"addToBoard": "Zum Board hinzufügen" "addToBoard": "Zum Board hinzufügen"
}, },
"moveResize": { "moveResize": {
@@ -1009,7 +1008,7 @@
}, },
"widget": { "widget": {
"app": { "app": {
"name": "App", "name": "",
"description": "Bettet eine App in das Board ein.", "description": "Bettet eine App in das Board ein.",
"option": { "option": {
"appId": { "appId": {
@@ -1046,24 +1045,24 @@
"label": "Ansicht", "label": "Ansicht",
"option": { "option": {
"row": { "row": {
"label": "Horizontal" "label": ""
}, },
"column": { "column": {
"label": "Vertikal" "label": "Vertikal"
}, },
"grid": { "grid": {
"label": "Raster" "label": ""
} }
} }
}, },
"items": { "items": {
"label": "Lesezeichen", "label": "Lesezeichen",
"add": "Lesezeichen hinzufügen" "add": ""
} }
} }
}, },
"dnsHoleSummary": { "dnsHoleSummary": {
"name": "DNS Hole Zusammenfassung", "name": "",
"description": "Zeigt die Zusammenfassung deines DNS Holes an", "description": "Zeigt die Zusammenfassung deines DNS Holes an",
"option": { "option": {
"layout": { "layout": {
@@ -1094,7 +1093,7 @@
"dnsQueriesToday": "Abfragen heute", "dnsQueriesToday": "Abfragen heute",
"domainsBeingBlocked": "Domänen auf der Sperrliste" "domainsBeingBlocked": "Domänen auf der Sperrliste"
}, },
"domainsTooltip": "Aufgrund mehrerer Integrationen kann Homarr die genaue Anzahl der blockierten Domains nicht berechnen" "domainsTooltip": ""
}, },
"dnsHoleControls": { "dnsHoleControls": {
"name": "DNS Hole Steuerung", "name": "DNS Hole Steuerung",
@@ -1170,22 +1169,22 @@
} }
}, },
"minecraftServerStatus": { "minecraftServerStatus": {
"name": "Status des Minecraft Servers", "name": "",
"description": "Status des Minecraft Servers anzeigen", "description": "",
"option": { "option": {
"title": { "title": {
"label": "Titel" "label": ""
}, },
"domain": { "domain": {
"label": "Server Adresse" "label": ""
}, },
"isBedrockServer": { "isBedrockServer": {
"label": "Bedrock Server" "label": ""
} }
}, },
"status": { "status": {
"online": "Online", "online": "",
"offline": "Offline" "offline": ""
} }
}, },
"notebook": { "notebook": {
@@ -1283,7 +1282,7 @@
}, },
"error": { "error": {
"noUrl": "Keine iFrame URL angegeben", "noUrl": "Keine iFrame URL angegeben",
"unsupportedProtocol": "Die angegebene URL verwendet ein nicht unterstütztes Protokoll. Bitte verwenden Sie eines von ({supportedProtocols})", "unsupportedProtocol": "",
"noBrowerSupport": "Ihr Browser unterstützt keine iframes. Bitte aktualisieren Sie Ihren Browser." "noBrowerSupport": "Ihr Browser unterstützt keine iframes. Bitte aktualisieren Sie Ihren Browser."
} }
}, },
@@ -1418,37 +1417,37 @@
"processor": "Prozessor: {cpuModelName}", "processor": "Prozessor: {cpuModelName}",
"memory": "Speicher: {memory}GiB", "memory": "Speicher: {memory}GiB",
"memoryAvailable": "Verfügbar: {memoryAvailable} GiB ({percent}%)", "memoryAvailable": "Verfügbar: {memoryAvailable} GiB ({percent}%)",
"version": "Version: {version}", "version": "",
"uptime": "Laufzeit: {months} Monate, {days} Tage, {hours} Stunden, {minutes} Minuten", "uptime": "Laufzeit: {months} Monate, {days} Tage, {hours} Stunden, {minutes} Minuten",
"loadAverage": "Durchschnittliche Last:", "loadAverage": "Durchschnittliche Last:",
"minute": "1 Minute", "minute": "1 Minute",
"minutes": "{count} Minuten", "minutes": "{count} Minuten",
"used": "Belegt", "used": "Belegt",
"available": "Verfügbar", "available": "Verfügbar",
"lastSeen": "Letzte Statusaktualisierung: {lastSeen}" "lastSeen": ""
}, },
"memory": {}, "memory": {},
"error": { "error": {
"internalServerError": "Fehler beim Abrufen des Gesundheitsstatus" "internalServerError": ""
} }
}, },
"common": { "common": {
"location": { "location": {
"query": "Stadt / Postleitzahl", "query": "",
"latitude": "Breitengrad", "latitude": "",
"longitude": "Längengrad", "longitude": "",
"disabledTooltip": "Gib eine Stadt oder Postleitzahl an", "disabledTooltip": "",
"unknownLocation": "Unbekannter Ort", "unknownLocation": "",
"search": "Suche", "search": "Suche",
"table": { "table": {
"header": { "header": {
"city": "Stadt", "city": "",
"country": "Land", "country": "",
"coordinates": "Koordinaten", "coordinates": "",
"population": "Bevölkerung" "population": ""
}, },
"action": { "action": {
"select": "Wähle {city}, {countryCode}" "select": ""
}, },
"population": { "population": {
"fallback": "Unbekannt" "fallback": "Unbekannt"
@@ -1456,16 +1455,16 @@
} }
}, },
"integration": { "integration": {
"noData": "Keine Integration gefunden", "noData": "",
"description": "Klicken Sie <here></here> um eine neue Integration zu erstellen" "description": ""
}, },
"app": { "app": {
"noData": "Keine App gefunden", "noData": "Keine App gefunden",
"description": "Klicken Sie <here></here> um eine neue App zu erstellen" "description": ""
}, },
"error": { "error": {
"noIntegration": "Keine Integration ausgewählt", "noIntegration": "",
"noData": "Keine Integrationsdaten verfügbar" "noData": ""
}, },
"option": {} "option": {}
}, },
@@ -1478,32 +1477,32 @@
}, },
"hasAutoPlay": { "hasAutoPlay": {
"label": "Automatische Wiedergabe", "label": "Automatische Wiedergabe",
"description": "Autoplay funktioniert nur bei Stummschaltung aufgrund von Browser Einschränkungen" "description": ""
}, },
"isMuted": { "isMuted": {
"label": "Stumm geschaltet" "label": ""
}, },
"hasControls": { "hasControls": {
"label": "Steuerelemente anzeigen" "label": ""
} }
}, },
"error": { "error": {
"noUrl": "Keine Video URL angegeben", "noUrl": "",
"forYoutubeUseIframe": "Für YouTube Videos verwenden Sie die iframe Option" "forYoutubeUseIframe": ""
} }
}, },
"mediaServer": { "mediaServer": {
"name": "Aktuelle Media Server Streams", "name": "",
"description": "Zeige die aktuellen Streams auf deinen Medienservern an", "description": "",
"option": {}, "option": {},
"items": { "items": {
"user": "Benutzer", "user": "",
"name": "Name", "name": "",
"id": "Id" "id": ""
} }
}, },
"downloads": { "downloads": {
"name": "Download Client", "name": "",
"description": "", "description": "",
"option": { "option": {
"columns": { "columns": {
@@ -1635,15 +1634,15 @@
"delete": { "delete": {
"title": "", "title": "",
"modalTitle": "", "modalTitle": "",
"entry": "Eintrag löschen", "entry": "",
"entryAndFiles": "Eintrag und Datei(en) löschen" "entryAndFiles": ""
} }
} }
}, },
"globalRatio": "Globales Verhältnis" "globalRatio": ""
}, },
"mediaRequests-requestList": { "mediaRequests-requestList": {
"name": "Liste der Medienanfragen", "name": "",
"description": "Sehen Sie eine Liste aller Medienanfragen von Ihrer Overseerr- oder Jellyseerr-Instanz", "description": "Sehen Sie eine Liste aller Medienanfragen von Ihrer Overseerr- oder Jellyseerr-Instanz",
"option": { "option": {
"linksTargetNewTab": { "linksTargetNewTab": {
@@ -1651,21 +1650,21 @@
} }
}, },
"pending": { "pending": {
"approve": "Anfrage annehmen", "approve": "",
"approving": "Anfrage wird bestätigt...", "approving": "",
"decline": "Antrag ablehnen" "decline": ""
}, },
"availability": { "availability": {
"unknown": "Unbekannt", "unknown": "Unbekannt",
"pending": "Ausstehend", "pending": "",
"processing": "In Bearbeitung", "processing": "",
"partiallyAvailable": "Teilweise", "partiallyAvailable": "Teilweise",
"available": "Verfügbar" "available": "Verfügbar"
}, },
"toBeDetermined": "Noch Festzulegen" "toBeDetermined": ""
}, },
"mediaRequests-requestStats": { "mediaRequests-requestStats": {
"name": "Statistik der Medienanfragen", "name": "",
"description": "Statistiken über Ihre Medienanfragen", "description": "Statistiken über Ihre Medienanfragen",
"option": {}, "option": {},
"titles": { "titles": {
@@ -1673,38 +1672,38 @@
"main": "Medien Statistiken", "main": "Medien Statistiken",
"approved": "Bereits genehmigt", "approved": "Bereits genehmigt",
"pending": "Ausstehende Freigaben", "pending": "Ausstehende Freigaben",
"processing": "Wird verarbeitet", "processing": "",
"declined": "Bereits abgelehnt", "declined": "",
"available": "Bereits verfügbar", "available": "",
"tv": "TV Anfragen", "tv": "TV Anfragen",
"movie": "Film Anfragen", "movie": "Film Anfragen",
"total": "Gesamt" "total": "Gesamt"
}, },
"users": { "users": {
"main": "Top Nutzer", "main": "Top Nutzer",
"requests": "Anfragen" "requests": ""
} }
} }
}, },
"mediaTranscoding": { "mediaTranscoding": {
"name": "Medien Transkodierung", "name": "",
"description": "Statistiken, aktuelle Warteschlange und Status Ihrer Medien Transkordierung", "description": "",
"option": { "option": {
"defaultView": { "defaultView": {
"label": "Standardansicht" "label": "Standardansicht"
}, },
"queuePageSize": { "queuePageSize": {
"label": "Größe der Warteschlange" "label": ""
} }
}, },
"tab": { "tab": {
"workers": "Arbeiter", "workers": "",
"queue": "Warteschlange", "queue": "Warteschlange",
"statistics": "Statistiken" "statistics": "Statistiken"
}, },
"currentIndex": "{start}-{end} von {total}", "currentIndex": "{start}-{end} von {total}",
"healthCheck": { "healthCheck": {
"title": "Gesundheitscheck", "title": "",
"queued": "In der Warteschlange", "queued": "In der Warteschlange",
"status": { "status": {
"healthy": "Gesund", "healthy": "Gesund",
@@ -1715,12 +1714,12 @@
"statistics": { "statistics": {
"empty": "Leer", "empty": "Leer",
"transcodes": "Transkodieren", "transcodes": "Transkodieren",
"transcodesCount": "Transkodierung: {value}", "transcodesCount": "",
"healthChecksCount": "Gesundheitscheck: {value}", "healthChecksCount": "",
"filesCount": "Dateien: {value}", "filesCount": "",
"savedSpace": "Gespeicherter Speicherplatz: {value}", "savedSpace": "",
"healthChecks": "Gesundheitscheck", "healthChecks": "",
"videoCodecs": "Codecs", "videoCodecs": "",
"videoContainers": "Container", "videoContainers": "Container",
"videoResolutions": "Auflösungen" "videoResolutions": "Auflösungen"
}, },
@@ -1731,7 +1730,7 @@
"eta": "Voraussichtlicher Abschluss", "eta": "Voraussichtlicher Abschluss",
"progress": "Fortschritt", "progress": "Fortschritt",
"transcode": "Transkodieren", "transcode": "Transkodieren",
"healthCheck": "Gesundheitscheck" "healthCheck": ""
} }
}, },
"queue": { "queue": {
@@ -1740,52 +1739,52 @@
"file": "Datei", "file": "Datei",
"size": "Größe", "size": "Größe",
"transcode": "Transkodieren", "transcode": "Transkodieren",
"healthCheck": "Gesundheitscheck" "healthCheck": ""
} }
} }
} }
}, },
"rssFeed": { "rssFeed": {
"name": "RSS Feeds", "name": "",
"description": "Einen oder mehrere generische RSS, ATOM oder JSON-Feeds überwachen und anzeigen", "description": "",
"option": { "option": {
"feedUrls": { "feedUrls": {
"label": "Feed URLs" "label": ""
}, },
"enableRtl": { "enableRtl": {
"label": "RTL aktivieren" "label": ""
}, },
"textLinesClamp": { "textLinesClamp": {
"label": "Beschreibung line clamp" "label": ""
}, },
"maximumAmountPosts": { "maximumAmountPosts": {
"label": "Limit für Beiträge" "label": ""
} }
} }
} }
}, },
"widgetPreview": { "widgetPreview": {
"toggle": { "toggle": {
"enabled": "Bearbeitungsmodus aktiviert", "enabled": "",
"disabled": "Bearbeitungsmodus deaktiviert" "disabled": ""
}, },
"dimensions": { "dimensions": {
"title": "Dimensionen ändern" "title": ""
} }
}, },
"board": { "board": {
"action": { "action": {
"duplicate": { "duplicate": {
"title": "Board duplizieren", "title": "",
"message": "Dies wird das Board {name} mit all seinen Inhalten duplizieren. Wenn Widgets Integrationen, hinterlegt sind die Sie nicht verwenden dürfen, werden diese entfernt.", "message": "",
"notification": { "notification": {
"success": { "success": {
"title": "Board dupliziert", "title": "",
"message": "Das Board wurde erfolgreich dupliziert" "message": ""
}, },
"error": { "error": {
"title": "Board konnte nicht dupliziert werden", "title": "",
"message": "Das Board konnte nicht dupliziert werden" "message": ""
} }
} }
}, },
@@ -1793,24 +1792,24 @@
"notification": { "notification": {
"success": { "success": {
"title": "Änderungen erfolgreich angewendet", "title": "Änderungen erfolgreich angewendet",
"message": "Das Board wurde erfolgreich dupliziert" "message": ""
}, },
"error": { "error": {
"title": "Änderungen konnten nicht angewendet werden", "title": "Änderungen konnten nicht angewendet werden",
"message": "Das Board konnte nicht gespeichert werden" "message": ""
} }
}, },
"confirmLeave": { "confirmLeave": {
"title": "Nicht gespeicherte Änderungen", "title": "",
"message": "Sie haben ungespeicherte Änderungen, sind sie sicher dass sie abbrechen möchten?" "message": ""
} }
}, },
"oldImport": { "oldImport": {
"label": "Import von Homarr vor Version 1.0.0", "label": "",
"notification": { "notification": {
"success": { "success": {
"title": "Import erfolgreich", "title": "",
"message": "Das Board wurde erfolgreich importiert" "message": ""
}, },
"error": { "error": {
"title": "", "title": "",
@@ -1970,23 +1969,23 @@
"title": "Hintergrund" "title": "Hintergrund"
}, },
"color": { "color": {
"title": "Farben" "title": ""
}, },
"customCss": { "customCss": {
"title": "Benutzerdefiniertes CSS" "title": ""
}, },
"access": { "access": {
"title": "Zugriffskontrolle", "title": "",
"permission": { "permission": {
"item": { "item": {
"view": { "view": {
"label": "Board anzeigen" "label": "Board anzeigen"
}, },
"modify": { "modify": {
"label": "Board bearbeiten" "label": ""
}, },
"full": { "full": {
"label": "Voller Zugriff" "label": ""
} }
} }
} }
@@ -1995,41 +1994,41 @@
"title": "Gefahrenbereich", "title": "Gefahrenbereich",
"action": { "action": {
"rename": { "rename": {
"label": "Board umbenennen", "label": "",
"description": "Das Ändern des Namens wird alle Links zu diesem Board aufheben.", "description": "",
"button": "Namen ändern", "button": "",
"modal": { "modal": {
"title": "Board umbenennen" "title": ""
} }
}, },
"visibility": { "visibility": {
"label": "Sichtbarkeit des Boards ändern", "label": "",
"description": { "description": {
"public": "Dieses Board ist derzeit öffentlich.", "public": "",
"private": "Dieses Board ist derzeit privat." "private": ""
}, },
"button": { "button": {
"public": "Als privat festlegen", "public": "",
"private": "Als öffentlich festlegen" "private": ""
}, },
"confirm": { "confirm": {
"public": { "public": {
"title": "Board auf privat schalten", "title": "",
"description": "Sind Sie sicher, dass Sie dieses Board privat machen möchten? Dies wird das Board vor der Öffentlichkeit ausblenden. Links für Gastbenutzer werden unbrauchbar." "description": ""
}, },
"private": { "private": {
"title": "Board auf öffentlich schalten", "title": "",
"description": "Sind Sie sicher, dass Sie dieses Board öffentlich machen möchten? Dies wird das Board für alle zugänglich machen." "description": ""
} }
} }
}, },
"delete": { "delete": {
"label": "Board löschen", "label": "",
"description": "Sobald Sie ein Board löschen, gibt es kein zurück mehr. Bitte seien sie sich dessen bewusst.", "description": "",
"button": "Board löschen", "button": "",
"confirm": { "confirm": {
"title": "Board löschen", "title": "Board löschen",
"description": "Sind Sie sicher, dass Sie dieses Board löschen möchten? Dies wird das Board und seinen gesamten Inhalt permanent löschen." "description": ""
} }
} }
} }
@@ -2039,32 +2038,32 @@
"error": { "error": {
"noBoard": { "noBoard": {
"title": "Willkommen bei Homarr", "title": "Willkommen bei Homarr",
"description": "Ein schlankens, modernes Dashboard, das alle Ihre Apps und Dienste bereit stellt.", "description": "",
"link": "Erstellen Sie Ihr erstes Board", "link": "Erstellen Sie Ihr erstes Board",
"notice": "Um diese Seite verschwinden zu lassen, erstellen Sie ein Board und setzen es als Home Board" "notice": ""
}, },
"notFound": { "notFound": {
"title": "Board nicht gefunden", "title": "",
"description": "Das angegebene Board wurde entweder nicht gefunden oder Sie haben keinen Zugriff darauf.", "description": "",
"link": "Alle Boards anzeigen", "link": "Alle Boards anzeigen",
"notice": "Überprüfen Sie den Link oder wenden Sie sich an einen Administrator, wenn Sie glauben, dass er zugänglich sein sollte" "notice": ""
}, },
"homeBoard": { "homeBoard": {
"title": "Kein Home Board", "title": "",
"admin": { "admin": {
"description": "Es wurde noch kein Home Board für den Server festgelegt.", "description": "",
"link": "Serverweites Home Board konfigurieren", "link": "",
"notice": "Um diese Seite für alle Benutzer verschwinden zu lassen, legen sie ein Home-Board für den Server fest" "notice": ""
}, },
"user": { "user": {
"description": "Es wurde noch kein Home Board festgelegt.", "description": "",
"link": "Home Board konfigurieren", "link": "",
"notice": "Um diese Seite verschwinden zu lassen, geben Sie das Home Board in Ihren Einstellungen ein" "notice": ""
}, },
"anonymous": { "anonymous": {
"description": "Der Server-Administrator hat noch kein Home Board eingerichtet.", "description": "",
"link": "Öffentliche Boards anzeigen", "link": "",
"notice": "Um diese Seite verschwinden zu lassen, bitten sie den Server Administrator, ein Home Board für den Server festzulegen" "notice": ""
} }
} }
} }
@@ -2072,12 +2071,12 @@
"management": { "management": {
"metaTitle": "Verwaltung", "metaTitle": "Verwaltung",
"title": { "title": {
"morning": "Guten Morgen, {username}", "morning": "",
"afternoon": "Guten Nachmittag, {username}", "afternoon": "",
"evening": "Guten Abend, {username}" "evening": ""
}, },
"notFound": { "notFound": {
"title": "Nicht gefunden", "title": "",
"text": "" "text": ""
}, },
"navbar": { "navbar": {
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Allgemein", "title": "Allgemein",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Erster Tag der Woche", "firstDayOfWeek": "Erster Tag der Woche",
"accessibility": "Barrierefreiheit" "accessibility": "Barrierefreiheit"
@@ -2364,7 +2349,6 @@
"title": "", "title": "",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Γενικά", "title": "Γενικά",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Πρώτη ημέρα της εβδομάδας", "firstDayOfWeek": "Πρώτη ημέρα της εβδομάδας",
"accessibility": "Προσβασιμότητα" "accessibility": "Προσβασιμότητα"
@@ -2364,7 +2349,6 @@
"title": "Πίνακες", "title": "Πίνακες",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
-106
View File
@@ -733,14 +733,6 @@
"password": { "password": {
"label": "Password", "label": "Password",
"newLabel": "New password" "newLabel": "New password"
},
"tokenId": {
"label": "Token ID",
"newLabel": "New token ID"
},
"realm": {
"label": "Realm",
"newLabel": "New realm"
} }
} }
}, },
@@ -905,7 +897,6 @@
"passwordRequirements": "Password does not meet the requirements", "passwordRequirements": "Password does not meet the requirements",
"boardAlreadyExists": "A board with this name already exists", "boardAlreadyExists": "A board with this name already exists",
"invalidFileType": "Invalid file type, expected {expected}", "invalidFileType": "Invalid file type, expected {expected}",
"invalidFileName": "Invalid file name",
"fileTooLarge": "File is too large, maximum size is {maxSize}", "fileTooLarge": "File is too large, maximum size is {maxSize}",
"invalidConfiguration": "Invalid configuration", "invalidConfiguration": "Invalid configuration",
"groupNameTaken": "Group name already taken" "groupNameTaken": "Group name already taken"
@@ -1419,12 +1410,6 @@
}, },
"fileSystem": { "fileSystem": {
"label": "Show Filesystem Info" "label": "Show Filesystem Info"
},
"defaultTab": {
"label": "Default tab"
},
"sectionIndicatorRequirement": {
"label": "Section indicator requirement"
} }
}, },
"popover": { "popover": {
@@ -1444,52 +1429,6 @@
"memory": {}, "memory": {},
"error": { "error": {
"internalServerError": "Failed to fetch health status" "internalServerError": "Failed to fetch health status"
},
"cluster": {
"summary": {
"cpu": "CPU",
"memory": "RAM"
},
"resource": {
"node": {
"name": "Nodes"
},
"qemu": {
"name": "VMs"
},
"lxc": {
"name": "LXCs"
},
"storage": {
"name": "Storage"
}
},
"popover": {
"rightSection": {
"node": "Node",
"vmId": "VM ID",
"plugin": "Plugin"
},
"detail": {
"cpu": "Cores",
"memory": "Memory",
"storage": "Storage",
"uptime": "Uptime",
"haState": "HA State",
"storageType": {
"local": "Local storage",
"shared": "Shared storage"
}
}
},
"table": {
"header": {
"name": "Name",
"cpu": "CPU",
"memory": "RAM",
"node": "Node"
}
}
} }
}, },
"common": { "common": {
@@ -2162,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Logs", "logs": "Logs",
"api": "API", "api": "API",
"certificates": "Certificates",
"tasks": "Tasks" "tasks": "Tasks"
} }
}, },
@@ -2768,9 +2706,6 @@
}, },
"logs": { "logs": {
"label": "Logs" "label": "Logs"
},
"certificates": {
"label": "Certificates"
} }
}, },
"settings": { "settings": {
@@ -3166,46 +3101,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "Trusted certificates",
"description": "Used by Homarr to request data from integrations.",
"noResults": {
"title": "There are no certificates yet"
},
"expires": "Expires {when}"
}
},
"action": {
"create": {
"label": "Add certificate",
"notification": {
"success": {
"title": "Certificate added",
"message": "The certificate was added successfully"
},
"error": {
"title": "Failed to add certificate",
"message": "The certificate could not be added"
}
}
},
"remove": {
"label": "Remove certificate",
"confirm": "Are you sure you want to remove the certificate?",
"notification": {
"success": {
"title": "Certificate removed",
"message": "The certificate was removed successfully"
},
"error": {
"title": "Certificate not removed",
"message": "The certificate could not be removed"
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "", "title": "",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Primer día de la semana", "firstDayOfWeek": "Primer día de la semana",
"accessibility": "Accesibilidad" "accessibility": "Accesibilidad"
@@ -2364,7 +2349,6 @@
"title": "Tableros", "title": "Tableros",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "", "title": "",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "", "firstDayOfWeek": "",
"accessibility": "" "accessibility": ""
@@ -2364,7 +2349,6 @@
"title": "", "title": "",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Général", "title": "Général",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Premier jour de la semaine", "firstDayOfWeek": "Premier jour de la semaine",
"accessibility": "Accessibilité" "accessibility": "Accessibilité"
@@ -2364,7 +2349,6 @@
"title": "Tableaux de bord", "title": "Tableaux de bord",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "הסיסמה אינה עומדת בדרישות", "passwordRequirements": "הסיסמה אינה עומדת בדרישות",
"boardAlreadyExists": "לוח בשם זה כבר קיים", "boardAlreadyExists": "לוח בשם זה כבר קיים",
"invalidFileType": "סוג קובץ לא חוקי, צפוי {expected}", "invalidFileType": "סוג קובץ לא חוקי, צפוי {expected}",
"invalidFileName": "",
"fileTooLarge": "הקובץ גדול מדי, הגודל המרבי הוא {maxSize}", "fileTooLarge": "הקובץ גדול מדי, הגודל המרבי הוא {maxSize}",
"invalidConfiguration": "תצורה לא חוקית", "invalidConfiguration": "תצורה לא חוקית",
"groupNameTaken": "שם הקבוצה כבר תפוס" "groupNameTaken": "שם הקבוצה כבר תפוס"
@@ -2102,7 +2101,6 @@
"docker": "דוקר", "docker": "דוקר",
"logs": "קובצי לוג", "logs": "קובצי לוג",
"api": "ממשק API", "api": "ממשק API",
"certificates": "",
"tasks": "משימות" "tasks": "משימות"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "הלוח הזה יוצג כלוח הבית שלך" "tooltip": "הלוח הזה יוצג כלוח הבית שלך"
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "שכפול לוח" "label": "שכפול לוח"
}, },
@@ -2198,13 +2189,7 @@
"title": "כללי", "title": "כללי",
"item": { "item": {
"language": "שפה ואיזור", "language": "שפה ואיזור",
"board": { "board": "לוח בית",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "מנוע חיפוש ברירת מחדל", "defaultSearchEngine": "מנוע חיפוש ברירת מחדל",
"firstDayOfWeek": "היום הראשון בשבוע", "firstDayOfWeek": "היום הראשון בשבוע",
"accessibility": "נגישות" "accessibility": "נגישות"
@@ -2364,7 +2349,6 @@
"title": "לוחות", "title": "לוחות",
"homeBoard": { "homeBoard": {
"label": "לוח בית גלובלי", "label": "לוח בית גלובלי",
"mobileLabel": "",
"description": "רק לוחות ציבוריים זמינים לבחירה" "description": "רק לוחות ציבוריים זמינים לבחירה"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "קבצי לוג" "label": "קבצי לוג"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "קביעה כלוח הבית" "label": "קביעה כלוח הבית"
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "פתיחת הגדרות" "label": "פתיחת הגדרות"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Općenito", "title": "Općenito",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Prvi dan u tjednu", "firstDayOfWeek": "Prvi dan u tjednu",
"accessibility": "Pristupačnost" "accessibility": "Pristupačnost"
@@ -2364,7 +2349,6 @@
"title": "Daske", "title": "Daske",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Általános", "title": "Általános",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "Főoldal",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "A hét első napja", "firstDayOfWeek": "A hét első napja",
"accessibility": "Kisegítő lehetőségek" "accessibility": "Kisegítő lehetőségek"
@@ -2364,7 +2349,6 @@
"title": "Táblák", "title": "Táblák",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Generale", "title": "Generale",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Primo giorno della settimana", "firstDayOfWeek": "Primo giorno della settimana",
"accessibility": "Accessibilità" "accessibility": "Accessibilità"
@@ -2364,7 +2349,6 @@
"title": "", "title": "",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "一般", "title": "一般",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "週の初日", "firstDayOfWeek": "週の初日",
"accessibility": "アクセシビリティ" "accessibility": "アクセシビリティ"
@@ -2364,7 +2349,6 @@
"title": "ボード", "title": "ボード",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "일반", "title": "일반",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "요일별 요일", "firstDayOfWeek": "요일별 요일",
"accessibility": "접근성" "accessibility": "접근성"
@@ -2364,7 +2349,6 @@
"title": "보드", "title": "보드",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Bendras", "title": "Bendras",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "", "firstDayOfWeek": "",
"accessibility": "" "accessibility": ""
@@ -2364,7 +2349,6 @@
"title": "Lentos", "title": "Lentos",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Vispārīgi", "title": "Vispārīgi",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Nedēļas pirmā diena", "firstDayOfWeek": "Nedēļas pirmā diena",
"accessibility": "Piekļūstamība" "accessibility": "Piekļūstamība"
@@ -2364,7 +2349,6 @@
"title": "Dēļi", "title": "Dēļi",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "Wachtwoord voldoet niet aan de eisen", "passwordRequirements": "Wachtwoord voldoet niet aan de eisen",
"boardAlreadyExists": "Er bestaat al een bord met deze naam", "boardAlreadyExists": "Er bestaat al een bord met deze naam",
"invalidFileType": "Ongeldig bestandstype, verwachtte {expected}", "invalidFileType": "Ongeldig bestandstype, verwachtte {expected}",
"invalidFileName": "",
"fileTooLarge": "Bestand is te groot, maximale grootte is {maxSize}", "fileTooLarge": "Bestand is te groot, maximale grootte is {maxSize}",
"invalidConfiguration": "Ongeldige configuratie", "invalidConfiguration": "Ongeldige configuratie",
"groupNameTaken": "Groepsnaam al in gebruik" "groupNameTaken": "Groepsnaam al in gebruik"
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Logs", "logs": "Logs",
"api": "API", "api": "API",
"certificates": "",
"tasks": "Taken" "tasks": "Taken"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "Dit bord wordt weergegeven als je home-bord" "tooltip": "Dit bord wordt weergegeven als je home-bord"
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Algemeen", "title": "Algemeen",
"item": { "item": {
"language": "Taal & regio", "language": "Taal & regio",
"board": { "board": "Home-bord",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Eerste dag van de week", "firstDayOfWeek": "Eerste dag van de week",
"accessibility": "Toegankelijkheid" "accessibility": "Toegankelijkheid"
@@ -2364,7 +2349,6 @@
"title": "Borden", "title": "Borden",
"homeBoard": { "homeBoard": {
"label": "Globaal home-bord", "label": "Globaal home-bord",
"mobileLabel": "",
"description": "Alleen openbare borden zijn beschikbaar voor selectie" "description": "Alleen openbare borden zijn beschikbaar voor selectie"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "Logs" "label": "Logs"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "Instellen als home-bord" "label": "Instellen als home-bord"
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "Instellingen openen" "label": "Instellingen openen"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Generelt", "title": "Generelt",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Første dag i uken", "firstDayOfWeek": "Første dag i uken",
"accessibility": "Hjelpemidler" "accessibility": "Hjelpemidler"
@@ -2364,7 +2349,6 @@
"title": "Tavler", "title": "Tavler",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "Twoje hasło nie spełnia wymagań.", "passwordRequirements": "Twoje hasło nie spełnia wymagań.",
"boardAlreadyExists": "Tablica o tej nazwie już istnieje", "boardAlreadyExists": "Tablica o tej nazwie już istnieje",
"invalidFileType": "Nieprawidłowy typ pliku, oczekiwany {expected}", "invalidFileType": "Nieprawidłowy typ pliku, oczekiwany {expected}",
"invalidFileName": "",
"fileTooLarge": "Plik jest zbyt duży, maksymalny rozmiar to {maxSize}", "fileTooLarge": "Plik jest zbyt duży, maksymalny rozmiar to {maxSize}",
"invalidConfiguration": "Nieprawidłowa konfiguracja", "invalidConfiguration": "Nieprawidłowa konfiguracja",
"groupNameTaken": "Nazwa użytkownika jest już zajęta" "groupNameTaken": "Nazwa użytkownika jest już zajęta"
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Ogólne", "title": "Ogólne",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Pierwszy dzień tygodnia", "firstDayOfWeek": "Pierwszy dzień tygodnia",
"accessibility": "Ułatwienia dostępu" "accessibility": "Ułatwienia dostępu"
@@ -2364,7 +2349,6 @@
"title": "Tablice", "title": "Tablice",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Geral", "title": "Geral",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Primeiro dia da semana", "firstDayOfWeek": "Primeiro dia da semana",
"accessibility": "Acessibilidade" "accessibility": "Acessibilidade"
@@ -2364,7 +2349,6 @@
"title": "Placas", "title": "Placas",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "", "title": "",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Prima zi a săptămâni", "firstDayOfWeek": "Prima zi a săptămâni",
"accessibility": "Accesibilitate" "accessibility": "Accesibilitate"
@@ -2364,7 +2349,6 @@
"title": "Planșe", "title": "Planșe",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "Пароль не соответствует требованиям", "passwordRequirements": "Пароль не соответствует требованиям",
"boardAlreadyExists": "Панель с таким именем уже существует", "boardAlreadyExists": "Панель с таким именем уже существует",
"invalidFileType": "Неверный тип файла, ожидается {expected}", "invalidFileType": "Неверный тип файла, ожидается {expected}",
"invalidFileName": "",
"fileTooLarge": "Файл слишком большой, максимальный размер {maxSize}", "fileTooLarge": "Файл слишком большой, максимальный размер {maxSize}",
"invalidConfiguration": "Неверная конфигурация", "invalidConfiguration": "Неверная конфигурация",
"groupNameTaken": "Имя группы уже занято" "groupNameTaken": "Имя группы уже занято"
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Логи", "logs": "Логи",
"api": "API", "api": "API",
"certificates": "",
"tasks": "Задачи" "tasks": "Задачи"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "Эта панель будет показываться как ваша домашняя панель" "tooltip": "Эта панель будет показываться как ваша домашняя панель"
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Общие", "title": "Общие",
"item": { "item": {
"language": "Язык и регион", "language": "Язык и регион",
"board": { "board": "Домашняя панель",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Первый день недели", "firstDayOfWeek": "Первый день недели",
"accessibility": "Специальные возможности" "accessibility": "Специальные возможности"
@@ -2364,7 +2349,6 @@
"title": "Панели", "title": "Панели",
"homeBoard": { "homeBoard": {
"label": "Общая домашняя панель", "label": "Общая домашняя панель",
"mobileLabel": "",
"description": "Для выбора доступны только публичные панели" "description": "Для выбора доступны только публичные панели"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "Логи" "label": "Логи"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "Сделать домашней панелью" "label": "Сделать домашней панелью"
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "Открыть настройки" "label": "Открыть настройки"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+4 -67
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "Heslo nespĺňa požiadavky", "passwordRequirements": "Heslo nespĺňa požiadavky",
"boardAlreadyExists": "Doska s týmto názvom už existuje", "boardAlreadyExists": "Doska s týmto názvom už existuje",
"invalidFileType": "Neplatný typ súboru, očakáva sa {expected}", "invalidFileType": "Neplatný typ súboru, očakáva sa {expected}",
"invalidFileName": "",
"fileTooLarge": "Súbor je príliš veľký, maximálna veľkosť je {maxSize}", "fileTooLarge": "Súbor je príliš veľký, maximálna veľkosť je {maxSize}",
"invalidConfiguration": "Neplatná konfigurácia", "invalidConfiguration": "Neplatná konfigurácia",
"groupNameTaken": "Názov skupiny je už obsadený" "groupNameTaken": "Názov skupiny je už obsadený"
@@ -967,7 +966,7 @@
}, },
"create": { "create": {
"title": "Vyberte položku, ktorú chcete pridať", "title": "Vyberte položku, ktorú chcete pridať",
"search": "Filtrovať položky", "search": "",
"addToBoard": "Pridať na dosku" "addToBoard": "Pridať na dosku"
}, },
"moveResize": { "moveResize": {
@@ -1094,7 +1093,7 @@
"dnsQueriesToday": "Poziadavky dnes", "dnsQueriesToday": "Poziadavky dnes",
"domainsBeingBlocked": "Domény na adlistoch" "domainsBeingBlocked": "Domény na adlistoch"
}, },
"domainsTooltip": "Kvôli viacerým integráciám nemôže Homarr vypočítať presný počet blokovaných domén" "domainsTooltip": ""
}, },
"dnsHoleControls": { "dnsHoleControls": {
"name": "Kontrola diery DNS", "name": "Kontrola diery DNS",
@@ -1283,7 +1282,7 @@
}, },
"error": { "error": {
"noUrl": "Nie je uvedená žiadna adresa URL iFrame", "noUrl": "Nie je uvedená žiadna adresa URL iFrame",
"unsupportedProtocol": "Uvedená adresa URL používa nepodporovaný protokol. Použite jeden z ({supportedProtocols})", "unsupportedProtocol": "",
"noBrowerSupport": "Váš prehliadač nepodporuje iframe. Aktualizujte svoj prehliadač." "noBrowerSupport": "Váš prehliadač nepodporuje iframe. Aktualizujte svoj prehliadač."
} }
}, },
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Záznamy", "logs": "Záznamy",
"api": "API", "api": "API",
"certificates": "",
"tasks": "Úlohy" "tasks": "Úlohy"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "Táto tabuľa sa zobrazí ako vaša domovská tabuľa" "tooltip": "Táto tabuľa sa zobrazí ako vaša domovská tabuľa"
} }
}, },
"setMobileHomeBoard": {
"label": "Nastaviť ako mobilnú tabuľu",
"badge": {
"label": "Mobilný",
"tooltip": "Táto tabuľa sa zobrazí ako vaša mobilná tabuľa"
}
},
"duplicate": { "duplicate": {
"label": "Duplikovať dosku" "label": "Duplikovať dosku"
}, },
@@ -2198,13 +2189,7 @@
"title": "Všeobecné", "title": "Všeobecné",
"item": { "item": {
"language": "Jazyk a región", "language": "Jazyk a región",
"board": { "board": "Domáca doska",
"title": "Domáca doska",
"type": {
"general": "Hlavné",
"mobile": "Mobilná"
}
},
"defaultSearchEngine": "Predvolený vyhľadávací nástroj", "defaultSearchEngine": "Predvolený vyhľadávací nástroj",
"firstDayOfWeek": "Prvý deň v týždni", "firstDayOfWeek": "Prvý deň v týždni",
"accessibility": "Prístupnosť" "accessibility": "Prístupnosť"
@@ -2364,7 +2349,6 @@
"title": "Dosky", "title": "Dosky",
"homeBoard": { "homeBoard": {
"label": "Globálna domovská nástenka", "label": "Globálna domovská nástenka",
"mobileLabel": "Globálna mobilná doska",
"description": "Na výber sú k dispozícii iba verejné tabule" "description": "Na výber sú k dispozícii iba verejné tabule"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "Záznamy" "label": "Záznamy"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "Nastaviť ako domácu dosku" "label": "Nastaviť ako domácu dosku"
}, },
"mobileBoard": {
"label": "Nastaviť ako mobilnú tabuľu"
},
"settings": { "settings": {
"label": "Otvorte nastavenia" "label": "Otvorte nastavenia"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Splošno", "title": "Splošno",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Prvi dan v tednu", "firstDayOfWeek": "Prvi dan v tednu",
"accessibility": "Dostopnost" "accessibility": "Dostopnost"
@@ -2364,7 +2349,6 @@
"title": "Deske", "title": "Deske",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Allmänt", "title": "Allmänt",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Första veckodagen", "firstDayOfWeek": "Första veckodagen",
"accessibility": "Tillgänglighet" "accessibility": "Tillgänglighet"
@@ -2364,7 +2349,6 @@
"title": "Tavlor", "title": "Tavlor",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+6 -69
View File
@@ -51,13 +51,13 @@
"title": "İçe Aktarma Token'ını Girin", "title": "İçe Aktarma Token'ını Girin",
"field": { "field": {
"token": { "token": {
"label": "Token", "label": "Erişim Anahtarı",
"description": "Önceki Homarr Örneğinizden Aldığınız İçe Aktarma Token'ını girin" "description": "Önceki Homarr Örneğinizden Aldığınız İçe Aktarma Token'ını girin"
} }
}, },
"notification": { "notification": {
"error": { "error": {
"title": "Token", "title": "Geçersiz Token",
"message": "Girdiğiniz Token Geçersiz" "message": "Girdiğiniz Token Geçersiz"
} }
} }
@@ -897,7 +897,6 @@
"passwordRequirements": "Parola gereksinimleri karşılamıyor", "passwordRequirements": "Parola gereksinimleri karşılamıyor",
"boardAlreadyExists": "Bu isimde bir panel zaten mevcut", "boardAlreadyExists": "Bu isimde bir panel zaten mevcut",
"invalidFileType": "Geçersiz dosya türü, {expected} bekleniyor", "invalidFileType": "Geçersiz dosya türü, {expected} bekleniyor",
"invalidFileName": "",
"fileTooLarge": "Dosya çok büyük, azami boyut {maxSize}", "fileTooLarge": "Dosya çok büyük, azami boyut {maxSize}",
"invalidConfiguration": "Geçersiz yapılandırma", "invalidConfiguration": "Geçersiz yapılandırma",
"groupNameTaken": "Grup adı zaten alınmış" "groupNameTaken": "Grup adı zaten alınmış"
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Günlükler", "logs": "Günlükler",
"api": "API", "api": "API",
"certificates": "",
"tasks": "Görevler" "tasks": "Görevler"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "Bu panel sizin öntanımlı paneliniz olarak görüntülenecektir" "tooltip": "Bu panel sizin öntanımlı paneliniz olarak görüntülenecektir"
} }
}, },
"setMobileHomeBoard": {
"label": "Mobil Panel Olarak Ata",
"badge": {
"label": "Mobil",
"tooltip": "Bu panel sizin mobil paneliniz olarak görüntülenecektir"
}
},
"duplicate": { "duplicate": {
"label": "Paneli Kopyala" "label": "Paneli Kopyala"
}, },
@@ -2198,13 +2189,7 @@
"title": "Genel", "title": "Genel",
"item": { "item": {
"language": "Dil & Bölge", "language": "Dil & Bölge",
"board": { "board": "Öntanımlı panel",
"title": "Ana Panel",
"type": {
"general": "Genel",
"mobile": "Mobil"
}
},
"defaultSearchEngine": "Öntanımlı arama motoru", "defaultSearchEngine": "Öntanımlı arama motoru",
"firstDayOfWeek": "Haftanın ilk günü", "firstDayOfWeek": "Haftanın ilk günü",
"accessibility": "Erişilebilirlik" "accessibility": "Erişilebilirlik"
@@ -2283,7 +2268,7 @@
"label": "Son geçerlilik tarihi" "label": "Son geçerlilik tarihi"
}, },
"token": { "token": {
"label": "Token" "label": "Erişim Anahtarı"
} }
} }
} }
@@ -2364,7 +2349,6 @@
"title": "Paneller", "title": "Paneller",
"homeBoard": { "homeBoard": {
"label": "Genel Ana Sayfa Paneli", "label": "Genel Ana Sayfa Paneli",
"mobileLabel": "Genel Mobil Panel",
"description": "Seçim yalnızca herkese açık paneller için kullanılabilir" "description": "Seçim yalnızca herkese açık paneller için kullanılabilir"
} }
}, },
@@ -2460,7 +2444,7 @@
"modal": { "modal": {
"createApiToken": { "createApiToken": {
"title": "API token'ı oluşturuldu", "title": "API token'ı oluşturuldu",
"description": "API anahtarı oluşturuldu. Dikkatli olun, bu anahtar veritabanında şifrelenmiştir ve size bir daha asla aktarılmayacaktır. Bu anaharı kaybederseniz, bir daha erişmeniz mümkün değildir.", "description": "API token'ı oluşturuldu. Dikkatli olun, bu token veritabanında şifrelenmiştir ve size bir daha asla aktarılmayacaktır. Bu belirteci kaybederseniz, bu token'ı artık geri alamazsınız.",
"button": "Kopyala ve kapat" "button": "Kopyala ve kapat"
} }
}, },
@@ -2613,7 +2597,7 @@
} }
}, },
"modal": { "modal": {
"title": "Docker Konteynerleri Homarr'a Ekle" "title": "Homarr'a docker konteyner(-ler)i ekleyin"
} }
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "Günlükler" "label": "Günlükler"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "Öntanımlı panel olarak ata" "label": "Öntanımlı panel olarak ata"
}, },
"mobileBoard": {
"label": "Mobil Panel Olarak Ata"
},
"settings": { "settings": {
"label": "Ayarları aç" "label": "Ayarları aç"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Загальне", "title": "Загальне",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Перший день тижня", "firstDayOfWeek": "Перший день тижня",
"accessibility": "Доступність" "accessibility": "Доступність"
@@ -2364,7 +2349,6 @@
"title": "Дошки", "title": "Дошки",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "", "passwordRequirements": "",
"boardAlreadyExists": "", "boardAlreadyExists": "",
"invalidFileType": "", "invalidFileType": "",
"invalidFileName": "",
"fileTooLarge": "", "fileTooLarge": "",
"invalidConfiguration": "", "invalidConfiguration": "",
"groupNameTaken": "" "groupNameTaken": ""
@@ -2102,7 +2101,6 @@
"docker": "", "docker": "",
"logs": "", "logs": "",
"api": "", "api": "",
"certificates": "",
"tasks": "" "tasks": ""
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "" "tooltip": ""
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "" "label": ""
}, },
@@ -2198,13 +2189,7 @@
"title": "Chung", "title": "Chung",
"item": { "item": {
"language": "", "language": "",
"board": { "board": "",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "", "defaultSearchEngine": "",
"firstDayOfWeek": "Ngày đầu tiên trong tuần", "firstDayOfWeek": "Ngày đầu tiên trong tuần",
"accessibility": "Trợ năng" "accessibility": "Trợ năng"
@@ -2364,7 +2349,6 @@
"title": "Bảng", "title": "Bảng",
"homeBoard": { "homeBoard": {
"label": "", "label": "",
"mobileLabel": "",
"description": "" "description": ""
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "" "label": ""
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "" "label": ""
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "" "label": ""
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
+1 -64
View File
@@ -897,7 +897,6 @@
"passwordRequirements": "密碼不符合要求", "passwordRequirements": "密碼不符合要求",
"boardAlreadyExists": "此面板名稱已存在", "boardAlreadyExists": "此面板名稱已存在",
"invalidFileType": "無效的檔案類型,例如 {expected}", "invalidFileType": "無效的檔案類型,例如 {expected}",
"invalidFileName": "",
"fileTooLarge": "檔案太大,最大大小為 {maxSize}", "fileTooLarge": "檔案太大,最大大小為 {maxSize}",
"invalidConfiguration": "無效設定", "invalidConfiguration": "無效設定",
"groupNameTaken": "用戶組名稱已存在" "groupNameTaken": "用戶組名稱已存在"
@@ -2102,7 +2101,6 @@
"docker": "Docker", "docker": "Docker",
"logs": "Logs", "logs": "Logs",
"api": "API", "api": "API",
"certificates": "",
"tasks": "任務" "tasks": "任務"
} }
}, },
@@ -2155,13 +2153,6 @@
"tooltip": "此面板將顯示為主面板" "tooltip": "此面板將顯示為主面板"
} }
}, },
"setMobileHomeBoard": {
"label": "",
"badge": {
"label": "",
"tooltip": ""
}
},
"duplicate": { "duplicate": {
"label": "複製面板" "label": "複製面板"
}, },
@@ -2198,13 +2189,7 @@
"title": "一般", "title": "一般",
"item": { "item": {
"language": "語言與地區", "language": "語言與地區",
"board": { "board": "主面板",
"title": "",
"type": {
"general": "",
"mobile": ""
}
},
"defaultSearchEngine": "預設搜尋引擎", "defaultSearchEngine": "預設搜尋引擎",
"firstDayOfWeek": "一周的第一天", "firstDayOfWeek": "一周的第一天",
"accessibility": "無障礙服務" "accessibility": "無障礙服務"
@@ -2364,7 +2349,6 @@
"title": "面板", "title": "面板",
"homeBoard": { "homeBoard": {
"label": "全局主面板", "label": "全局主面板",
"mobileLabel": "",
"description": "只有公開面板可供選擇" "description": "只有公開面板可供選擇"
} }
}, },
@@ -2708,9 +2692,6 @@
}, },
"logs": { "logs": {
"label": "Logs" "label": "Logs"
},
"certificates": {
"label": ""
} }
}, },
"settings": { "settings": {
@@ -2757,9 +2738,6 @@
"homeBoard": { "homeBoard": {
"label": "設定為主面板" "label": "設定為主面板"
}, },
"mobileBoard": {
"label": ""
},
"settings": { "settings": {
"label": "開啟設定" "label": "開啟設定"
} }
@@ -3106,46 +3084,5 @@
} }
} }
} }
},
"certificate": {
"page": {
"list": {
"title": "",
"description": "",
"noResults": {
"title": ""
},
"expires": ""
}
},
"action": {
"create": {
"label": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
},
"remove": {
"label": "",
"confirm": "",
"notification": {
"success": {
"title": "",
"message": ""
},
"error": {
"title": "",
"message": ""
}
}
}
}
} }
} }
-52
View File
@@ -1,52 +0,0 @@
import { z } from "zod";
import { createCustomErrorParams } from "./form/i18n";
const validFileNameSchema = z.string().regex(/^[\w\-. ]+$/);
export const superRefineCertificateFile = (value: File | null, context: z.RefinementCtx) => {
if (!value) {
return context.addIssue({
code: "invalid_type",
expected: "object",
received: "null",
});
}
const result = validFileNameSchema.safeParse(value.name);
if (!result.success) {
return context.addIssue({
code: "custom",
params: createCustomErrorParams({
key: "invalidFileName",
params: {},
}),
});
}
if (value.type !== "application/x-x509-ca-cert" && value.type !== "application/pkix-cert") {
return context.addIssue({
code: "custom",
params: createCustomErrorParams({
key: "invalidFileType",
params: { expected: ".crt" },
}),
});
}
if (value.size > 1024 * 1024) {
return context.addIssue({
code: "custom",
params: createCustomErrorParams({
key: "fileTooLarge",
params: { maxSize: "1 MB" },
}),
});
}
return null;
};
export const certificateSchemas = {
validFileNameSchema,
};
-3
View File
@@ -1,6 +1,5 @@
import { appSchemas } from "./app"; import { appSchemas } from "./app";
import { boardSchemas } from "./board"; import { boardSchemas } from "./board";
import { certificateSchemas } from "./certificates";
import { commonSchemas } from "./common"; import { commonSchemas } from "./common";
import { groupSchemas } from "./group"; import { groupSchemas } from "./group";
import { iconsSchemas } from "./icons"; import { iconsSchemas } from "./icons";
@@ -25,7 +24,6 @@ export const validation = {
media: mediaSchemas, media: mediaSchemas,
settings: settingsSchemas, settings: settingsSchemas,
common: commonSchemas, common: commonSchemas,
certificates: certificateSchemas,
}; };
export { export {
@@ -35,7 +33,6 @@ export {
type BoardItemAdvancedOptions, type BoardItemAdvancedOptions,
type BoardItemIntegration, type BoardItemIntegration,
} from "./shared"; } from "./shared";
export { superRefineCertificateFile } from "./certificates";
export { passwordRequirements } from "./user"; export { passwordRequirements } from "./user";
export { supportedMediaUploadFormats } from "./media"; export { supportedMediaUploadFormats } from "./media";
export { zodEnumFromArray, zodUnionFromArray } from "./enums"; export { zodEnumFromArray, zodUnionFromArray } from "./enums";
@@ -1,187 +0,0 @@
import { Accordion, Center, Flex, Group, RingProgress, Stack, Text } from "@mantine/core";
import { IconBrain, IconCpu, IconCube, IconDatabase, IconDeviceLaptop, IconServer } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
import type { Resource } from "@homarr/integrations/types";
import { useI18n } from "@homarr/translation/client";
import type { WidgetComponentProps } from "../../definition";
import { formatUptime } from "../system-health";
import { ResourceAccordionItem } from "./resource-accordion-item";
import { ResourceTable } from "./resource-table";
const addBadgeColor = ({
activeCount,
totalCount,
sectionIndicatorRequirement,
}: {
activeCount: number;
totalCount: number;
sectionIndicatorRequirement: WidgetComponentProps<"healthMonitoring">["options"]["sectionIndicatorRequirement"];
}) => ({
color: activeCount === totalCount || (sectionIndicatorRequirement === "any" && activeCount >= 1) ? "green" : "orange",
activeCount,
totalCount,
});
const running = (total: number, current: Resource) => {
return current.isRunning ? total + 1 : total;
};
export const ClusterHealthMonitoring = ({
integrationId,
options,
}: WidgetComponentProps<"healthMonitoring"> & { integrationId: string }) => {
const t = useI18n();
const [healthData] = clientApi.widget.healthMonitoring.getClusterHealthStatus.useSuspenseQuery(
{
integrationId,
},
{
refetchOnMount: false,
refetchOnWindowFocus: false,
refetchOnReconnect: false,
retry: false,
},
);
const utils = clientApi.useUtils();
clientApi.widget.healthMonitoring.subscribeClusterHealthStatus.useSubscription(
{ integrationId },
{
onData(data) {
utils.widget.healthMonitoring.getClusterHealthStatus.setData({ integrationId }, data);
},
},
);
const activeNodes = healthData.nodes.reduce(running, 0);
const activeVMs = healthData.vms.reduce(running, 0);
const activeLXCs = healthData.lxcs.reduce(running, 0);
const activeStorage = healthData.storages.reduce(running, 0);
const usedMem = healthData.nodes.reduce((sum, item) => (item.isRunning ? item.memory.used + sum : sum), 0);
const maxMem = healthData.nodes.reduce((sum, item) => (item.isRunning ? item.memory.total + sum : sum), 0);
const maxCpu = healthData.nodes.reduce((sum, item) => (item.isRunning ? item.cpu.cores + sum : sum), 0);
const usedCpu = healthData.nodes.reduce(
(sum, item) => (item.isRunning ? item.cpu.utilization * item.cpu.cores + sum : sum),
0,
);
const uptime = healthData.nodes.reduce((sum, { uptime }) => (sum > uptime ? sum : uptime), 0);
const cpuPercent = maxCpu ? (usedCpu / maxCpu) * 100 : 0;
const memPercent = maxMem ? (usedMem / maxMem) * 100 : 0;
return (
<Stack h="100%">
<Group justify="center" wrap="nowrap" pt="md">
<Text fz="md" tt="uppercase" fw={700} c="dimmed" ta="center">
{formatUptime(uptime, t)}
</Text>
</Group>
<SummaryHeader cpu={cpuPercent} memory={memPercent} />
<Accordion variant="contained" chevronPosition="right" multiple defaultValue={["node"]}>
<ResourceAccordionItem
value="node"
title={t("widget.healthMonitoring.cluster.resource.node.name")}
icon={IconServer}
badge={addBadgeColor({
activeCount: activeNodes,
totalCount: healthData.nodes.length,
sectionIndicatorRequirement: options.sectionIndicatorRequirement,
})}
>
<ResourceTable type="node" data={healthData.nodes} />
</ResourceAccordionItem>
<ResourceAccordionItem
value="qemu"
title={t("widget.healthMonitoring.cluster.resource.qemu.name")}
icon={IconDeviceLaptop}
badge={addBadgeColor({
activeCount: activeVMs,
totalCount: healthData.vms.length,
sectionIndicatorRequirement: options.sectionIndicatorRequirement,
})}
>
<ResourceTable type="qemu" data={healthData.vms} />
</ResourceAccordionItem>
<ResourceAccordionItem
value="lxc"
title={t("widget.healthMonitoring.cluster.resource.lxc.name")}
icon={IconCube}
badge={addBadgeColor({
activeCount: activeLXCs,
totalCount: healthData.lxcs.length,
sectionIndicatorRequirement: options.sectionIndicatorRequirement,
})}
>
<ResourceTable type="lxc" data={healthData.lxcs} />
</ResourceAccordionItem>
<ResourceAccordionItem
value="storage"
title={t("widget.healthMonitoring.cluster.resource.storage.name")}
icon={IconDatabase}
badge={addBadgeColor({
activeCount: activeStorage,
totalCount: healthData.storages.length,
sectionIndicatorRequirement: options.sectionIndicatorRequirement,
})}
>
<ResourceTable type="storage" data={healthData.storages} />
</ResourceAccordionItem>
</Accordion>
</Stack>
);
};
interface SummaryHeaderProps {
cpu: number;
memory: number;
}
const SummaryHeader = ({ cpu, memory }: SummaryHeaderProps) => {
const t = useI18n();
return (
<Center>
<Group wrap="nowrap">
<Flex direction="row">
<RingProgress
roundCaps
size={60}
thickness={6}
label={
<Center>
<IconCpu />
</Center>
}
sections={[{ value: cpu, color: cpu > 75 ? "orange" : "green" }]}
/>
<Stack align="center" justify="center" gap={0}>
<Text fw={500}>{t("widget.healthMonitoring.cluster.summary.cpu")}</Text>
<Text>{cpu.toFixed(1)}%</Text>
</Stack>
</Flex>
<Flex>
<RingProgress
roundCaps
size={60}
thickness={6}
label={
<Center>
<IconBrain />
</Center>
}
sections={[{ value: memory, color: memory > 75 ? "orange" : "green" }]}
/>
<Stack align="center" justify="center" gap={0}>
<Text fw={500}>{t("widget.healthMonitoring.cluster.summary.memory")}</Text>
<Text>{memory.toFixed(1)}%</Text>
</Stack>
</Flex>
</Group>
</Center>
);
};
Loaded 100 of 110 files, more files were not shown because too many files have changed in this diff. Show more