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

31 lines
831 B
Elixir
Raw Normal View History

2021-04-09 11:36:33 +02:00
<h1>VM <%= @location %>#<%= Map.get(@vm, :ID) %> - <%= Map.get(@vm, :NAME) %></h1>
2021-04-07 17:23:48 +02:00
2021-04-09 11:36:33 +02:00
<p>
This VM is located in the <%= @location %> location, its state is <%=
render_state(@vm) %>. The OpenNebula dashboard can be accessed at
<a href="<%= Map.get(ONE.get_location_config(@location), :public_address) %>">
<%= Map.get(ONE.get_location_config(@location), :public_address) %>
</a>.
</p>
2021-04-07 17:23:48 +02:00
<h2>History</h2>
<table>
<thead>
<tr>
<th>Time</th>
<th>Action</th>
<th>Host</th>
</tr>
</thead>
<tbody>
<%= for entry <- @vm |> Map.get(:HISTORY_RECORDS) |> Map.get(:HISTORY) do %>
<tr>
<td><%= DateTime.from_unix!(Map.get(entry, :STIME)) %></td>
<td><%= VM.event_for(Map.get(entry, :ACTION)) %></td>
<td><%= Map.get(entry, :HOSTNAME) %></td>
</tr>
<% end %>
</tbody>
</table>