Skip to content

An additional page for Phoenix LiveDashboard with information about connected nodes

License

Notifications You must be signed in to change notification settings

kkondaurov/connected_nodes_dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConnectedNodesDashboard

An additional page for Phoenix LiveDashboard with information about connected nodes.

For example, an app deployed to fly.io as a cluster in 3 regions, one of which has a remote console running and an attached Livebook session, would look like this:

Example screenshot

Installation

If available in Hex, the package can be installed by adding connected_nodes_dashboard to your list of dependencies in mix.exs:

def deps do
  [
    {:connected_nodes_dashboard, "~> 0.1.0"}
  ]
end

Add ConnectedNodesDashboard.Page to the list of additional LiveDashboard pages in your router:

live_dashboard "/live_dashboard",
  # ...
  additional_pages: [
    connected_nodes: ConnectedNodesDashboard.Page
  ]

Displaying Environmental Variables

You can also pass a list of environmental variables which values you'd like to see for each of the connected nodes.

live_dashboard "/live_dashboard",
  # ...
  additional_pages: [
    connected_nodes: {ConnectedNodesDashboard.Page, env_vars: [:FOO, :BAR]}
  ]

Please note that since LiveDashboard table component requires fields to be atoms, env_vars elements should also be atoms - the library ignores string keys.

In the above example, env_vars is set up like this:

live_dashboard "/live_dashboard",
  # ...
  additional_pages: [
    connected_nodes: {ConnectedNodesDashboard.Page, env_vars: [:FLY_REGION, :FLY_ALLOC_ID]}
  ]

About

An additional page for Phoenix LiveDashboard with information about connected nodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages