@model IEnumerable<Alpha.Coordinador.WebApp.Models.VirtualMachineListViewModel>

@{
    ViewBag.Title = "Máquinas disponibles";
}
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/bootstrap")
<h2>Máquinas disponibles</h2>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Machine.Nombre)
        </th>
        @if (ViewBag.IsAdmin)
        {
            <th>
                @Html.DisplayNameFor(model => model.Machine.IP)
            </th>
        }
        <th>
            @Html.DisplayNameFor(model => model.Machine.Usuario)
        </th>
    </tr>

    @foreach (var item in Model)
    {
        Html.RenderPartial("_VmList", item);
@*<script>
            @if(item.CurrentSession != null)
            {
            //@:window.UpdateSessionStateIntervals.push({ machineId = @item.Machine.ID, interval = setInterval(() => { updateSessionState('@item.CurrentSession.Token', '@item.Machine.ID', true); }, 10000) });
            }
</script>*@
    }
</table>
<div id="dialog" title="Dialog">
    <p></p>
</div>