PhoenixKitDashboards. Widgets. ModuleStatsWidget
(PhoenixKitDashboards v0.1.0)
Copy Markdown
View Source
Built-in "Module stats" widget — renders the get_config/0 map of any
discovered PhoenixKit module, selected by its module_key setting.
Demonstrates the widget view + size contract: it renders a full key/value
table in the "detailed" view and a single headline count in "compact", and
it falls back to compact automatically when the instance is sized too small for
a table (size.w < 3 or size.h < 2). It resolves the module through core's
PhoenixKit.ModuleRegistry and degrades gracefully when core isn't loaded or
the key is unknown. The settings form offers the installed modules as a
SELECT (module_options/0) — nobody should have to know registry keys.
Summary
Functions
The installed modules that expose a get_config/0 map, as {label, key}
select options (sorted by display name). Evaluated when the widget catalog is
built, so a newly installed module appears after a registry refresh.