Commit Graph

24 Commits

Author SHA1 Message Date
Chris Lu
5342328836 fix: Display connected plugins in admin UI
- Fix ShowPlugins handler to fetch plugins from registry instead of returning empty
- Update PluginsPageData struct to use []map[string]interface{} for proper data handling
- Rewrite plugins.templ to properly iterate and display plugin details
- Plugin count now displays correctly in the card header
- Plugin table shows ID, Name, Status, Version, Capabilities, and Actions
- Plugin worker successfully connects and displays in admin dashboard

fix: Add plugin routes to non-auth section and resolve route conflicts

- Plugin routes were only registered when authRequired=true (password set)
- When no admin password was set, auth was disabled and routes were skipped
- Also changed route paths to avoid conflicts in Gin router:
  - Changed /jobs/:type to /jobs/by-type/:type to avoid conflict with /jobs/:id/cancel
  - Changed /jobs/:type/trigger-detection to /trigger-detection/:type
  - Changed /jobs/:id/cancel to /cancel-job/:id
- Plugin UI now accessible at http://localhost:23646/plugins

feat: Add plugin_worker command for new plugin system

- Create new generic plugin worker that connects to admin server via gRPC
- Supports multiple plugins: erasure_coding, vacuum, balance
- Replaces old task-based worker system with plugin-based approach
- Automatically registers with admin server on startup
- Sends periodic health reports to admin server
- Configuration saved in working directory
- Usage: weed plugin_worker -admin=localhost:33650 -plugins=erasure_coding,vacuum,balance

fix: Initialize plugin manager and register PluginService on gRPC server

- Initialize plugin manager in admin_server.initPluginManager() instead of placeholder
- Create plugin configuration directory in admin dataDir/plugins
- Register PluginService, AdminQueryService, and AdminCommandService on worker gRPC server
- Plugin worker can now connect and register with admin server

Changes:
- weed/admin/dash/admin_server.go: Properly initialize plugin manager
- weed/admin/dash/worker_grpc_server.go: Register plugin services on gRPC server

Testing:
- Plugin worker connects successfully to admin server
- Plugin capabilities are registered correctly
- Health reporting works as expected
2026-02-17 11:08:35 -08:00
Chris Lu
2be97d7190 feat(plugin): Add history management to plugin manager 2026-02-17 02:06:13 -08:00
Chris Lu
75644c7e3d feat(plugin): Add history tracking to plugin types 2026-02-17 02:06:05 -08:00
Chris Lu
3320911984 fix(plugin): Fix testing framework and plugin compilation issues 2026-02-17 02:03:38 -08:00
Chris Lu
dafa8d79f5 feat(plugin): Add balance plugin implementation 2026-02-17 02:00:39 -08:00
Chris Lu
e7efe201e3 feat(plugin): Add vacuum plugin implementation 2026-02-17 02:00:36 -08:00
Chris Lu
9b2fd24e52 feat(plugin): Add balance plugin implementation 2026-02-17 01:57:51 -08:00
Chris Lu
574f72906a feat(plugin): Add vacuum plugin implementation 2026-02-17 01:55:11 -08:00
Chris Lu
babc4751db test(plugin): Add EC plugin comprehensive tests 2026-02-17 01:46:34 -08:00
Chris Lu
efb69400ff feat(plugin): Add EC plugin worker client 2026-02-17 01:46:12 -08:00
Chris Lu
7dc40d3747 feat(plugin): Add EC plugin execution logic 2026-02-17 01:45:49 -08:00
Chris Lu
fb7c7b3744 feat(plugin): Add EC plugin detection logic 2026-02-17 01:45:30 -08:00
Chris Lu
7ff0026e46 feat(plugin): Add EC plugin configuration schema 2026-02-17 01:45:11 -08:00
Chris Lu
f57992b81e feat(plugin): Add test harness for plugin testing 2026-02-17 01:44:52 -08:00
Chris Lu
471b0cf8f3 feat(plugin): Add mock plugin for testing 2026-02-17 01:44:24 -08:00
Chris Lu
a2d2d77e09 feat(plugin): Add mock admin server for testing 2026-02-17 01:43:57 -08:00
Chris Lu
eb13f9ce82 fix(plugin): Fix protobuf enum naming and build issues 2026-02-17 01:41:19 -08:00
Chris Lu
67e37e180e feat(plugin): Add plugin manager orchestrator 2026-02-17 01:39:28 -08:00
Chris Lu
2fcd6a3056 feat(plugin): Add gRPC server implementation 2026-02-17 01:39:06 -08:00
Chris Lu
13f39d4ad2 feat(plugin): Add configuration manager for persistence 2026-02-17 01:38:39 -08:00
Chris Lu
eead8b2337 feat(plugin): Add job dispatcher for orchestration 2026-02-17 01:38:20 -08:00
Chris Lu
b728dc00ed feat(plugin): Add job queue with priority and deduplication 2026-02-17 01:37:58 -08:00
Chris Lu
5ac3e80d2b feat(plugin): Add plugin registry with lifecycle management 2026-02-17 01:37:39 -08:00
Chris Lu
42c52f9371 feat(plugin): Add plugin system core types and domain models 2026-02-17 01:37:22 -08:00