mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 12:53:17 +08:00
Introduce workbench operations for multi-vendor NE CRUD/connect-test and Netmiko batch collection with job lifecycle controls, log downloads, and paginated run filters. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import { useI18n } from "../i18n";
|
|
import { WorkbenchCardIcon } from "../components/WorkbenchCardIcon";
|
|
import { modulesInSection, type WorkbenchSection } from "../config/modules";
|
|
import { openOrFocusModule } from "../utils/moduleWindows";
|
|
|
|
const SECTIONS: WorkbenchSection[] = ["monitoring", "operations"];
|
|
|
|
export function WorkbenchPage() {
|
|
const { t } = useI18n();
|
|
|
|
return (
|
|
<div className="workbench">
|
|
{SECTIONS.map((section) => (
|
|
<section key={section} className="wb-section">
|
|
<h2 className="wb-section__title">{t(`workbench.${section}`)}</h2>
|
|
<div className="wb-grid">
|
|
{modulesInSection(section).map((mod) => (
|
|
<button
|
|
key={mod.moduleId}
|
|
type="button"
|
|
className="wb-card"
|
|
title={t("workbench.openModule")}
|
|
onClick={() => openOrFocusModule({ moduleId: mod.moduleId, path: mod.path })}
|
|
>
|
|
<WorkbenchCardIcon tone={mod.iconTone} />
|
|
<span className="wb-card__text">
|
|
<span className="wb-card__label">{t(mod.labelKey)}</span>
|
|
{mod.descKey ? <span className="wb-card__desc">{t(mod.descKey)}</span> : null}
|
|
</span>
|
|
</button>
|
|
))}
|
|
</div>
|
|
</section>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|