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:
@@ -219,6 +219,43 @@ export interface ToolInput {
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
export type ToolImportBodyFormat = typeof ToolImportBodyFormat[keyof typeof ToolImportBodyFormat];
|
||||
|
||||
|
||||
export const ToolImportBodyFormat = {
|
||||
auto: 'auto',
|
||||
csv: 'csv',
|
||||
json: 'json',
|
||||
yaml: 'yaml',
|
||||
} as const;
|
||||
|
||||
export type ToolImportBodyDelimiter = typeof ToolImportBodyDelimiter[keyof typeof ToolImportBodyDelimiter];
|
||||
|
||||
|
||||
export const ToolImportBodyDelimiter = {
|
||||
auto: 'auto',
|
||||
comma: 'comma',
|
||||
semicolon: 'semicolon',
|
||||
tab: 'tab',
|
||||
} as const;
|
||||
|
||||
export interface ToolImportBody {
|
||||
format?: ToolImportBodyFormat;
|
||||
delimiter?: ToolImportBodyDelimiter;
|
||||
data: string;
|
||||
}
|
||||
|
||||
export type ToolImportResponseErrorsItem = {
|
||||
row?: number;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export interface ToolImportResponse {
|
||||
imported: number;
|
||||
total: number;
|
||||
errors: ToolImportResponseErrorsItem[];
|
||||
}
|
||||
|
||||
export interface ToolUpdate {
|
||||
/** @minLength 1 */
|
||||
name?: string;
|
||||
|
||||
Reference in New Issue
Block a user