ExESDBDashboard (ex_esdb_dashboard v0.1.0)

View Source

Composable cluster dashboard components that can be embedded in any Phoenix application using ex_esdb_gater as a dependency.

Usage

Add to your Phoenix router:

import ExESDBDashboard

scope "/admin" do
  dashboard_routes()
end

Or mount individual components:

live "/cluster", ExESDBDashboard.ClusterLive

Requirements

Your hosting application must have:

  • phoenix_live_view in dependencies
  • ExESDBGater.System started in your supervision tree
  • Phoenix.PubSub configured (using the same pubsub server as ExESDBGater)

Summary

Functions

Returns the main cluster dashboard LiveView component.

Returns the cluster status component for embedding in other views.

Adds dashboard routes to a Phoenix router.

Gets comprehensive cluster data for dashboard display.

Gets information about all cluster nodes.

Gets information about cluster stores.

Functions

cluster_live_component()

Returns the main cluster dashboard LiveView component.

cluster_status_component()

Returns the cluster status component for embedding in other views.

dashboard_routes()

(macro)

Adds dashboard routes to a Phoenix router.

Example

scope "/admin" do
  dashboard_routes()
end

get_cluster_data()

Gets comprehensive cluster data for dashboard display.

Returns a map containing:

  • :nodes - List of connected nodes with their status
  • :stores - List of available stores with statistics
  • :total_streams - Total number of streams across all stores
  • :cluster_health - Overall cluster health status

get_cluster_nodes()

Gets information about all cluster nodes.

get_cluster_stores()

Gets information about cluster stores.