<div class="container">
    <div class="row row-offcanvas row-offcanvas-right">
        <div class="col-xs-6 col-sm-3 sidebar-offcanvas">
            <div class="panel-body">{{$server := .server}}{{$envData := .envData}}{{$dirData := .dirData}}
                <div class="row">
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>安装步骤</strong></div>
                        <div class="list-group">
                            <a href="/install/license" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 1. 许可协议</a>
                            <a href="/install/env" class="list-group-item active"><i class="glyphicon glyphicon-hand-right"></i> 2. 环境检测</a>
                            <a href="/install/config" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 2. 系统配置</a>
                            <a href="/install/database" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 3. 数据库配置</a>
                            <a href="/install/ready" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 4. 准备安装</a>
                            <a href="#" class="list-group-item"><i class="glyphicon glyphicon-hand-right"></i> 5. 安装完成</a>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-9">
            <div id="failedBox" style="margin-bottom: 0; margin-top: 10px;" class="hide"></div>
            <div class="panel-body">
                <!-- 服务器信息 -->
                <div class="row">
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>服务器信息</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w13p">参数</th>
                                    <th>值</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td class="center">IP</td>
                                    <td class="center">{{$server.host}}</td>
                                </tr>
                                <tr>
                                    <td class="center">操作系统</td>
                                    <td class="center">{{$server.sys}}</td>
                                </tr>
                                <tr>
                                    <td class="center">Go 版本</td>
                                    <td class="center">1.8</td>
                                </tr>
                                <tr>
                                    <td class="center">安装目录</td>
                                    <td class="center">{{$server.install_dir}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                    <!-- 系统环境检测 -->
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>系统环境检测</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w13p">参数</th>
                                    <th>要求（>=）</th>
                                    <th>值</th>
                                    <th class="w11p">结果</th>
                                </tr>
                                </thead>
                                <tbody>
                                {{range $env := $envData}}
                                <tr>
                                    <td class="center">{{$env.name}}</td>
                                    <td class="center">{{$env.require}}</td>
                                    <td class="center">{{$env.value}}</td>
                                    <td class="center">
                                        {{if eq $env.result "1"}}
                                        <i class="glyphicon glyphicon-ok text-success"></i>
                                        {{else}}
                                        <i class="glyphicon glyphicon-remove text-danger"></i>
                                        {{end}}
                                    </td>
                                </tr>
                                {{end}}
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                    <!-- 目录权限检测 -->
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>安装目录文件检测</strong></div>
                        <div class="panel-body"></div>
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="w30p">目录或文件</th>
                                    <th>要求</th>
                                    <th class="w11p">结果</th>
                                </tr>
                                </thead>
                                <tbody>
                                {{range $dir := $dirData}}
                                <tr>
                                    <td>{{$dir.path}}</td>
                                    <td class="center">{{$dir.require}}</td>
                                    <td class="center">
                                        {{if eq $dir.result "1"}}
                                        <i class="glyphicon glyphicon-ok text-success"></i>
                                        {{else}}
                                        <i class="glyphicon glyphicon-remove text-danger"></i>
                                        {{end}}
                                    </td>
                                </tr>
                                {{end}}
                                </tbody>
                            </table>
                        </div>
                        <div class="panel-footer"></div>
                    </div>
                    <!-- 按钮 -->
                    <form action="/install/env" method="post">
                        <div class="col-md-offset-8 pull-right">
                            <a href="/install/license">
                                <button type="button" class="btn btn-warning">上一步</button>
                            </a>
                            <button type="button" onclick="Form.installSubmit(this.form)" class="btn btn-primary">下一步
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <hr>
    <footer>
        <p>© BZPPX 2018</p>
    </footer>
</div>