Commit graph

1617 commits

Author SHA1 Message Date
074c55cd7d Sort Gaiia entity mapping: items with suggestions shown first
Both network sites and inventory items tabs now sort entries
with match suggestions to the top of the list.
2026-02-15 16:35:36 -06:00
FluxCD
f4442c3a43 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771194050-c6baeb9 [skip ci] 2026-02-15 22:23:17 +00:00
c6baeb9f47 Add Splynx client + sync tests, enhance Gaiia client tests
Splynx tests (20 new):
- Client: auth flow (api_key + admin fallback), test_connection,
  list_customers, list_routers, list_customer_services, pagination,
  auth header format verification, error handling
- Sync: full sync, MRR calculation, zero MRR, nil/numeric MRR,
  auth failure, rate limiting
- All response fixtures captured from real demo.splynx.com API

Gaiia tests (4 new):
- Client: unexpected status codes, header verification,
  create_ticket mutation, create_note mutation

Uses Req.Test stubs with realistic response shapes — no network
traffic during test runs. 7374 tests, 0 failures.
2026-02-15 16:20:22 -06:00
FluxCD
6f48171e55 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771190642-e6665ec [skip ci] 2026-02-15 21:28:09 +00:00
e6665ece0f Improve dashboard status bar mobile layout
- Use 2-column grid on mobile, flex-wrap on sm+
- Hide pipe separators on mobile (they break when items wrap)
- Stats now flow cleanly in a grid on small screens
2026-02-15 15:23:33 -06:00
FluxCD
b291c3a93f chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771190344-3cb18a4 [skip ci] 2026-02-15 21:23:08 +00:00
3cb18a47fc Fix Credo nesting in Splynx MRR calculation
Extract parse_mrr/1 helper to reduce nesting depth in calculate_total_mrr.
Credo --strict: 0 issues. Dialyzer: pass (no new warnings).
2026-02-15 15:18:36 -06:00
FluxCD
345d163108 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771189953-ca4840b [skip ci] 2026-02-15 21:17:05 +00:00
FluxCD
c247d9722f chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771189653-635d89d [skip ci] 2026-02-15 21:12:03 +00:00
ca4840b512 Fix Preseem devices table for mobile
- Hide Preseem ID, Status, IP, and Linked Device columns on mobile
- Show Preseem ID and status badge inline under name on small screens
- Add overflow-x-auto to table container
2026-02-15 15:10:08 -06:00
FluxCD
d63adddc5b chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771189365-6be3910 [skip ci] 2026-02-15 21:07:03 +00:00
635d89d774 Fix mobile Gaiia entity mapping + redirect / to /dashboard
- Entity mapping table: hide Gaiia ID and Linked columns on mobile,
  show Gaiia ID inline under name on small screens
- Allow text wrapping in name column for long names
- Add overflow-x-auto to table container for safety
- Redirect authenticated users from / to /dashboard instead of /orgs
2026-02-15 15:05:20 -06:00
6be3910fc4 Fix Splynx integration: token-based auth, per-provider credential fields
- Splynx client: replace broken Basic Auth with proper token flow
  (POST /api/2.0/admin/auth/tokens → Splynx-EA bearer header)
- Support both api_key and admin login auth types with fallback
- Add MRR calculation to Splynx sync using mrr_total field
- Integrations UI: per-provider credential fields (instance_url,
  api_key, api_secret for Splynx; instance_url, api_token for Sonar)
- Wire up test_connection for Splynx, Sonar, and VISP providers
- Verified against live Splynx demo (demo.splynx.com):
  auth, customers, routers, services all working
- All 7350 tests passing
2026-02-15 15:02:17 -06:00
FluxCD
f62e2023c9 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771182038-8fe9067 [skip ci] 2026-02-15 19:04:46 +00:00
8fe90670b6 Redesign integrations page: billing providers as picker
Instead of showing all 4 billing providers as separate full-width cards,
the billing section now shows:

- When no billing connected: a compact 4-column grid picker to select
  your billing platform (Gaiia, Sonar, Splynx, VISP)
- When one is active: a single card showing the connected provider with
  status, sync info, and a note to disable before switching

This reduces visual clutter since users only ever use one billing system.
Non-exclusive categories (QoE, Incidents, Infrastructure) remain as
individual cards since multiple can be active simultaneously.
2026-02-15 13:00:10 -06:00
FluxCD
f307f39631 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771181710-9ecd01d [skip ci] 2026-02-15 18:59:43 +00:00
9ecd01dc8f Security hardening: remaining audit fixes
- Encrypt session cookies (add encryption_salt to endpoint)
- X-Frame-Options: SAMEORIGIN → DENY (match CSP frame-ancestors 'none')
- Remove unsafe-eval from CSP script-src
- Apply security headers in all environments (not just prod)
- Add GraphQL query complexity limit (max 500) via Absinthe.Plug
- GraphQL introspection already blocked in prod via plug

