chore(release): automatic release v1.70.0
This commit is contained in:
7 files changed
+18
-40
No files matched your search
@@ -105,7 +105,7 @@ export const ManageTourProvider = ({ children, isAdmin }: ManageTourProviderProp
|
|||||||
content: (
|
content: (
|
||||||
<TourStepContent
|
<TourStepContent
|
||||||
description={t("welcome.description")}
|
description={t("welcome.description")}
|
||||||
documentationHref={createDocumentationLink("/docs/category/management")}
|
documentationHref={createDocumentationLink("/docs/management/boards")}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const mediaOrganizerRouter = createTRPCRouter({
|
|||||||
const results = await Promise.all(
|
const results = await Promise.all(
|
||||||
ctx.integrations.map(async (integration) => {
|
ctx.integrations.map(async (integration) => {
|
||||||
const innerHandler = mediaOrganizerRequestHandler.handler(integration, { pageSize: input.pageSize });
|
const innerHandler = mediaOrganizerRequestHandler.handler(integration, { pageSize: input.pageSize });
|
||||||
const { data } = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
|
const { data } = await innerHandler.getDataAsync();
|
||||||
return {
|
return {
|
||||||
integrationId: integration.id,
|
integrationId: integration.id,
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ const integrationAliases: Partial<Record<IntegrationKind, readonly string[]>> =
|
|||||||
navidrome: ["navidrome"],
|
navidrome: ["navidrome"],
|
||||||
paperlessNgx: ["paperless-ngx", "paperless"],
|
paperlessNgx: ["paperless-ngx", "paperless"],
|
||||||
patchmon: ["patchmon", "patch-mon"],
|
patchmon: ["patchmon", "patch-mon"],
|
||||||
searchCh: ["search-ch"],
|
|
||||||
gitHubContainerRegistry: ["ghcr"],
|
|
||||||
linuxServerIO: ["linuxserver"],
|
|
||||||
coolify: ["coolify"],
|
coolify: ["coolify"],
|
||||||
truenas: ["truenas"],
|
truenas: ["truenas"],
|
||||||
bazarr: ["bazarr"],
|
bazarr: ["bazarr"],
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/h
|
|||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
|
||||||
import type { SessionStore } from "../base/session-store";
|
import type { SessionStore } from "../base/session-store";
|
||||||
|
import type { SynologyDiskRecord, SynologyVolumeRecord } from "./synology-types";
|
||||||
import {
|
import {
|
||||||
AUTH_API_NAME,
|
AUTH_API_NAME,
|
||||||
INFO_API_NAME,
|
INFO_API_NAME,
|
||||||
@@ -23,8 +24,6 @@ import {
|
|||||||
synologyUpgradeCheckDataSchema,
|
synologyUpgradeCheckDataSchema,
|
||||||
synologyUpgradeStatusDataSchema,
|
synologyUpgradeStatusDataSchema,
|
||||||
synologyUtilizationDataSchema,
|
synologyUtilizationDataSchema,
|
||||||
type SynologyDiskRecord,
|
|
||||||
type SynologyVolumeRecord,
|
|
||||||
} from "./synology-types";
|
} from "./synology-types";
|
||||||
|
|
||||||
const logger = createLogger({ module: "synologyClient" });
|
const logger = createLogger({ module: "synologyClient" });
|
||||||
@@ -158,13 +157,7 @@ export class SynologyClient {
|
|||||||
if (!name) {
|
if (!name) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.mapVolumeRecord(
|
return this.mapVolumeRecord(name, volume.size?.used, volume.size?.total, volume.status, volume.display_name);
|
||||||
name,
|
|
||||||
volume.size?.used,
|
|
||||||
volume.size?.total,
|
|
||||||
volume.status,
|
|
||||||
volume.display_name,
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.filter((volume): volume is SynologyVolumeRecord => volume !== null);
|
.filter((volume): volume is SynologyVolumeRecord => volume !== null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { Response } from "undici";
|
import { Response } from "undici";
|
||||||
import { beforeEach, describe, expect, test, vi } from "vitest";
|
import { beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
import type { z } from "zod";
|
||||||
|
|
||||||
vi.hoisted(() => {
|
vi.hoisted(() => {
|
||||||
process.env.CI = "true";
|
process.env.CI = "true";
|
||||||
@@ -37,6 +38,7 @@ import { IntegrationResponseError } from "../../base/errors/http/integration-res
|
|||||||
|
|
||||||
import type { IntegrationSecret } from "../../base/types";
|
import type { IntegrationSecret } from "../../base/types";
|
||||||
import { SynologyIntegration } from "../synology-integration";
|
import { SynologyIntegration } from "../synology-integration";
|
||||||
|
import type { synologyStorageV2DataSchema, synologyUtilizationDataSchema } from "../synology-types";
|
||||||
|
|
||||||
const TEST_URL = "https://synology.example.com:5001";
|
const TEST_URL = "https://synology.example.com:5001";
|
||||||
const mockFetch = vi.mocked(fetchWithTrustedCertificatesAsync);
|
const mockFetch = vi.mocked(fetchWithTrustedCertificatesAsync);
|
||||||
@@ -202,8 +204,8 @@ const mockSuccessfulFlow = (options?: {
|
|||||||
success: boolean;
|
success: boolean;
|
||||||
data: Record<string, unknown>;
|
data: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
utilization?: typeof utilizationResponse;
|
utilization?: { success: boolean; data: z.input<typeof synologyUtilizationDataSchema> };
|
||||||
storageV2?: typeof storageV2Response;
|
storageV2?: { success: boolean; data: z.input<typeof synologyStorageV2DataSchema> };
|
||||||
storageLoadInfo?: typeof storageLoadInfoResponse;
|
storageLoadInfo?: typeof storageLoadInfoResponse;
|
||||||
}) => {
|
}) => {
|
||||||
mockFetch.mockImplementation((url) => {
|
mockFetch.mockImplementation((url) => {
|
||||||
@@ -241,9 +243,9 @@ const mockSuccessfulFlow = (options?: {
|
|||||||
new Response(JSON.stringify({ success: false, error: { code: 103 } }), { status: 200 }),
|
new Response(JSON.stringify({ success: false, error: { code: 103 } }), { status: 200 }),
|
||||||
) as unknown as ReturnType<typeof fetchWithTrustedCertificatesAsync>;
|
) as unknown as ReturnType<typeof fetchWithTrustedCertificatesAsync>;
|
||||||
}
|
}
|
||||||
return Promise.resolve(new Response(JSON.stringify(options?.storageV2 ?? storageV2Response), { status: 200 })) as unknown as ReturnType<
|
return Promise.resolve(
|
||||||
typeof fetchWithTrustedCertificatesAsync
|
new Response(JSON.stringify(options?.storageV2 ?? storageV2Response), { status: 200 }),
|
||||||
>;
|
) as unknown as ReturnType<typeof fetchWithTrustedCertificatesAsync>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (apiName === "SYNO.Core.System" && method === "info" && type === "storage") {
|
if (apiName === "SYNO.Core.System" && method === "info" && type === "storage") {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { type CSSProperties } from "react";
|
import type { CSSProperties } from "react";
|
||||||
import { RingProgress, ScrollArea, Text, Tooltip } from "@mantine/core";
|
import { RingProgress, ScrollArea, Text, Tooltip } from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
IconCircleCheck,
|
IconCircleCheck,
|
||||||
@@ -24,13 +24,8 @@ import type { WidgetComponentProps } from "../definition";
|
|||||||
import classes from "./component.module.css";
|
import classes from "./component.module.css";
|
||||||
import { getGridCols, shouldShowComplianceHeroText } from "./layout-utils";
|
import { getGridCols, shouldShowComplianceHeroText } from "./layout-utils";
|
||||||
import { OsDistributionSection } from "./os-distribution-section";
|
import { OsDistributionSection } from "./os-distribution-section";
|
||||||
import {
|
import type { PatchMonStatKey } from "./stat-colors";
|
||||||
resolveStatColor,
|
import { resolveStatColor, severityToIconColor, severityToMantineBgColor, severityToMantineColor } from "./stat-colors";
|
||||||
severityToIconColor,
|
|
||||||
severityToMantineBgColor,
|
|
||||||
severityToMantineColor,
|
|
||||||
type PatchMonStatKey,
|
|
||||||
} from "./stat-colors";
|
|
||||||
|
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
|
|
||||||
@@ -83,10 +78,7 @@ const getLayoutMode = (width: number, height: number): LayoutMode => {
|
|||||||
export default function PatchMonWidget({ integrationIds, options, width, height }: WidgetComponentProps<"patchmon">) {
|
export default function PatchMonWidget({ integrationIds, options, width, height }: WidgetComponentProps<"patchmon">) {
|
||||||
const t = useScopedI18n("widget.patchmon");
|
const t = useScopedI18n("widget.patchmon");
|
||||||
const integrationId = integrationIds[0] ?? "";
|
const integrationId = integrationIds[0] ?? "";
|
||||||
const { data: stats } = clientApi.widget.patchmon.getStats.useQuery(
|
const { data: stats } = clientApi.widget.patchmon.getStats.useQuery({ integrationId }, { staleTime: 60 * 1000 });
|
||||||
{ integrationId },
|
|
||||||
{ staleTime: 60 * 1000 },
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!stats) return <WidgetEmptyState />;
|
if (!stats) return <WidgetEmptyState />;
|
||||||
|
|
||||||
@@ -141,8 +133,7 @@ export default function PatchMonWidget({ integrationIds, options, width, height
|
|||||||
const iconSize = getIconSize(width);
|
const iconSize = getIconSize(width);
|
||||||
const ringSize = getRingSize(width, height, showHeroRingOnly);
|
const ringSize = getRingSize(width, height, showHeroRingOnly);
|
||||||
|
|
||||||
const compliancePercent =
|
const compliancePercent = stats.totalHosts > 0 ? Math.round((stats.upToDateHosts / stats.totalHosts) * 100) : 100;
|
||||||
stats.totalHosts > 0 ? Math.round((stats.upToDateHosts / stats.totalHosts) * 100) : 100;
|
|
||||||
const complianceSeverity = resolveStatColor("upToDateHosts", stats.upToDateHosts, colorContext, options);
|
const complianceSeverity = resolveStatColor("upToDateHosts", stats.upToDateHosts, colorContext, options);
|
||||||
const complianceColor = complianceSeverity === "neutral" ? "blue" : complianceSeverity;
|
const complianceColor = complianceSeverity === "neutral" ? "blue" : complianceSeverity;
|
||||||
|
|
||||||
@@ -242,12 +233,7 @@ export default function PatchMonWidget({ integrationIds, options, width, height
|
|||||||
style={{ "--stat-bg": severityToMantineBgColor(severity) } as CSSProperties}
|
style={{ "--stat-bg": severityToMantineBgColor(severity) } as CSSProperties}
|
||||||
>
|
>
|
||||||
{showIcons && (
|
{showIcons && (
|
||||||
<Icon
|
<Icon className={classes.statIcon} size={iconSize} stroke={1.5} color={severityToIconColor(severity)} />
|
||||||
className={classes.statIcon}
|
|
||||||
size={iconSize}
|
|
||||||
stroke={1.5}
|
|
||||||
color={severityToIconColor(severity)}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
<span className={classes.statValue}>
|
<span className={classes.statValue}>
|
||||||
<Text component="span" fw={700} size="inherit" c={severityToMantineColor(severity)}>
|
<Text component="span" fw={700} size="inherit" c={severityToMantineColor(severity)}>
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ function ProtocolCard({ protocol, data }: { protocol: ProtocolKey; data: Traefik
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.protocolCard}>
|
<div className={classes.protocolCard}>
|
||||||
<Text className={classes.protocolTitle}>{t(`protocol.${protocol}`)}</Text>
|
<Text className={classes.protocolTitle}>{protocol.toUpperCase()}</Text>
|
||||||
<div className={classes.protocolRows}>
|
<div className={classes.protocolRows}>
|
||||||
{rows.map(({ key, icon: Icon, summary }) => (
|
{rows.map(({ key, icon: Icon, summary }) => (
|
||||||
<div key={key} className={classes.protocolRow}>
|
<div key={key} className={classes.protocolRow}>
|
||||||
|
|||||||
Reference in new issue
Block a user