mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-14 12:27:02 +00:00
complete i18n migration to /[locale]/ with EN+ES content
Full rewrite of the docs site under app/[locale]/ with next-intl in localePrefix:"always" mode. Every page now exists at both /en/<path> and /es/<path>; the root / shows a meta-refresh + JS redirect to /<defaultLocale>/ so GitHub Pages serves something on the apex URL. Highlights: - 107 doc pages migrated to file-per-page JSON namespaces under messages/en/ and messages/es/. Spanish content is fully translated (no copy-of-English placeholders). - New documentation for the Active Suppressions section in the Settings tab and the per-event Dismiss dropdown in the Health Monitor modal. - New screenshots: dismiss-duration-dropdown.png and an updated health-suppression-settings.png. - Pagefind integrated for client-side search; index is built on every CI deploy (not committed). - RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml for backward compat. - Removed the dead app/[locale]/guides/[slug]/ route — every guide now has its own static page and no markdown source remains. - Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in docs/hardware/nvidia-host. - Removed obsolete components (footer2, calendar, drawer). Verified locally with `npm ci && npm run build`: 2804 files in out/, 231 pages indexed by pagefind, root redirect intact, both locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
167
web/app/[locale]/docs/network/backup-restore/page.tsx
Normal file
167
web/app/[locale]/docs/network/backup-restore/page.tsx
Normal file
@@ -0,0 +1,167 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.backupRestore.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/backup-restore",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type Step = { title: string; body: string; tone: "blue" | "amber" | "emerald" }
|
||||
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
|
||||
|
||||
const TONE_CLASSES: Record<string, string> = {
|
||||
blue: "border-blue-400 bg-blue-50",
|
||||
amber: "border-amber-400 bg-amber-50",
|
||||
emerald: "border-emerald-400 bg-emerald-50",
|
||||
}
|
||||
|
||||
export default async function BackupRestorePage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.backupRestore" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { backupRestore: {
|
||||
restore: { steps: Step[] }
|
||||
restart: { warnItems: string[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const restoreSteps = messages.docs.network.backupRestore.restore.steps
|
||||
const warnItems = messages.docs.network.backupRestore.restart.warnItems
|
||||
const relatedItems = messages.docs.network.backupRestore.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const bridgeLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/bridge-analysis" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const configLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/config-analysis" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={4}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("shared.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("shared.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`/var/backups/proxmenux/
|
||||
├── interfaces_backup_2026-04-26_14-30-12 ← from a guided repair
|
||||
├── interfaces_backup_2026-04-26_15-08-44 ← from "Create Network Backup" (this page)
|
||||
├── interfaces_backup_2026-04-26_18-22-09 ← auto-taken before a restore
|
||||
└── …`}</pre>
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">{t("shared.outro")}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("show.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("show.body", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("create.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("create.body", { code })}
|
||||
</p>
|
||||
<Callout variant="tip" title={t("create.whenTitle")}>
|
||||
{t.rich("create.whenBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("restore.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("restore.intro", { code })}
|
||||
</p>
|
||||
<div className="space-y-4 mb-6">
|
||||
{restoreSteps.map((step, idx) => (
|
||||
<div key={idx} className={`border-l-4 ${TONE_CLASSES[step.tone]} p-4 rounded-r-md`}>
|
||||
<div className="font-semibold text-gray-900 mb-1">{step.title}</div>
|
||||
<p className="text-sm text-gray-800 m-0">{t.rich(`restore.steps.${idx}.body`, { code, strong })}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Callout variant="warning" title={t("restore.autoBackupTitle")}>
|
||||
{t.rich("restore.autoBackupBody", { em, code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("restart.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("restart.body", { code })}
|
||||
</p>
|
||||
<Callout variant="danger" title={t("restart.warnTitle")}>
|
||||
{t.rich("restart.warnBody", { code })}
|
||||
<ul className="list-disc pl-6 mt-2 mb-0 space-y-1">
|
||||
{warnItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`restart.warnItems.${idx}`, { em })}</li>
|
||||
))}
|
||||
</ul>
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manualRollback.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("manualRollback.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`ls -lt /var/backups/proxmenux/interfaces_backup_* # newest first
|
||||
cp /var/backups/proxmenux/interfaces_backup_<TIMESTAMP> /etc/network/interfaces
|
||||
systemctl restart networking`}</pre>
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("manualRollback.outro", { em, code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noneTitle")}>
|
||||
{t.rich("troubleshoot.noneBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.unreachTitle")}>
|
||||
{t.rich("troubleshoot.unreachBody", { bridgeLink, configLink })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.emptyTitle")}>
|
||||
{t.rich("troubleshoot.emptyBody", { em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item, idx) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
224
web/app/[locale]/docs/network/bridge-analysis/page.tsx
Normal file
224
web/app/[locale]/docs/network/bridge-analysis/page.tsx
Normal file
@@ -0,0 +1,224 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.bridgeAnalysis.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/bridge-analysis",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type Step = { title: string; body: string; tone: "blue" | "amber" | "emerald" }
|
||||
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
|
||||
|
||||
const TONE_CLASSES: Record<string, string> = {
|
||||
blue: "border-blue-400 bg-blue-50",
|
||||
amber: "border-amber-400 bg-amber-50",
|
||||
emerald: "border-emerald-400 bg-emerald-50",
|
||||
}
|
||||
|
||||
export default async function BridgeAnalysisPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.bridgeAnalysis" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { bridgeAnalysis: {
|
||||
when: { items: string[] }
|
||||
step1: { items: string[] }
|
||||
step2: { steps: Step[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const whenItems = messages.docs.network.bridgeAnalysis.when.items
|
||||
const step1Items = messages.docs.network.bridgeAnalysis.step1.items
|
||||
const repairSteps = messages.docs.network.bridgeAnalysis.step2.steps
|
||||
const relatedItems = messages.docs.network.bridgeAnalysis.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const persistentLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/persistent-names" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const configLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/config-analysis" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={6}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code, strong })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("when.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("when.intro", { code })}
|
||||
</p>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{whenItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`when.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("when.outro", { link: persistentLink })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("bigPicture.heading")}</h2>
|
||||
|
||||
<DataFlowDiagram
|
||||
nodes={[
|
||||
{
|
||||
label: t("bigPicture.diagram1.nodes.sourceLabel"),
|
||||
detail: t("bigPicture.diagram1.nodes.sourceDetail"),
|
||||
variant: "source",
|
||||
},
|
||||
{
|
||||
label: t("bigPicture.diagram1.nodes.bridgeLabel"),
|
||||
detail: t("bigPicture.diagram1.nodes.bridgeDetail"),
|
||||
variant: "bridge",
|
||||
},
|
||||
{
|
||||
label: t("bigPicture.diagram1.nodes.targetLabel"),
|
||||
detail: t("bigPicture.diagram1.nodes.targetDetail"),
|
||||
variant: "target",
|
||||
},
|
||||
]}
|
||||
arrowLabel={t("bigPicture.diagram1.arrowLabel")}
|
||||
/>
|
||||
|
||||
<DataFlowDiagram
|
||||
nodes={[
|
||||
{
|
||||
label: t("bigPicture.diagram2.nodes.sourceLabel"),
|
||||
detail: t("bigPicture.diagram2.nodes.sourceDetail"),
|
||||
variant: "source",
|
||||
},
|
||||
{
|
||||
label: t("bigPicture.diagram2.nodes.targetLabel"),
|
||||
detail: t("bigPicture.diagram2.nodes.targetDetail"),
|
||||
variant: "target",
|
||||
},
|
||||
]}
|
||||
arrowLabel={t("bigPicture.diagram2.arrowLabel")}
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("step1.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("step1.intro", { strong })}
|
||||
</p>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{step1Items.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`step1.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`🔍 BRIDGE CONFIGURATION ANALYSIS
|
||||
==================================================
|
||||
|
||||
🌉 Bridge: vmbr0
|
||||
📍 Status: DOWN
|
||||
🌐 IP: No IP assigned
|
||||
🔌 Configured Ports: enp3s0
|
||||
❌ Port enp3s0: NOT FOUND
|
||||
|
||||
🔧 SUGGESTION FOR vmbr0:
|
||||
Replace invalid port(s) 'enp3s0' with: eno1
|
||||
Command: sed -i 's/bridge-ports.*/bridge-ports eno1/' /etc/network/interfaces
|
||||
|
||||
📊 ANALYSIS SUMMARY
|
||||
=========================
|
||||
Bridges analyzed: 1
|
||||
Issues found: 1
|
||||
Physical interfaces available: 2
|
||||
|
||||
⚠️ IMPORTANT: No changes have been made to your system
|
||||
Use the Guided Repair option to fix issues safely`}</pre>
|
||||
|
||||
<Callout variant="success" title={t("step1.readonlyTitle")}>
|
||||
{t.rich("step1.readonlyBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("step2.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t("step2.intro")}</p>
|
||||
|
||||
<div className="space-y-4 mb-6">
|
||||
{repairSteps.map((step, idx) => (
|
||||
<div key={idx} className={`border-l-4 ${TONE_CLASSES[step.tone]} p-4 rounded-r-md`}>
|
||||
<div className="font-semibold text-gray-900 mb-1">{step.title}</div>
|
||||
<p className="text-sm text-gray-800 m-0">{t.rich(`step2.steps.${idx}.body`, { code, em, strong })}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Callout variant="warning" title={t("step2.restartTitle")}>
|
||||
{t.rich("step2.restartBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("edits.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("edits.body", { code, link: configLink })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.unsupportedTitle")}>
|
||||
{t.rich("troubleshoot.unsupportedBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noSuggestTitle")}>
|
||||
{t.rich("troubleshoot.noSuggestBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.stillDownTitle")}>
|
||||
{t.rich("troubleshoot.stillDownBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.lostSshTitle")}>
|
||||
{t("troubleshoot.lostSshIntro")}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{`cp /var/backups/proxmenux/interfaces_backup_<TIMESTAMP> /etc/network/interfaces
|
||||
systemctl restart networking`}</pre>
|
||||
{t("troubleshoot.lostSshOutro")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item, idx) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
201
web/app/[locale]/docs/network/config-analysis/page.tsx
Normal file
201
web/app/[locale]/docs/network/config-analysis/page.tsx
Normal file
@@ -0,0 +1,201 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.configAnalysis.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/config-analysis",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type DiffersRow = { aspect: string; bridge: string; config: string }
|
||||
type Step = { title: string; body: string; tone: "blue" | "amber" | "emerald" }
|
||||
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
|
||||
|
||||
const TONE_CLASSES: Record<string, string> = {
|
||||
blue: "border-blue-400 bg-blue-50",
|
||||
amber: "border-amber-400 bg-amber-50",
|
||||
emerald: "border-emerald-400 bg-emerald-50",
|
||||
}
|
||||
|
||||
export default async function ConfigAnalysisPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.configAnalysis" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { configAnalysis: {
|
||||
differs: { rows: DiffersRow[] }
|
||||
step2: { steps: Step[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const differsRows = messages.docs.network.configAnalysis.differs.rows
|
||||
const cleanupSteps = messages.docs.network.configAnalysis.step2.steps
|
||||
const relatedItems = messages.docs.network.configAnalysis.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const bridgeLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/bridge-analysis" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const persistentLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/persistent-names" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const link = bridgeLink
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={5}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("differs.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerAspect")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerBridge")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerConfig")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{differsRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < differsRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">
|
||||
<strong>{t.rich(`differs.rows.${idx}.aspect`, { code })}</strong>
|
||||
</td>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`differs.rows.${idx}.bridge`, { code })}</td>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`differs.rows.${idx}.config`, { code })}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("differs.outro", { strong, link })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("step1.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("step1.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`🔍 NETWORK CONFIGURATION ANALYSIS
|
||||
==================================================
|
||||
|
||||
📋 CONFIGURED INTERFACES
|
||||
==============================
|
||||
🔌 Interface: enp3s0
|
||||
❌ Status: NOT FOUND
|
||||
⚠️ Issue: Configured but doesn't exist
|
||||
|
||||
🔌 Interface: eno1
|
||||
✅ Status: EXISTS (UP)
|
||||
🌐 IP: 192.168.1.10/24
|
||||
ℹ️ Type: Physical interface
|
||||
|
||||
🔌 Interface: vmbr0
|
||||
✅ Status: EXISTS (UP)
|
||||
🌐 IP: 192.168.1.10/24
|
||||
ℹ️ Type: Virtual interface (normal)
|
||||
|
||||
🔧 SUGGESTION FOR enp3s0:
|
||||
This interface is configured but doesn't exist physically
|
||||
Consider removing its configuration
|
||||
Command: sed -i '/iface enp3s0/,/^$/d' /etc/network/interfaces
|
||||
|
||||
📊 ANALYSIS SUMMARY
|
||||
=========================
|
||||
Interfaces configured: 3
|
||||
Issues found: 1
|
||||
|
||||
⚠️ IMPORTANT: No changes have been made to your system
|
||||
Use the Guided Cleanup option to fix issues safely`}</pre>
|
||||
|
||||
<Callout variant="success" title={t("step1.virtTitle")}>
|
||||
{t.rich("step1.virtBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("step2.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t("step2.intro")}</p>
|
||||
|
||||
<div className="space-y-4 mb-6">
|
||||
{cleanupSteps.map((step, idx) => (
|
||||
<div key={idx} className={`border-l-4 ${TONE_CLASSES[step.tone]} p-4 rounded-r-md`}>
|
||||
<div className="font-semibold text-gray-900 mb-1">{step.title}</div>
|
||||
<p className="text-sm text-gray-800 m-0">{t.rich(`step2.steps.${idx}.body`, { code, em, strong })}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Callout variant="warning" title={t("step2.noRestartTitle")}>
|
||||
{t.rich("step2.noRestartBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("caveats.heading")}</h2>
|
||||
|
||||
<Callout variant="warning" title={t("caveats.boundaryTitle")}>
|
||||
{t.rich("caveats.boundaryBody", { code, strong })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="info" title={t("caveats.tandemTitle")}>
|
||||
{t.rich("caveats.tandemBody", { code, link: bridgeLink })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.notFoundTitle")}>
|
||||
{t.rich("troubleshoot.notFoundBody", { code, link: persistentLink })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.tooMuchTitle")}>
|
||||
{t("troubleshoot.tooMuchBody")}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{`cp /var/backups/proxmenux/interfaces_backup_<TIMESTAMP> /etc/network/interfaces`}</pre>
|
||||
{t("troubleshoot.tooMuchOutro")}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.bridgeBreakTitle")}>
|
||||
{t.rich("troubleshoot.bridgeBreakBody", { code, link: bridgeLink })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
148
web/app/[locale]/docs/network/diagnostics/page.tsx
Normal file
148
web/app/[locale]/docs/network/diagnostics/page.tsx
Normal file
@@ -0,0 +1,148 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.diagnostics.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/diagnostics",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type ConnRow = { test: string; target: string; confirms: string }
|
||||
type RelatedItem = { label: string; href: string; tail: string }
|
||||
|
||||
export default async function NetworkDiagnosticsPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.diagnostics" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { diagnostics: {
|
||||
connectivity: { rows: ConnRow[] }
|
||||
advanced: { items: string[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const connRows = messages.docs.network.diagnostics.connectivity.rows
|
||||
const advancedItems = messages.docs.network.diagnostics.advanced.items
|
||||
const relatedItems = messages.docs.network.diagnostics.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const monitoringLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/monitoring" className="text-blue-700 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const backupLink = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/network/backup-restore" className="text-blue-700 hover:underline">{chunks}</Link>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={3}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="success" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { strong, monitoringLink, backupLink })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("routing.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("routing.body", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`Total routes: 4
|
||||
|
||||
➡ default via 192.168.1.1 dev vmbr0 onlink
|
||||
• 10.10.10.0/24 dev vmbr1 proto kernel scope link src 10.10.10.1
|
||||
• 169.254.0.0/16 dev vmbr0 scope link metric 1000
|
||||
• 192.168.1.0/24 dev vmbr0 proto kernel scope link src 192.168.1.10
|
||||
|
||||
🌍 Default Gateway: 192.168.1.1`}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("connectivity.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("connectivity.intro", { code })}
|
||||
</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("connectivity.headerTest")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("connectivity.headerTarget")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("connectivity.headerConfirms")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{connRows.map((row, idx) => (
|
||||
<tr key={row.test} className={idx < connRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.test}</strong></td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono">{row.target}</td>
|
||||
<td className="px-3 py-2 align-top">{row.confirms}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<Callout variant="info" title={t("connectivity.readingTitle")}>
|
||||
{t.rich("connectivity.readingBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("advanced.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("advanced.intro")}</p>
|
||||
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-2">
|
||||
{advancedItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`advanced.items.${idx}`, { strong, code, em })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<Callout variant="warning" title={t("advanced.nmTitle")}>
|
||||
{t.rich("advanced.nmBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.gwTitle")}>
|
||||
{t.rich("troubleshoot.gwBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.dupTitle")}>
|
||||
{t.rich("troubleshoot.dupBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
238
web/app/[locale]/docs/network/monitoring/page.tsx
Normal file
238
web/app/[locale]/docs/network/monitoring/page.tsx
Normal file
@@ -0,0 +1,238 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.monitoring.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/monitoring",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type WhenRow = { question: string; use: string }
|
||||
type IptrafRow = { mode: string; useFor: string }
|
||||
type IperfRow = { mode: string; behaviour: string; cli: string }
|
||||
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
|
||||
|
||||
export default async function NetworkMonitoringPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.monitoring" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { monitoring: {
|
||||
when: { rows: WhenRow[] }
|
||||
iptraf: { rows: IptrafRow[] }
|
||||
iperf3: { rows: IperfRow[]; workflow: string[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const whenRows = messages.docs.network.monitoring.when.rows
|
||||
const iptrafRows = messages.docs.network.monitoring.iptraf.rows
|
||||
const iperfRows = messages.docs.network.monitoring.iperf3.rows
|
||||
const workflow = messages.docs.network.monitoring.iperf3.workflow
|
||||
const relatedItems = messages.docs.network.monitoring.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const kbd = (chunks: React.ReactNode) => <kbd>{chunks}</kbd>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={4}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("when.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("when.headerQuestion")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("when.headerUse")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{whenRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < whenRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`when.rows.${idx}.question`, { em })}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.use}</strong></td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("iftop.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iftop.body", { code, em })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`12.5Kb 25.0Kb 37.5Kb 50.0Kb 62.5Kb
|
||||
└─────────────┴─────────────┴─────────────┴──────────────┴──────────
|
||||
proxmox.lan => 192.168.1.50 14.2Kb 9.8Kb 7.1Kb
|
||||
<= 2.3Kb 1.7Kb 1.4Kb
|
||||
proxmox.lan => 1.1.1.1 0b 145b 38b
|
||||
<= 128b 96b 24b
|
||||
─────────────────────────────────────────────────────────────────
|
||||
TX: 14.2Kb 9.9Kb 7.1Kb
|
||||
RX: 2.4Kb 1.8Kb 1.4Kb
|
||||
TOTAL: 16.6Kb 11.7Kb 8.5Kb`}</pre>
|
||||
<p className="mt-4 mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iftop.exit", { strong, kbd })}
|
||||
</p>
|
||||
<Callout variant="tip" title={t("iftop.keysTitle")}>
|
||||
{t.rich("iftop.keysBody", { code, kbd })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("iptraf.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iptraf.intro", { em })}
|
||||
</p>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("iptraf.menuIntro")}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("iptraf.headerMode")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("iptraf.headerUseFor")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{iptrafRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < iptrafRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.mode}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.useFor}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iptraf.exit", { strong, kbd })}
|
||||
</p>
|
||||
<Callout variant="tip" title={t("iptraf.logTitle")}>
|
||||
{t.rich("iptraf.logBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("iperf3.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iperf3.intro1", { em })}
|
||||
</p>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("iperf3.intro2", { strong })}
|
||||
</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("iperf3.headerMode")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("iperf3.headerBehaviour")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("iperf3.headerCli")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{iperfRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < iperfRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.mode}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.behaviour}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.cli}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("iperf3.workflowIntro")}</p>
|
||||
<ol className="list-decimal pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{workflow.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`iperf3.workflow.${idx}`, { em, strong })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("iperf3.sample")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`Connecting to host 10.0.0.10, port 5201
|
||||
[ 5] local 10.0.0.20 port 53994 connected to 10.0.0.10 port 5201
|
||||
[ ID] Interval Transfer Bitrate Retr Cwnd
|
||||
[ 5] 0.00-1.00 sec 1.10 GBytes 9.45 Gbits/sec 0 1.55 MBytes
|
||||
[ 5] 1.00-2.00 sec 1.10 GBytes 9.45 Gbits/sec 0 1.55 MBytes
|
||||
[ 5] 2.00-3.00 sec 1.10 GBytes 9.45 Gbits/sec 0 1.55 MBytes
|
||||
...
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ ID] Interval Transfer Bitrate Retr
|
||||
[ 5] 0.00-10.00 sec 11.0 GBytes 9.45 Gbits/sec 0 sender
|
||||
[ 5] 0.00-10.00 sec 11.0 GBytes 9.44 Gbits/sec receiver
|
||||
|
||||
iperf Done.`}</pre>
|
||||
|
||||
<Callout variant="tip" title={t("iperf3.flagsTitle")}>
|
||||
{t.rich("iperf3.flagsBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="warning" title={t("iperf3.firewallTitle")}>
|
||||
{t.rich("iperf3.firewallBody", { code, strong })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("install.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("install.body", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.hangTitle")}>
|
||||
{t.rich("troubleshoot.hangBody", { code, kbd })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.refusedTitle")}>
|
||||
{t.rich("troubleshoot.refusedBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.slowTitle")}>
|
||||
{t.rich("troubleshoot.slowBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noTrafficTitle")}>
|
||||
{t.rich("troubleshoot.noTrafficBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
293
web/app/[locale]/docs/network/page.tsx
Normal file
293
web/app/[locale]/docs/network/page.tsx
Normal file
@@ -0,0 +1,293 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import Image from "next/image"
|
||||
import {
|
||||
ArrowRight,
|
||||
Activity,
|
||||
LineChart,
|
||||
Wrench,
|
||||
ListChecks,
|
||||
Tag,
|
||||
Archive,
|
||||
ShieldCheck,
|
||||
ShieldAlert,
|
||||
Eye,
|
||||
} from "lucide-react"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
keywords: [
|
||||
"proxmox network management",
|
||||
"proxmox bridge configuration",
|
||||
"proxmox bond",
|
||||
"proxmox vlan",
|
||||
"proxmox network repair",
|
||||
"proxmox /etc/network/interfaces",
|
||||
"proxmox network diagnostics",
|
||||
"proxmox persistent interface names",
|
||||
"proxmox network backup",
|
||||
],
|
||||
alternates: { canonical: "https://proxmenux.com/docs/network" },
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://proxmenux.com/docs/network",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary",
|
||||
title: t("twitterTitle"),
|
||||
description: t("twitterDescription"),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type SectionOption = { title: string; description: string }
|
||||
|
||||
const READ_ONLY_CONFIG = [
|
||||
{ Icon: Activity, href: "/docs/network/diagnostics" },
|
||||
{ Icon: LineChart, href: "/docs/network/monitoring" },
|
||||
]
|
||||
const ANALYZE_CONFIG = [
|
||||
{ Icon: Wrench, href: "/docs/network/bridge-analysis" },
|
||||
{ Icon: ListChecks, href: "/docs/network/config-analysis" },
|
||||
]
|
||||
const APPLY_CONFIG = [
|
||||
{ Icon: Tag, href: "/docs/network/persistent-names" },
|
||||
{ Icon: Archive, href: "/docs/network/backup-restore" },
|
||||
]
|
||||
|
||||
function OptionCard({
|
||||
title,
|
||||
description,
|
||||
Icon,
|
||||
href,
|
||||
}: SectionOption & {
|
||||
Icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>
|
||||
href: string
|
||||
}) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="group flex items-start gap-3 rounded-md border border-gray-200 bg-white p-3 transition-colors hover:border-blue-400 hover:bg-blue-50"
|
||||
>
|
||||
<span className="inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-600 group-hover:bg-blue-100 group-hover:text-blue-700">
|
||||
<Icon className="h-4 w-4" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1 text-sm font-medium text-gray-900 group-hover:text-blue-700">
|
||||
{title}
|
||||
<ArrowRight className="h-3.5 w-3.5 text-gray-400 group-hover:text-blue-600 transition-transform group-hover:translate-x-0.5" />
|
||||
</div>
|
||||
<div className="mt-0.5 text-xs text-gray-600 leading-snug">{description}</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export default async function NetworkOverviewPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: {
|
||||
tiers: {
|
||||
readOnly: { items: string[] }
|
||||
analyze: { items: string[] }
|
||||
apply: { items: string[] }
|
||||
}
|
||||
readOnlySection: { options: SectionOption[] }
|
||||
analyzeSection: { options: SectionOption[] }
|
||||
applySection: { options: SectionOption[] }
|
||||
} }
|
||||
}
|
||||
const readOnlyTierItems = messages.docs.network.tiers.readOnly.items
|
||||
const analyzeTierItems = messages.docs.network.tiers.analyze.items
|
||||
const applyTierItems = messages.docs.network.tiers.apply.items
|
||||
const readOnlyOptions = messages.docs.network.readOnlySection.options
|
||||
const analyzeOptions = messages.docs.network.analyzeSection.options
|
||||
const applyOptions = messages.docs.network.applySection.options
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={5}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { strong })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("openingMenu.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("openingMenu.intro", { strong })}
|
||||
</p>
|
||||
|
||||
<Image
|
||||
src="/network/network-menu.png"
|
||||
alt={t("openingMenu.imageAlt")}
|
||||
width={900}
|
||||
height={500}
|
||||
className="rounded shadow-lg my-6"
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("safety.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t("safety.body")}</p>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-1 lg:grid-cols-3 mb-8 not-prose">
|
||||
<a
|
||||
href="#read-only"
|
||||
className="rounded-lg border-2 border-emerald-300 bg-emerald-50 p-5 flex flex-col transition-shadow hover:shadow-md"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-emerald-100 text-emerald-700">
|
||||
<Eye className="h-5 w-5" aria-hidden />
|
||||
</span>
|
||||
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("tiers.readOnly.title")}</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("tiers.readOnly.body")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{readOnlyTierItems.map((item, idx) => (
|
||||
<li key={idx}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="#analyze"
|
||||
className="rounded-lg border-2 border-amber-300 bg-amber-50 p-5 flex flex-col transition-shadow hover:shadow-md"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-amber-100 text-amber-700">
|
||||
<ShieldAlert className="h-5 w-5" aria-hidden />
|
||||
</span>
|
||||
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("tiers.analyze.title")}</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("tiers.analyze.body")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{analyzeTierItems.map((item, idx) => (
|
||||
<li key={idx}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="#apply"
|
||||
className="rounded-lg border-2 border-red-300 bg-red-50 p-5 flex flex-col transition-shadow hover:shadow-md"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-red-100 text-red-700">
|
||||
<ShieldCheck className="h-5 w-5" aria-hidden />
|
||||
</span>
|
||||
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("tiers.apply.title")}</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("tiers.apply.body")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{applyTierItems.map((item, idx) => (
|
||||
<li key={idx}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<Callout variant="warning" title={t("classicTitle")}>
|
||||
{t.rich("classicBody", { strong, code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("backups.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("backups.intro", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`/var/backups/proxmenux/
|
||||
├── interfaces_backup_2026-04-26_14-30-12
|
||||
├── interfaces_backup_2026-04-26_15-08-44
|
||||
└── interfaces_backup_2026-04-26_18-22-09`}</pre>
|
||||
<p className="mt-4 mb-4 text-gray-800 leading-relaxed">{t("backups.rollbackIntro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`cp /var/backups/proxmenux/interfaces_backup_<TIMESTAMP> /etc/network/interfaces
|
||||
systemctl restart networking`}</pre>
|
||||
|
||||
<h2 id="read-only" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
|
||||
{t("readOnlySection.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("readOnlySection.body", { code })}
|
||||
</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
{readOnlyOptions.map((o, idx) => (
|
||||
<OptionCard
|
||||
key={READ_ONLY_CONFIG[idx].href}
|
||||
title={o.title}
|
||||
description={o.description}
|
||||
Icon={READ_ONLY_CONFIG[idx].Icon}
|
||||
href={READ_ONLY_CONFIG[idx].href}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h2 id="analyze" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
|
||||
{t("analyzeSection.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("analyzeSection.body", { code, strong })}
|
||||
</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
{analyzeOptions.map((o, idx) => (
|
||||
<OptionCard
|
||||
key={ANALYZE_CONFIG[idx].href}
|
||||
title={o.title}
|
||||
description={o.description}
|
||||
Icon={ANALYZE_CONFIG[idx].Icon}
|
||||
href={ANALYZE_CONFIG[idx].href}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h2 id="apply" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
|
||||
{t("applySection.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("applySection.body", { em })}
|
||||
</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
{applyOptions.map((o, idx) => (
|
||||
<OptionCard
|
||||
key={APPLY_CONFIG[idx].href}
|
||||
title={o.title}
|
||||
description={o.description}
|
||||
Icon={APPLY_CONFIG[idx].Icon}
|
||||
href={APPLY_CONFIG[idx].href}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("consoleTitle")}</h2>
|
||||
<Callout variant="danger" title={t("consoleSubTitle")}>
|
||||
{t("consoleBody")}
|
||||
</Callout>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
174
web/app/[locale]/docs/network/persistent-names/page.tsx
Normal file
174
web/app/[locale]/docs/network/persistent-names/page.tsx
Normal file
@@ -0,0 +1,174 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.persistentNames.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/network/persistent-names",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type ScopeRow = { type: string; behaviour: string; why: string }
|
||||
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
|
||||
|
||||
export default async function PersistentNamesPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.network.persistentNames" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { network: { persistentNames: {
|
||||
problem: { items: string[] }
|
||||
scope: { rows: ScopeRow[] }
|
||||
afterReboot: { items: string[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const problemItems = messages.docs.network.persistentNames.problem.items
|
||||
const scopeRows = messages.docs.network.persistentNames.scope.rows
|
||||
const afterRebootItems = messages.docs.network.persistentNames.afterReboot.items
|
||||
const relatedItems = messages.docs.network.persistentNames.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={4}
|
||||
scriptPath="menus/network_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("problem.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("problem.intro", { code, em })}
|
||||
</p>
|
||||
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{problemItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`problem.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("problem.outro", { code, em })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("howWorks.heading")}</h2>
|
||||
|
||||
<DataFlowDiagram
|
||||
nodes={[
|
||||
{ label: t("howWorks.nodes.detectLabel"), detail: t("howWorks.nodes.detectDetail"), variant: "source" },
|
||||
{ label: t("howWorks.nodes.readLabel"), detail: t("howWorks.nodes.readDetail"), variant: "bridge" },
|
||||
{ label: t("howWorks.nodes.writeLabel"), detail: t("howWorks.nodes.writeDetail"), variant: "target" },
|
||||
]}
|
||||
arrowLabel={t("howWorks.arrowLabel")}
|
||||
/>
|
||||
|
||||
<p className="mt-6 mb-4 text-gray-800 leading-relaxed">{t("howWorks.minimalIntro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`# /etc/systemd/network/10-eno1.link
|
||||
[Match]
|
||||
MACAddress=aa:bb:cc:dd:ee:ff
|
||||
|
||||
[Link]
|
||||
Name=eno1`}</pre>
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("howWorks.minimalOutro", { em, code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("scope.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("scope.headerType")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("scope.headerBehaviour")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("scope.headerWhy")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{scopeRows.map((row, idx) => (
|
||||
<tr key={row.type} className={idx < scopeRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.type}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`scope.rows.${idx}.behaviour`, { code })}</td>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`scope.rows.${idx}.why`, { code })}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("safety.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("safety.intro", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`/etc/systemd/network/backup-20260426-143012/
|
||||
├── 10-eno1.link (previous version)
|
||||
└── 10-enp3s0.link (previous version)`}</pre>
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">{t("safety.outro")}</p>
|
||||
|
||||
<Callout variant="warning" title={t("safety.rebootTitle")}>
|
||||
{t.rich("safety.rebootBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("afterReboot.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("afterReboot.intro")}</p>
|
||||
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-2">
|
||||
{afterRebootItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`afterReboot.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.emptyTitle")}>
|
||||
{t.rich("troubleshoot.emptyBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noChangeTitle")}>
|
||||
{t.rich("troubleshoot.noChangeBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.undoTitle")}>
|
||||
{t.rich("troubleshoot.undoBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item, idx) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { em }) : item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user