Update VM display state to "waiting for capacity" if allocation is not able to find any eligible host. Switch VM display state back to "creating" when a suitable host was found.
18 lines
646 B
Text
18 lines
646 B
Text
<% case state %>
|
|
<% when "running" %>
|
|
<% color = "bg-green-100 text-green-800" %>
|
|
<% when "creating", "rebooting", "starting", "waiting for capacity" %>
|
|
<% color = "bg-yellow-100 text-yellow-800" %>
|
|
<% when "deleting", "deleted" %>
|
|
<% color = "bg-red-100 text-red-800" %>
|
|
<% else %>
|
|
<% color = "bg-slate-100 text-slate-800" %>
|
|
<% end %>
|
|
<% extra_class = defined?(extra_class) ? extra_class : nil %>
|
|
|
|
<span
|
|
class="inline-flex items-baseline rounded-full px-2 text-xs font-semibold leading-5 <%= color %> <%= extra_class %>"
|
|
>
|
|
<%== render("components/icon", locals: { name: "dot", classes: "mr-1.5 h-2 w-2" }) %>
|
|
<%= state %>
|
|
</span>
|