feat(settings): Phase 4 — capabilities vs integrations + nav cleanup
Final phase of the host-IA unification (milestone 70). - Settings → Plugins split into two tiers: "Monitoring capabilities" (host_agent, http, snmp, docker — built-in host facets, surfaced via Hosts/Status, on by default) and "Integrations" (traefik, unifi — external systems, off until configured). Presentation only: a CAPABILITY_PLUGINS set (overridable by plugin.yaml `kind:`) tags each plugin; module loading, optional deps, and migrations are untouched. - Drop the "default-enable a plugin" framing in the UI copy — capabilities are described as built-in, not optional add-ons. - Nav: remove the standalone "Uptime" item (folded into Hosts; still reachable via the SLA button on the Hosts list). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -505,6 +505,13 @@ def _build_plugin_cfg_from_form(plugin: dict, form) -> dict:
|
||||
|
||||
# ── Plugins list ──────────────────────────────────────────────────────────────
|
||||
|
||||
# Bundled plugins that are really built-in *host/monitoring capabilities* (facets
|
||||
# of a host), not discrete vendor integrations. Presentation-only split — they
|
||||
# still load through the normal plugin mechanism. A plugin.yaml may set
|
||||
# kind: capability|integration to override.
|
||||
CAPABILITY_PLUGINS = {"host_agent", "http", "snmp", "docker"}
|
||||
|
||||
|
||||
@settings_bp.get("/plugins/")
|
||||
@require_role(UserRole.admin)
|
||||
async def plugins():
|
||||
@@ -512,9 +519,14 @@ async def plugins():
|
||||
settings = await get_all_settings(db)
|
||||
discovered = _discover_plugins()
|
||||
_merge_plugin_config(discovered, to_plugins_cfg(settings))
|
||||
for p in discovered:
|
||||
p["_kind"] = p.get("kind") or (
|
||||
"capability" if p["_dir"] in CAPABILITY_PLUGINS else "integration")
|
||||
repos = _get_plugin_repos(settings)
|
||||
return await render_template(
|
||||
"settings/plugins.html",
|
||||
capabilities=[p for p in discovered if p["_kind"] == "capability"],
|
||||
integrations=[p for p in discovered if p["_kind"] != "capability"],
|
||||
discovered_plugins=discovered,
|
||||
repos=repos,
|
||||
settings=settings,
|
||||
|
||||
Reference in New Issue
Block a user