Esempio n. 1
0
     }
     //设置图表参数
     $chart_lw = new Dim2PieChart();
     $chart_lw->data["chart"] = array("type" => "pie");
     $chart_lw->data["title"] = array("text" => "本周发现缺陷分布");
     $chart_lw->data["subtitle"] = array("text" => "本周发现bug状态和指派人");
     $chart_lw->data["series"][0] = array("name" => "Status", "size" => "60%", "dataLabels" => array("distance" => -50, "color" => "white"));
     $chart_lw->data["series"][1] = array("name" => "Assign", "size" => "80%", "innerSize" => "60%");
     $chart_lw->data["colors"] = array("#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B", "#514F78");
     $chart_lw->data["series"][0]["data"] = $data1;
     $chart_lw->data["series"][1]["data"] = $data2;
     echo $chart_lw->getChartJson();
 } else {
     if ($_GET["action"] == "week_bug_trend") {
         //返回开放BUG图表
         $db = new BugDB();
         $week_bugs = $db->selectWeekBugTrend();
         $seires = array();
         foreach ($week_bugs as $val) {
             $seires[$val["name"]][$val["weekday"]] = $val["count"];
         }
         $w = date('w');
         $data = array();
         foreach ($seires as $key => $probug) {
             $d = array();
             for ($i = 0; $i < $w; $i++) {
                 if (!isset($seires[$key][$i . ""])) {
                     $seires[$key][$i . ""] = 0;
                 }
                 $d[$i] = (int) $seires[$key][$i . ""];
             }
Esempio n. 2
0
    	<?php 
$db = new BugDB();
$new_bug_total = $db->selectWeekTotalBug();
$h = new StatsTile();
$h->icon = "entypo-eye";
$h->color = "tile-blue";
$h->title = "缺陷数";
$h->introduce = "本周发现缺陷总数";
$h->datashow = $new_bug_total;
$h->show();
?>
		<?php 
//拼接content
$content = "<div id='new_bug'></div>";
$content = $content . "<table id='datatable' style='margin-left:0px;margin-top:40px;' class='table table-bordered table-striped'> <thead> <tr> <th></th> <th>新增BUG</th> <th>新增未关闭</th> </tr> </thead> <tbody> ";
$db = new BugDB();
$bug = $db->selectBugLW();
$tr = "";
foreach ($bug as $val) {
    $tr = $tr . "<tr> <th>" . $val[0] . "</th><td>" . $val[1] . "</td><td>" . $val[2] . "</td></tr>";
}
$content = $content . $tr . "</tbody></table>";
//panel 内容
$panel = new Panel();
$panel->data = array("title" => "design by 刘浩");
$panel->data["content"] = $content;
$panel->show();
?>
    </div>
    <div class="col-sm-8">
	    <div class="row">