meta/lib/meta_web/templates/virtual_machine_hosting/index.html.eex

41 lines
1.3 KiB
Elixir

<h1>Virtual Machines</h1>
<p>This page list all the Virtual Machines linked to your account. Note that
SSH keys are not (yet) synced with OpenNebula: you'll have to add your key in
<i><%= @current_user.username %> (top-right) > Settings > Add SSH Key</i> in
OpenNebula for every location you want to use.</p>
<%= for location <- Map.keys(@vms) do %>
<h2>Location: <%= location %></h2>
<p>
You can access the OpenNebula dashboard with your LDAP credentials at:
<a href="<%= Map.get(ONE.get_location_config(location), :public_address) %>">
<%= Map.get(ONE.get_location_config(location), :public_address) %>
</a>
</p>
<table>
<thead>
<tr>
<th style="width: 15%;">ID</th>
<th style="width: 40%;">Name</th>
<th style="width: 30%;">State</th>
<th style="width: 15%">Actions</th>
</tr>
</thead>
<tbody>
<%= for vm <- Map.get(@vms, location) do %>
<tr>
<td><%= location %>#<%= Map.get(vm, :ID) %></td>
<td><%= Map.get(vm, :NAME) %></td>
<td><%= render_state(vm) %></td>
<td>
<%= link "Show history »", to: Routes.virtual_machine_hosting_path(@conn, :show, location, Map.get(vm, :ID)) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>