28 lines
653 B
Elixir
28 lines
653 B
Elixir
<h1>VM#<%= Map.get(@vm, :ID) %> - <%= Map.get(@vm, :NAME) %></h1>
|
|
|
|
<ul>
|
|
<li>State: <b><%= VM.state_for(Map.get(@vm, :STATE)) %></b></li>
|
|
<li>LCM State: <b><%= Map.get(@vm, :LCM_STATE) %></b></li<
|
|
</ul>
|
|
|
|
<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>
|