Skip to content
Permalink
Browse files

View changes to display nodes

  • Loading branch information...
anurag committed Jun 6, 2019
1 parent 6169fec commit a7bec265602ab3e038a8e7af5e8a6cd67eba3e8b
Binary file not shown.
@@ -2,6 +2,8 @@ defmodule ElixirClusterDemoWeb.PageController do
use ElixirClusterDemoWeb, :controller

def index(conn, _params) do
render(conn, "index.html")
self_node = inspect(node())
nodes = inspect(Node.list())
render(conn, "index.html", %{node: self_node, nodes: nodes})
end
end
@@ -4,19 +4,14 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>ElixirClusterDemo · Phoenix Framework</title>
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<title>Elixir Cluster on Render with libcluster</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<header>
<section class="container">
<nav role="navigation">
<ul>
<li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
</ul>
</nav>
<a href="http://phoenixframework.org/" class="phx-logo">
<img src="<%= Routes.static_path(@conn, "/images/phoenix.png") %>" alt="Phoenix Framework Logo"/>
<a href="https://render.com">
<img src="<%= Routes.static_path(@conn, "/images/render.png") %>" alt="Render Logo"/>
</a>
</section>
</header>
@@ -1,35 +1,21 @@
<section class="phx-hero">
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1>
<p>A productive web framework that<br/>does not compromise speed and maintainability.</p>
</section>

<section class="row">
<article class="column">
<h2>Resources</h2>
<ul>
<li>
<a href="https://hexdocs.pm/phoenix/overview.html">Guides &amp; Docs</a>
</li>
<li>
<a href="https://github.com/phoenixframework/phoenix">Source</a>
</li>
<li>
<a href="https://github.com/phoenixframework/phoenix/blob/v1.4/CHANGELOG.md">v1.4 Changelog</a>
</li>
</ul>
</article>
<article class="column">
<h2>Help</h2>
<ul>
<li>
<a href="https://elixirforum.com/c/phoenix-forum">Forum</a>
</li>
<li>
<a href="https://webchat.freenode.net/?channels=elixir-lang">#elixir-lang on Freenode IRC</a>
</li>
<li>
<a href="https://twitter.com/elixirphoenix">Twitter @elixirphoenix</a>
</li>
</ul>
</article>
</section>
<div class="container">
<div class="row text-center justify-content-center">
<div class="col">
<h1 class="display-4">Distributed Elixir Cluster with libcluster</h1>
<p>Learn more at <a href="https://render.com/docs/deploy-elixir-cluster">https://render.com/docs/deploy-elixir-cluster</a>.
</div>
</div>
</div>
<div class="mt-3">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th scope="row" class="p-3">Current Node</th>
<td class="p-3"><%= @node %></td>
</tr>
<tr>
<th scope="row" class="p-3">Other Nodes</th>
<td class="p-3"><%= @nodes %></td>
</tbody>
</table>
</div>

0 comments on commit a7bec26

Please sign in to comment.
You can’t perform that action at this time.