feat(import): bulk tool import (CSV/JSON/YAML) for admins; NetBox-style help button
Build & Push Docker Image / build (push) Successful in 2m49s
Build & Push Docker Image / build (push) Successful in 2m49s
- Add POST /admin/tools/import with format auto-detect, CSV delimiters
(comma/semicolon/tab), per-row validation via CreateToolBody, bulk insert,
audit log entries per imported tool; gated by new 'tool-import' feature
flag (premium/enterprise; admins always pass)
- Add tool-import-dialog UI (format tabs, delimiter select, textarea, file
upload, result/error list) behind hasFeature('tool-import')
- Replace FieldHelp question marks and bare GuideHelp links with a NetBox-style
'Hilfe/Help' outline button (HelpCircle + text) in form headers only
- Sync locales to 482 keys per language (de/en), update handbook docs
(administration import section, index/plaene feature tables), regenerate
API client + zod schemas, add yaml dependency
This commit is contained in:
@@ -924,6 +924,37 @@ paths:
|
||||
items:
|
||||
$ref: "#/components/schemas/AuditLog"
|
||||
|
||||
/admin/tools/import:
|
||||
post:
|
||||
operationId: importTools
|
||||
tags: [admin]
|
||||
summary: Import tools in bulk (premium feature, admin only)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ToolImportBody"
|
||||
responses:
|
||||
"200":
|
||||
description: Import result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ToolImportResponse"
|
||||
"400":
|
||||
description: Validation or parse error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
"403":
|
||||
description: Premium feature required
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
HealthStatus:
|
||||
@@ -1191,6 +1222,39 @@ components:
|
||||
items:
|
||||
type: string
|
||||
|
||||
ToolImportBody:
|
||||
type: object
|
||||
required: [data]
|
||||
properties:
|
||||
format:
|
||||
type: string
|
||||
enum: [auto, csv, json, yaml]
|
||||
default: auto
|
||||
delimiter:
|
||||
type: string
|
||||
enum: [auto, comma, semicolon, tab]
|
||||
default: auto
|
||||
data:
|
||||
type: string
|
||||
|
||||
ToolImportResponse:
|
||||
type: object
|
||||
required: [imported, total, errors]
|
||||
properties:
|
||||
imported:
|
||||
type: integer
|
||||
total:
|
||||
type: integer
|
||||
errors:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
row:
|
||||
type: integer
|
||||
error:
|
||||
type: string
|
||||
|
||||
ToolUpdate:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user