towerops/lib/towerops_web/plugs
Graham McIntire e0bcd4feda
feat: add profile export/import workflow via API
Add export and import functionality for device SNMP profiles:

Export (local):
- New mix task: mix export_profiles --librenms-path ~/dev/librenms --output profiles.json
- Exports all profiles to JSON format
- Can filter specific profiles with --profiles flag

Import (production):
- New API endpoint: POST /api/v1/admin/profiles/import
- Requires superuser authentication via browser session
- Processes imports in background via Exq worker (maintenance queue)
- Returns job ID for tracking

New modules:
- Mix.Tasks.ExportProfiles - Export profiles to JSON
- ProfileImportWorker - Background job for importing profiles
- ProfilesController - API endpoint for bulk import
- RequireSuperuser plug - Restricts access to superusers
- Importer.import_profile_from_data/2 - Import from data structures

This enables bulk profile management without SSH access to production.
2026-01-18 09:23:38 -06:00
..
api_auth.ex Add API v1 endpoints with organization-scoped API tokens 2026-01-17 16:53:31 -06:00
mobile_auth.ex Add comprehensive Dialyzer type specifications 2026-01-17 10:52:02 -06:00
require_superuser.ex feat: add profile export/import workflow via API 2026-01-18 09:23:38 -06:00