* Fix bug #24848#24817.
This commit is contained in:
@@ -1378,12 +1378,15 @@ class execution extends control
|
||||
|
||||
list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type);
|
||||
|
||||
$chartData = $this->execution->buildCFDData($executionID, $dateList, $type);
|
||||
if(isset($chartData['line'])) $chartData['line'] = array_reverse($chartData['line']);
|
||||
|
||||
$this->view->title = $this->lang->execution->CFD;
|
||||
$this->view->type = $type;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executionName = $execution->name;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->chartData = $this->execution->buildCFDData($executionID, $dateList, $type);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->cycleTimeAvg = $cycleTimeAvg;
|
||||
$this->view->throughput = $throughput;
|
||||
$this->display();
|
||||
@@ -1397,10 +1400,9 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function computeCFD($reload = 'no', $executionID = 0, $date = '')
|
||||
public function computeCFD($reload = 'no', $executionID = 0)
|
||||
{
|
||||
$date = date('Y-m-d', strtotime($date));
|
||||
$this->execution->computeCFD($executionID, $date);
|
||||
$this->execution->computeCFD($executionID);
|
||||
if($reload == 'yes') return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
|
||||
+95
-88
@@ -2,105 +2,112 @@ $(function()
|
||||
{
|
||||
$('[data-toggle=tooltip]').tooltip();
|
||||
|
||||
if(Object.keys(chartData).length || 1)
|
||||
var i = 0;
|
||||
var series = [];
|
||||
var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF'];
|
||||
//var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF'];
|
||||
|
||||
$.each(chartData['line'], function(label, set)
|
||||
{
|
||||
var i = 0;
|
||||
var series = [];
|
||||
var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF'];
|
||||
//var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF'];
|
||||
|
||||
$.each(chartData['line'], function(label, set)
|
||||
{
|
||||
series.push({
|
||||
name: label,
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
color: colors[i],
|
||||
areaStyle: {
|
||||
color: colors[i],
|
||||
opacity: 0.2
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: eval(set)
|
||||
})
|
||||
i ++;
|
||||
series.push({
|
||||
name: label,
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
color: colors[i],
|
||||
areaStyle: {
|
||||
color: colors[i],
|
||||
opacity: 0.2
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle:{
|
||||
width:1//设置线条粗细
|
||||
}
|
||||
}
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: eval(set)
|
||||
})
|
||||
i ++;
|
||||
})
|
||||
|
||||
var chartDom = document.getElementById('cfdChart');
|
||||
var CFD = echarts.init(chartDom);
|
||||
var option;
|
||||
var chartDom = document.getElementById('cfdChart');
|
||||
var CFD = echarts.init(chartDom);
|
||||
var option;
|
||||
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#6a7985'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: Object.keys(chartData['line'])
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#6a7985'
|
||||
}
|
||||
},
|
||||
textStyle: {
|
||||
fontWeight: 100
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: Object.keys(chartData['line']).reverse()
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: chartData['labels'],
|
||||
name: XUnit,
|
||||
axisLine:
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: chartData['labels'],
|
||||
name: XUnit,
|
||||
axisLine:
|
||||
show: true,
|
||||
lineStyle:
|
||||
{
|
||||
color: '#999',
|
||||
width:1
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
minInterval: 1,
|
||||
name: YUnit,
|
||||
nameTextStyle:
|
||||
{
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
axisPointer:
|
||||
{
|
||||
label:
|
||||
{
|
||||
show: true,
|
||||
lineStyle:
|
||||
{
|
||||
color: '#999',
|
||||
width:1
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [
|
||||
precision: 0
|
||||
},
|
||||
},
|
||||
axisLine:
|
||||
{
|
||||
type: 'value',
|
||||
minInterval: 1,
|
||||
name: YUnit,
|
||||
nameTextStyle:
|
||||
show: true,
|
||||
lineStyle:
|
||||
{
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
axisPointer:
|
||||
{
|
||||
label:
|
||||
{
|
||||
show: true,
|
||||
precision: 0
|
||||
},
|
||||
},
|
||||
axisLine:
|
||||
{
|
||||
show: true,
|
||||
lineStyle:
|
||||
{
|
||||
color: ['#999'],
|
||||
width: 1
|
||||
}
|
||||
color: ['#999'],
|
||||
width: 1
|
||||
}
|
||||
}
|
||||
],
|
||||
series: series,
|
||||
};
|
||||
}
|
||||
}
|
||||
],
|
||||
series: series,
|
||||
};
|
||||
|
||||
option && CFD.setOption(option);
|
||||
window.addEventListener('resize', CFD.resize);
|
||||
}
|
||||
option && CFD.setOption(option);
|
||||
window.addEventListener('resize', CFD.resize);
|
||||
|
||||
$('#type').change(function()
|
||||
{
|
||||
|
||||
@@ -3006,9 +3006,9 @@ class executionModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function computeCFD($executionID = 0, $date = '')
|
||||
public function computeCFD($executionID = 0)
|
||||
{
|
||||
$today = $date ? $date : helper::today();
|
||||
$today = helper::today();
|
||||
$executions = $this->dao->select('id, code')->from(TABLE_EXECUTION)
|
||||
->where('type')->eq('kanban')
|
||||
->andWhere('status')->notin('done,closed,suspended')
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<h2 class='text-center'><?php echo $executionName . ' - ' . zget($lang->execution->cfdTypeList, $type) . $lang->execution->CFD;?></h2>
|
||||
<?php if(isset($chartData['labels']) and count($chartData['labels']) != 1): ?>
|
||||
<div id="cfdWrapper">
|
||||
<div id="cfdChart" style="width: 1200px; height: 600px"></div>
|
||||
<div id="burnStatistics">
|
||||
@@ -42,5 +43,10 @@
|
||||
<h3><?php echo $throughput ? $throughput : $lang->noData;?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->execution->noPrintData;?></span></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user