netdiag-app/src/lib/tools/index.ts
Eduard Wisch bf01b4cd21
Some checks failed
Build APK / build-apk (push) Failing after 11m29s
Initiales Commit — NetDiag App vollständig implementiert [apk]
SvelteKit + Capacitor 6 Netzwerk-Diagnose-App:
- Tool-Plattform (IP-Scan, Port, Ping, WLAN, DHCP, SNMP, Traceroute, Stresstest, iperf)
- Offline-First SQLite-Cache + idempotenter Dolibarr-Sync
- Natives Kotlin-Plugin NetDiagScanner (ARP, Ping, Ports, WLAN, DHCP, SNMP, Traceroute)
- Backbutton-Single-Instance-Modul, Auto-Updater, Toast-System
- Auftrags-/Kunden-Übersicht nach Baustellen-App-Muster
- CI: [apk]-Tag → Forgejo Runner → Package Registry netdiag-apk

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:01:56 +02:00

55 lines
1.6 KiB
TypeScript

/**
* Tool-Registry — zentrale Sammlung aller Diagnose-Werkzeuge.
*
* Ein neues Tool hinzufügen:
* 1. Datei unter tools/<kategorie>/<id>.ts anlegen (Tool implementieren)
* 2. hier importieren und in TOOLS eintragen
* Mehr ist nicht nötig — App-Logik, Sync und Datenbank bleiben unberührt.
*/
import type { Tool, ToolCategory } from './types';
import { dhcpCheckTool } from './netzwerk/dhcpcheck';
import { ipScanTool } from './netzwerk/ipscan';
import { pingTool } from './netzwerk/ping';
import { portScanTool } from './netzwerk/portscan';
import { snmpTool } from './netzwerk/snmp';
import { stressTestTool } from './netzwerk/stresstest';
import { tracerouteTool } from './netzwerk/traceroute';
import { wifiScanTool } from './netzwerk/wifiscan';
import { iperfTool } from './internet/iperf';
/** Alle registrierten Tools */
export const TOOLS: Tool[] = [
// Netzwerk
ipScanTool,
portScanTool,
pingTool,
wifiScanTool,
dhcpCheckTool,
snmpTool,
tracerouteTool,
stressTestTool,
// Internet
iperfTool,
// Telefonie: folgt (SIP-Registrierung, FreePBX-Check, RTP-Qualität)
];
/** Tool nach ID finden */
export function getTool(id: string): Tool | undefined {
return TOOLS.find((t) => t.id === id);
}
/** Tools einer Kategorie */
export function toolsByCategory(cat: ToolCategory): Tool[] {
return TOOLS.filter((t) => t.category === cat);
}
/** Tools mit bestimmtem Scope */
export function toolsByScope(scope: 'protocol' | 'device'): Tool[] {
return TOOLS.filter((t) => t.scope === scope);
}
export { CATEGORY_LABELS } from './types';
export type { Tool, ToolCategory } from './types';