@model EForT.Models.AdminModel

<div class="modal fade text-left" id="connectServerModal" tabindex="-1" role="dialog" aria-labelledby="connectServerModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="connectServerModalLabel">Connect to MT4 VPS</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-12 mb-1">
                        <h6 id="connect-server-title">Terminals Installed in Server:</h6>
                    </div>
                    <div class="col-12">
                        <div class="table-responsive">
                            <table id="terminal-installed" class="table table-striped table-bordered ">
                                <thead>
                                    <tr>
                                        <th scope="col" style="width:60%; min-width:260px;">Terminal Instance</th>
                                        <th scope="col" style="width:40%; min-width:180px;">Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @if (Model.ListInstalledTerminals != null)
                                    {
                                        if (Model.ListInstalledTerminals.Count > 0)
                                        {
                                            for (int i = 0; i < Model.ListInstalledTerminals.Count; i++)
                                            {
                                                <tr>
                                                    <td>
                                                        <span>@Model.ListInstalledTerminals[i].TerminalInstance</span>
                                                    </td>
                                                    <td>
                                                        <span>@Model.ListInstalledTerminals[i].TerminalConnectionStatus</span>
                                                    </td>
                                                </tr>
                                            }
                                        }
                                        else
                                        {
                                            <tr>
                                                <td colspan="2">
                                                    <div class="row m-0">
                                                        <div class="col-12 p-0 text-center">
                                                            <span class="blue-grey lighten-3">No terminals found</span>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                        }
                                    }
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <form id="connectServerForm" asp-action="ConnectMT4Server" asp-controller="MT4Server" method="post">
                <input type="hidden" asp-for="EditServer.Id" />
                <div class="modal-footer">
                    <input id="btn-connect-server" type="submit" class="btn btn-primary" value="Connect Server">
                    <input id="close-modal" type="reset" class="btn btn-secondary" data-dismiss="modal" value="Close">
                </div>
            </form>
        </div>
    </div>
</div>