<div class="panel panel-default">
    <div class="panel-body">
        <!-- 统计面板 -->
        <div class="row">
            <div class="col-md-3">
                <div class="panel panel-blue">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-x fa-cubes fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge" id="group_count_text"></div>
                                <div>项目组</div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <span class="pull-left text-primary"><strong>我的项目组</strong></span>
                        <span class="pull-right"><a href="/publish/project" class="text-primary"><i class="glyphicon glyphicon-hand-right"></i> 查看</a></span>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="panel panel-yellow">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-x fa-cube fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge" id="project_count_text"></div>
                                <div>项目</div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <span class="pull-left text-warning"><strong>我的项目</strong></span>
                        <span class="pull-right"><a href="/publish/project" class="text-warning"><i class="glyphicon glyphicon-hand-right"></i> 查看</a></span>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-x fa-paper-plane-o fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge" id="success_publish_text"></div>
                                <div>成功次数</div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <span class="pull-left text-success"><strong>发布成功</strong></span>
                        <span class="pull-right text-success"><i class="glyphicon glyphicon-ok"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="panel panel-red">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-x fa-lightbulb-o fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge" id="failed_publish_text"></div>
                                <div>失败次数</div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <span class="pull-left text-danger"><strong>发布失败</strong></span>
                        <span class="pull-right text-danger"><i class="glyphicon glyphicon-remove"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 活跃项目排行榜 -->
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading"> <strong>活跃项目排行榜</strong> </div>
                    <div class="panel-body">
                        <div id="active-project-rank"></div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 发布数据和系统公告 -->
        <div class="row">
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading"> <strong>发布数据统计</strong></div>
                    <div class="panel-body">
                        <br>
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <td><strong>统计项目</strong></td>
                                <td><strong>今日</strong></td>
                                <td><strong>昨日</strong></td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><strong>发布总数</strong></td>
                                <td data-name="today_task_total">0</td>
                                <td data-name="yesterday_task_total">0</td>
                            </tr>
                            <tr>
                                <td><strong>发布用户</strong></td>
                                <td data-name="today_user_total"></td>
                                <td data-name="yesterday_user_total">0</td>
                            </tr>
                            <tr>
                                <td><strong>成功节点</strong></td>
                                <td data-name="today_success_node">0</td>
                                <td data-name="yesterday_success_node">0</td>
                            </tr>
                            <tr>
                                <td><strong>失败节点</strong></td>
                                <td data-name="today_failed_node">0</td>
                                <td data-name="yesterday_failed_node">0</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="panel panel-default" style="height: 278px">
                    <div class="panel-heading"><strong>系统公告</strong></div>
                    <ul class="list-group">
                        {{range $notice:=.notices}}
                        <li class="list-group-item">
                            <a name="info" data-link="/notice/info?notice_id={{$notice.notice_id}}"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;{{$notice.title}}<small class="pull-right">{{dateFormat $notice.create_time "Y/m/d"}}</small></a>
                        </li>
                        {{end}}
                    </ul>
                </div>
            </div>
        </div>
        <!--团队联系手册|服务器状态-->
        <div class="row">
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading"><strong>服务器状态</strong></div>
                    <div class="panel-body">
                        <br>
                        <p> CPU使用率：<strong class="cpu_text">0%</strong></p>
                        <div class="progress" style="height: 14px">
                            <div id="cpu_progress" class="progress-bar progress-bar-success progress-bar-striped active"
                                 role="progressbar"
                                 aria-valuenow="0"
                                 aria-valuemin="0"
                                 aria-valuemax="100"
                                 style="min-width: 2em; width: 0">
                                <div style="font-size:10px;line-height:14px;" class="cpu_text"> 0%</div>
                            </div>
                        </div>
                        <p>磁盘使用率：<strong class="disk_text">0%</strong></p>
                        <div class="progress" style="height: 14px">
                            <div id="disk_progress" class="progress-bar progress-bar-warning progress-bar-striped active"
                                 role="progressbar"
                                 aria-valuenow="0"
                                 aria-valuemin="0"
                                 aria-valuemax="100"
                                 style="width: 60%">
                                <div style="font-size:10px;line-height:14px;" class="disk_text"> 0%</div>
                            </div>
                        </div>
                        <p>内存使用率：<strong class="memory_text">0%</strong></p>
                        <div class="progress" style="height: 14px">
                            <div id="memory_progress" class="progress-bar progress-bar-danger progress-bar-striped active"
                                 role="progressbar"
                                 aria-valuenow="0"
                                 aria-valuemin="0"
                                 aria-valuemax="100"
                                 style="width: 80%">
                                <div style="font-size:10px;line-height:14px;" class="memory_text"> 0%</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="panel panel-default" style="height: 269px;" >
                    <div class="panel-heading"><strong>系统联系人手册</strong></div>
                    <div class="panel-body" style="height: 223px; overflow-y:scroll;">
						<ul class="list-group" id="contact">
                           
                       	</ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(window).load(function(){
        Layers.bindIframe("[name='info']", "公告详细信息", "450px", "850px");
        Main.GetProjectCount("/main/getMyProjectCount");
        Main.GetActiveProjectRank("active-project-rank", "/main/getActiveProjectRank");
        Main.GetPublishData("/main/getPublishData");
        Main.GetServerStatus("/main/serverStatus");
		Main.GetContact("/main/getContact")
        setInterval('Main.GetServerStatus("/main/serverStatus")', 2000);
    });
</script>