feat(managed-ne): add bulk import template download with device_type reference sheet

Expose GET /v1/managed-ne/import/template and a workbench button to download xlsx/csv templates listing supported Netmiko device types.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-28 09:41:25 +08:00
parent 042c015045
commit 3024e13812
6 changed files with 69 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import {
fetchManagedNe,
fetchManagedNeMeta,
importManagedNe,
managedNeImportTemplateUrl,
updateManagedNe,
} from "../services/api";
import { queryKeys } from "../constants/queryKeys";
@ -233,6 +234,12 @@ export function NePage() {
<button type="button" onClick={openCreate} disabled={!credsOk}>
{t("managedNe.add")}
</button>
<button
type="button"
onClick={() => window.location.assign(managedNeImportTemplateUrl("xlsx"))}
>
{t("managedNe.downloadTemplate")}
</button>
<button
type="button"
onClick={() => importRef.current?.click()}