Pulse/internal/api
rcourtman 9e339957c6 fix: Update runtime config when toggling Docker update actions setting
The DisableDockerUpdateActions setting was being saved to disk but not
updated in h.config, causing the UI toggle to appear to revert on page
refresh since the API returned the stale runtime value.

Related to #1023
2026-01-03 11:14:17 +00:00
..
ai_handlers.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
ai_handlers_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
ai_intelligence_handlers.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
ai_intelligence_handlers_test.go fix: Update tests for RAID alerting md0/md1 skip and AI gating message change 2025-12-30 23:39:55 +00:00
ai_patrol_handlers_test.go test: improve test coverage for AI, license, config, and monitoring packages 2025-12-19 22:49:30 +00:00
alerts.go feat: enhance AI baseline context visibility and incident timeline improvements 2025-12-21 00:14:20 +00:00
alerts_test.go Allow printable alert IDs for acknowledgements (#550) 2025-10-14 16:48:22 +00:00
auth.go feat(oidc): Add refresh token support for long-lived sessions 2025-12-20 10:45:46 +00:00
auth_helpers_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
auth_scope_test.go test: Add ensureScope tests for API package 2025-12-02 13:19:11 +00:00
bootstrap_token.go Improve temperature proxy control-plane flow 2025-11-15 21:49:51 +00:00
bootstrap_token_test.go test: Add edge case for initializeBootstrapToken error path 2025-12-02 00:51:44 +00:00
charts_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
config_handlers.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
config_handlers_auto_reg_test.go test: Add edge cases for markAutoRegistered empty inputs 2025-12-01 23:50:10 +00:00
config_handlers_auto_register_test.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
config_handlers_cluster_test.go test: Improve coverage for cluster config handler functions 2025-12-01 14:46:00 +00:00
config_handlers_host_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
config_handlers_pve_user_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
config_handlers_sanitize_test.go test: Add tests for config handler utility functions 2025-12-01 14:09:35 +00:00
config_handlers_setup_script_test.go test: Add HandleSetupScript PBS path tests for API package 2025-12-02 13:36:23 +00:00
config_handlers_temperature_test.go Improve temperature proxy workflow 2025-11-17 14:25:46 +00:00
config_handlers_transport_guard_test.go Improve temperature proxy workflow 2025-11-17 14:25:46 +00:00
csrf_store.go Show AI cost refresh errors and harden log redaction 2025-12-12 11:05:24 +00:00
csrf_store_test.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
demo_middleware.go fix(demo): allow AI chat in read-only mode 2025-12-23 18:52:13 +00:00
demo_middleware_test.go test: Add edge case for DemoModeMiddleware WebSocket POST upgrade 2025-12-01 23:24:06 +00:00
diagnostics.go v5: gate legacy sensor-proxy and prune dev docs 2025-12-18 21:51:25 +00:00
diagnostics_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
DO_NOT_EDIT_FRONTEND_HERE.md Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
docker_agents.go feat: Add server-wide control to disable Docker update actions 2026-01-02 10:29:43 +00:00
docker_agents_test.go ADA: Add normalizeCommandStatus helper with unit tests 2025-11-29 17:06:18 +00:00
docker_metadata.go refactor(ui): standardize URL editing with shared UrlEditPopover component 2025-12-18 22:22:55 +00:00
export_test.go fix: Update TestPublicURLDetectionUsesForwardedHeaders for proxy hardening 2025-12-02 03:16:52 +00:00
frontend_embed.go Improve static asset caching for hashed files 2025-11-06 13:54:26 +00:00
guest_metadata.go feat(ai): Add URL discovery tool - AI can find and set resource URLs 2025-12-10 00:29:07 +00:00
host_agents.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
host_agents_test.go test: Add edge cases for HandleLookup error paths 2025-12-02 00:49:16 +00:00
host_metadata.go feat(ai): Add URL discovery tool - AI can find and set resource URLs 2025-12-10 00:29:07 +00:00
http_metrics.go feat: comprehensive diagnostics and observability improvements 2025-10-21 12:37:39 +00:00
http_metrics_test.go Add unit tests for HTTP metrics utility functions 2025-11-30 02:48:05 +00:00
kubernetes_agents.go feat: add Kubernetes platform support 2025-12-12 21:31:11 +00:00
license_handlers.go feat(pro): expose update_alerts feature and add AI-powered update risk assessment 2026-01-02 19:21:17 +00:00
license_handlers_test.go fix: Allow Host Agent thresholds to be set to 0 to disable alerting. Related to #864 2025-12-20 20:25:20 +00:00
log_redact.go Show AI cost refresh errors and harden log redaction 2025-12-12 11:05:24 +00:00
metadata_provider.go feat(ai): Add URL discovery tool - AI can find and set resource URLs 2025-12-10 00:29:07 +00:00
middleware.go style: fix whitespace in middleware.go 2025-11-27 08:34:31 +00:00
middleware_test.go test: Add edge case for writeErrorResponse encode failure 2025-12-01 23:52:21 +00:00
notification_queue.go security: Add request body size limits to remaining API handlers 2025-12-02 16:47:13 +00:00
notifications.go fix: Preserve webhook headers when toggling enable/disable 2025-12-28 10:19:32 +00:00
notifications_test.go Fix redactSecretsFromURL matching params with prefixed names 2025-11-29 22:03:15 +00:00
oidc_handlers.go fix: Improve OIDC GET login error handling with proper redirects 2026-01-01 14:53:00 +00:00
oidc_handlers_test.go test: Add edge case test for addQueryParam URL parse error 2025-12-01 23:08:36 +00:00
oidc_service.go feat(oidc): Add refresh token support for long-lived sessions 2025-12-20 10:45:46 +00:00
oidc_service_test.go test: Add invalid PEM data test for newOIDCHTTPClient 2025-12-02 01:00:06 +00:00
rate_limit_config.go fix: exclude WebSocket from rate limiting to prevent UI lockout 2025-12-19 14:51:52 +00:00
rate_limit_config_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
ratelimit.go docs: Add godoc comments to exported functions 2025-12-02 15:58:59 +00:00
ratelimit_test.go Add unit tests for RateLimiter (internal/api/ratelimit.go) 2025-11-30 04:33:59 +00:00
README.md Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
recovery_tokens.go Show AI cost refresh errors and harden log redaction 2025-12-12 11:05:24 +00:00
recovery_tokens_test.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
resource_handlers.go fix: Populate resources on-demand when /api/resources is called 2025-12-07 14:47:29 +00:00
router.go feat: Add server-wide control to disable Docker update actions 2026-01-02 10:29:43 +00:00
router_arch_test.go test: Add tests for API helper functions 2025-12-01 21:33:45 +00:00
router_download_test.go Fix #735: Allow HEAD requests for download endpoints and fix routing 2025-11-24 15:16:14 +00:00
router_integration_test.go test(api): allow printable alert IDs for acknowledge (Related to #852) 2025-12-17 20:09:51 +00:00
router_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
security.go Show AI cost refresh errors and harden log redaction 2025-12-12 11:05:24 +00:00
security_oidc.go fix: mark unused parameters to satisfy unparam linter 2025-11-27 10:12:48 +00:00
security_oidc_response_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
security_setup_fix.go fix: clear agents that connected during unauthenticated setup window 2025-12-13 21:22:04 +00:00
security_setup_fix_test.go test: Add edge case for ensureSettingsWriteScope valid scope 2025-12-02 00:13:32 +00:00
security_test.go test: Add CheckCSRF valid token test for 100% coverage 2025-12-02 13:51:27 +00:00
security_tokens.go fix: Prevent re-migration of deleted env-based API tokens 2025-12-23 05:10:47 +00:00
security_tokens_test.go test: Add edge cases for normalizeRequestedScopes 2025-12-02 00:19:20 +00:00
sensor_proxy_gate.go v5: gate legacy sensor-proxy and prune dev docs 2025-12-18 21:51:25 +00:00
session_oidc_test.go feat(oidc): Add refresh token support for long-lived sessions 2025-12-20 10:45:46 +00:00
session_store.go feat(oidc): Add refresh token support for long-lived sessions 2025-12-20 10:45:46 +00:00
session_store_test.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
system_settings.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
system_settings_temperature_test.go feat: make PVE polling interval configurable (related to #467) 2025-11-18 21:30:04 +00:00
system_settings_utils_test.go Add unit tests for system_settings.go map utility functions 2025-12-01 01:05:07 +00:00
system_settings_validate_test.go Show CPU core count on EnhancedCPUBar progress bar 2025-11-29 21:47:22 +00:00
temperature_proxy.go security: Add request body size limits to remaining API handlers 2025-12-02 16:47:13 +00:00
temperature_proxy_command_test.go fix: Use --ctid instead of --standalone --http-mode in quick-setup command 2025-12-02 11:38:47 +00:00
temperature_proxy_test.go Add unit tests for temperature proxy utility functions (api) 2025-11-30 14:07:04 +00:00
types.go feat: AI integration, Docker metrics, RAID display, and infrastructure improvements 2025-12-09 09:29:27 +00:00
unified_agent.go fix: Redirect to GitHub releases for agent binary when not available locally 2025-12-26 20:16:15 +00:00
unified_agent_download_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
unified_agent_test.go Add unit tests for normalizeUnifiedAgentArch and getClientIP (api) 2025-11-30 15:05:37 +00:00
update_detection.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
update_detection_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
updates.go security: Add request body size limits to remaining API handlers 2025-12-02 16:47:13 +00:00
updates_test.go test: improve test coverage for AI, license, config, and monitoring packages 2025-12-19 22:49:30 +00:00

Internal API Package

This directory contains the API server implementation for Pulse.

Important Note About frontend-modern/

The frontend-modern/ subdirectory that appears here is:

  • AUTO-GENERATED during builds
  • NOT the source code - just a build artifact
  • IN .gitignore - never committed
  • REQUIRED BY GO - The embed directive needs it here

Frontend Development Location

👉 Edit frontend files at: /opt/pulse/frontend-modern/src/

Why This Structure?

Go's //go:embed directive has limitations:

  1. Cannot use ../ paths to access parent directories
  2. Cannot follow symbolic links
  3. Must embed files within the Go module

This is a known Go limitation and our structure works around it.