* Display chart datas of testtask.

This commit is contained in:
liugang
2018-07-23 14:15:04 +08:00
parent 44a8a98c34
commit a2baa7ad5a
2 changed files with 77 additions and 0 deletions
@@ -1,4 +1,50 @@
<table class='table table-form'>
<?php foreach($charts as $chartType => $chartOption):?>
<tr>
<td class='text-top'>
<table class='table table-condensed table-report' id='bugSeverityGroups'>
<?php if(empty($datas[$chartType])):?>
<tr>
<td class='none-data'>
<h5><?php echo $lang->testtask->report->charts[$chartType];?></h5>
<?php echo $lang->testreport->none;?>
</td>
</tr>
<?php else:?>
<tr class='text-top'>
<td class='w-p70'>
<div class='chart-wrapper text-center'>
<h5><?php echo $lang->testtask->report->charts[$chartType];?></h5>
<div class='chart-canvas'><canvas id='chart-<?php echo $chartType ?>' width='<?php echo $chartOption->width;?>' height='<?php echo $chartOption->height;?>' data-responsive='true'></canvas></div>
</div>
</td>
<td>
<div class='table-wrapper' style='overflow:auto'>
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='<?php echo $chartOption->type; ?>' data-target='#chart-<?php echo $chartType ?>' data-animation='false'>
<thead>
<tr>
<th class='chart-label' colspan='2'><?php echo $lang->report->item;?></th>
<th class='w-50px'><?php echo $lang->report->value;?></th>
<th class='w-50px'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php foreach($datas[$chartType] as $key => $data):?>
<tr class='text-center'>
<td class='chart-color'><i class='chart-color-dot'></i></td>
<td class='chart-label'><?php echo $data->name;?></td>
<td class='chart-value'><?php echo $data->value;?></td>
<td><?php echo ($data->percent * 100) . '%';?></td>
</tr>
<?php endforeach;?>
</table>
</div>
</td>
</tr>
<?php endif;?>
</table>
</td>
</tr>
<?php endforeach;?>
<?php foreach($bugInfo as $infoKey => $infoValue):?>
<tr>
<td class='text-top'>