Closes audit items #6, #7, #12, #13, #14, #16
2026-02-15 12:54:38 -06:00
FluxCD
f9df9d5d97 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771180740-fbcf266 [skip ci] 2026-02-15 18:42:42 +00:00
fbcf26656e
fix compile warning 2026-02-15 12:38:27 -06:00
FluxCD
eb26f704a4 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771180511-cbf0fa7 [skip ci] 2026-02-15 18:37:40 +00:00
cbf0fa74ac
add insight worker cron jobs to dev config 2026-02-15 12:34:41 -06:00
FluxCD
1d7eff6afd chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771180131-91dd7ad [skip ci] 2026-02-15 18:32:38 +00:00
FluxCD
a8195038dc chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771179864-74332e2 [skip ci] 2026-02-15 18:28:38 +00:00
91dd7ad985
fix: allow site_id on device create regardless of use_sites setting
The API was silently stripping site_id when use_sites was false, causing
the Terraform provider to report inconsistent state after apply.
2026-02-15 12:28:06 -06:00
74332e2203
fix: Gaiia and Preseem sync bugs from API response mismatches
- Billing subscription and inventory item status fields are scalars, not objects
- IP blocks use "block" key, not "subnet"
- Strip nil variables from GraphQL pagination (Gaiia returns null for after:null)
- Handle nil root keys in paginated responses gracefully
- Handle empty string response from Preseem scores endpoint
2026-02-15 12:23:47 -06:00
FluxCD
c1b7ee7b6f chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771178187-c790794 [skip ci] 2026-02-15 18:00:35 +00:00
c790794191 Fix tests, credo issues, and Gaiia sync bugs
- Fix CLOAK_KEY placeholder in nix shell (invalid base64)
- Fix error HTML test assertion to match actual template
- Fix Gaiia sync: read 'subnet' field instead of 'block' for IP blocks
- Fix Gaiia sync: extract nested status name from subscription objects
- Fix security headers tests for environment detection
- Fix mobile auth tests to use raw_token
- Fix LiveView test assertions to match actual template content
- Fix SNMP config test expectations for test environment
- Refactor: resolve all Credo complexity/nesting issues
  - Extract helper functions in NetBox sync, VISP sync, Sonar sync
  - Flatten nested conditionals in settings, integrations, alerts
  - Use with/validate_present pattern for connection testing
2026-02-15 11:55:49 -06:00
FluxCD
3675952c5e chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771168999-172b830 [skip ci] 2026-02-15 15:27:11 +00:00
172b830b6b ui: add org settings and user settings to mobile nav 2026-02-15 09:22:48 -06:00
FluxCD
258e01af28 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771168445-34fe5d7 [skip ci] 2026-02-15 15:18:09 +00:00
34fe5d7e49 Security fixes: mask credentials in logs/API, fix cookie/CSP/LIKE injection/webhooks
CRITICAL fixes:
- Mask SNMP community string in agent channel logs (CRITICAL-1)
- Remove snmpv3 passwords from REST API responses, return _set booleans (CRITICAL-2)
- Replace snmp_community with snmp_community_set in GraphQL type (CRITICAL-3)

HIGH fixes:
- Fix cookie same_site from invalid 'Towerops' to 'Lax' (HIGH-4)
- Remove unsafe-eval from CSP script-src (HIGH-6)
- Block GraphQL introspection queries in production (HIGH-7)
- Sanitize LIKE wildcards in SNMP device name search (HIGH-8)
- Reject webhooks when no secret configured instead of accepting (HIGH-9)

MEDIUM fixes:
- Hash mobile session tokens (SHA-256) before DB storage (MEDIUM-10)
- Apply security headers in all environments, not just prod (MEDIUM-14)
- Add GraphQL query complexity limit (500) in production (MEDIUM-16)
- Fix X-Frame-Options to DENY to match frame-ancestors 'none' (MEDIUM-13)
2026-02-15 09:09:04 -06:00
FluxCD
51d31d4b7b chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771167438-669dec5 [skip ci] 2026-02-15 15:01:06 +00:00
669dec5d89 proto: sync agent.proto with towerops-agent
- Add transport field to SnmpDevice and SnmpConfig
- Add arch field to AgentHeartbeat (already in .pb.ex)
- Add Check, CheckResult, CheckList messages for service checks (HTTP/TCP/DNS)
- Add checks field to AgentConfig
- Add CheckResult to Metric oneof
- Sync proto source with compiled .pb.ex
2026-02-15 08:56:48 -06:00
FluxCD
221be57592 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771166947-555a09d [skip ci] 2026-02-15 14:53:04 +00:00
555a09d34b ui: remove flash message on password generation 2026-02-15 08:48:36 -06:00
FluxCD
d4e8e4a16c chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771166522-d857a38 [skip ci] 2026-02-15 14:45:03 +00:00
FluxCD
84e09021fc chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771165677-d857a38 [skip ci] 2026-02-15 14:42:46 +00:00
d857a38ca3 feat: group integrations by category with exclusive billing provider selection
Billing (Gaiia, Sonar, Splynx, VISP) - choose one
QoE Monitoring (Preseem)
Incident Management (PagerDuty)
Infrastructure & IPAM (NetBox)

Prevents enabling multiple billing providers simultaneously.
2026-02-15 08:27:27 -06:00
FluxCD
fd6d4a8394 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771165412-ff5bd6b [skip ci] 2026-02-15 14:26:01 +00:00
FluxCD
ff5bd6b0f4 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771165227-e97e5d1 2026-02-15 14:23:03 +00:00
FluxCD
e97e5d17f3 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771165047-46f31e1 2026-02-15 14:19:59 +00:00
d9b85b18d3 fix: add [skip ci] to flux image update commits to break CI loop 2026-02-15 08:18:06 -06:00
FluxCD
46f31e1306 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771164872-5f1557e 2026-02-15 14:16:59 +00:00
FluxCD
5f1557e2d4 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771164686-18d16b3 2026-02-15 14:14:03 +00:00
FluxCD
18d16b3d6f chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771164507-94f1433 2026-02-15 14:10:58 +00:00
FluxCD
94f1433550 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771164324-75fe8d4 2026-02-15 14:07:59 +00:00
FluxCD
75fe8d48ab chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771164149-929dbb4 2026-02-15 14:04:57 +00:00
FluxCD
929dbb4a1b chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771163966-d6a1be4 2026-02-15 14:02:00 +00:00
FluxCD
d6a1be47db chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771163784-4e021b4 2026-02-15 13:58:57 +00:00
FluxCD
4e021b45f4 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771163606-329d5b8 2026-02-15 13:55:56 +00:00