PhoenixKitWeb.Live.Modules (phoenix_kit v2.44.0)

Copy Markdown View Source

Admin modules management LiveView for PhoenixKit.

Displays available system modules and their configuration status. All module references are resolved at runtime via the ModuleRegistry, so removing or adding modules requires no changes to this file.

Summary

Functions

Safely get a module config value, returning default if module not loaded.

Normalizes a module's enabled flag across the two config key spellings modules use: :enabled for most, :module_enabled for Crawlers and Storage (whose get_config/0 reports module_enabled: true; it is always on). Use it wherever a module's config is read for "is it on", or a module keyed the other way reads as off (every external module that required Storage used to show "Requires Storage").

Whether a module's enabled state belongs on the given Modules-page tab.

Callback implementation for Phoenix.LiveView.render/1.

Functions

format_bytes(bytes)

format_timestamp(iso_string)

handle_event(binary, map, socket)

Callback implementation for Phoenix.LiveView.handle_event/3.

handle_info(arg1, socket)

Callback implementation for Phoenix.LiveView.handle_info/2.

mcfg(module_configs, key, field, default \\ nil)

Safely get a module config value, returning default if module not loaded.

module_enabled?(config)

Normalizes a module's enabled flag across the two config key spellings modules use: :enabled for most, :module_enabled for Crawlers and Storage (whose get_config/0 reports module_enabled: true; it is always on). Use it wherever a module's config is read for "is it on", or a module keyed the other way reads as off (every external module that required Storage used to show "Requires Storage").

modules_tab_match?(arg1, enabled?)

Whether a module's enabled state belongs on the given Modules-page tab.

mount(params, session, socket)

Callback implementation for Phoenix.LiveView.mount/3.

render(assigns)

Callback implementation for Phoenix.LiveView.render/1.