 
   def list(registry) do
     Logger.warn("No permission checking for list of plugins. FIXME.")
-    plugins = Agent.get registry, &(&1)
-    Enum.reduce(plugins, %{}, fn plugin, acc ->
+    Enum.reduce(all_plugins, %{}, fn plugin, acc ->
       components = Enum.reduce(plugin.components, %{}, fn component, acc ->
         Map.put(acc, component.id, %{
           id: component.id,

  @doc ~S"""
  Reload all plugin data. Normally called from the inotify watcher
  """
  def reload_plugins(pid) do
    Agent.update(pid, fn _ -> load_plugins() end)
    plugins = Agent.get pid, &(&1)
    Logger.info("Reloaded plugin registry #{inspect pid}, got #{Enum.count plugins}")
  end

  @doc ~S"""

    import Enum
    alias Serverboards.Plugin.Component

    components = active_plugins |>
      flat_map(fn p -> # maps plugins to list of components that fit, or []
        p.components
          |> filter(fn c ->
