Merge branch 'sprint/master_zhouxudong_60389'
This commit is contained in:
@@ -1364,10 +1364,13 @@ class execution extends control
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $type
|
||||
* @param string $withWeekend
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function cfd($executionID = 0, $type = 'story', $withWeekend = 'false')
|
||||
public function cfd($executionID = 0, $type = 'story', $withWeekend = 'false', $begin = '', $end = '')
|
||||
{
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
@@ -1375,7 +1378,29 @@ class execution extends control
|
||||
$this->loadModel('kanban');
|
||||
$this->app->loadClass('date');
|
||||
|
||||
list($begin, $end) = $this->execution->getBeginEnd4CFD($execution);
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$begin = htmlspecialchars($this->post->begin, ENT_QUOTES);
|
||||
$end = htmlspecialchars($this->post->end, ENT_QUOTES);
|
||||
|
||||
if(empty($begin)) return $this->sendError(sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->begin));
|
||||
if(empty($end)) return $this->sendError(sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->end));
|
||||
if($begin >= $end) return $this->sendError($this->lang->execution->charts->cfd->errorBegin);
|
||||
if(date("Y-m-d", strtotime("-3 months", strtotime($end))) > $begin) return $this->sendError($this->lang->execution->charts->cfd->errorDateRange);
|
||||
|
||||
$this->execution->computeCFD($executionID);
|
||||
return print(js::locate($this->createLink('execution', 'cfd', "executionID=$executionID&type=$type&withWeekend=$withWeekend&begin=" . helper::safe64Encode(urlencode($begin)) . "&end=" . helper::safe64Encode(urlencode($end))), 'parent'));
|
||||
}
|
||||
|
||||
if($begin and $end)
|
||||
{
|
||||
$begin = urldecode(helper::safe64Decode($begin));
|
||||
$end = urldecode(helper::safe64Decode($end));
|
||||
}
|
||||
else
|
||||
{
|
||||
list($begin, $end) = $this->execution->getBeginEnd4CFD($execution);
|
||||
}
|
||||
$dateList = date::getDateList($begin, $end, 'Y-m-d', $withWeekend == 'false'? 'noweekend' : '');
|
||||
|
||||
//list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type);
|
||||
@@ -1390,6 +1415,8 @@ class execution extends control
|
||||
$this->view->executionName = $execution->name;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = $end;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,3 +31,7 @@
|
||||
#burnStatistics .bg-primary {margin-right: 5px;}
|
||||
#burnStatistics .icon-help {color: black;}
|
||||
#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;}
|
||||
|
||||
#cfdDateSelect {float: left;}
|
||||
#cfdDateSelect .input-group {width: 300px; float: left;}
|
||||
#datePreview {float: left; margin-left: 10px;}
|
||||
|
||||
@@ -132,6 +132,11 @@ $(function()
|
||||
{
|
||||
var type = $('#type').val();
|
||||
withWeekend = withWeekend == 'true' ? 'false' : 'true';
|
||||
location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + type + '&withWeekend=' + withWeekend);
|
||||
var begin = Base64.encode(encodeURIComponent($('#begin').val()));
|
||||
var end = Base64.encode(encodeURIComponent($('#end').val()));
|
||||
location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + type + '&withWeekend=' + withWeekend + '&begin=' + begin + '&end=' + end);
|
||||
});
|
||||
|
||||
$("#end, #begin").datetimepicker('setEndDate', today)
|
||||
$('.datetimepicker-days table tfoot tr th').html(dateRangeTip).removeClass('today');
|
||||
});
|
||||
|
||||
@@ -437,6 +437,12 @@ $lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->charts->cfd->begin = 'Begin';
|
||||
$lang->execution->charts->cfd->end = 'End';
|
||||
$lang->execution->charts->cfd->errorBegin = 'The start time cannot be greater than the end time.';
|
||||
$lang->execution->charts->cfd->errorDateRange = 'The Cumulative Flow Diagram(CFD) only provides data display within 3 months.';
|
||||
$lang->execution->charts->cfd->dateRangeTip = 'CFD only shows the data within 3 months';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = 'Abkurzung des Projektnamens';
|
||||
$lang->execution->placeholder->totalLeft = 'Schätzungen zu Beginn des Projekts.';
|
||||
|
||||
@@ -437,6 +437,12 @@ $lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->charts->cfd->begin = 'Begin';
|
||||
$lang->execution->charts->cfd->end = 'End';
|
||||
$lang->execution->charts->cfd->errorBegin = 'The start time cannot be greater than the end time.';
|
||||
$lang->execution->charts->cfd->errorDateRange = 'The Cumulative Flow Diagram(CFD) only provides data display within 3 months.';
|
||||
$lang->execution->charts->cfd->dateRangeTip = 'CFD only shows the data within 3 months';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = "Abbreviation of {$lang->executionCommon} name";
|
||||
$lang->execution->placeholder->totalLeft = "Hours estimated on the first day of the {$lang->executionCommon}.";
|
||||
|
||||
@@ -440,6 +440,12 @@ $lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->charts->cfd->begin = 'Begin';
|
||||
$lang->execution->charts->cfd->end = 'End';
|
||||
$lang->execution->charts->cfd->errorBegin = 'The start time cannot be greater than the end time.';
|
||||
$lang->execution->charts->cfd->errorDateRange = 'The Cumulative Flow Diagram(CFD) only provides data display within 3 months.';
|
||||
$lang->execution->charts->cfd->dateRangeTip = 'CFD only shows the data within 3 months';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = "Abréviation du nom du {$lang->executionCommon}";
|
||||
$lang->execution->placeholder->totalLeft = "Heures estimées le premier jour du {$lang->executionCommon}.";
|
||||
|
||||
@@ -437,6 +437,12 @@ $lang->execution->charts->cfd->cycleTimeTip = '平均每个卡片从开发启
|
||||
$lang->execution->charts->cfd->throughput = '吞吐率';
|
||||
$lang->execution->charts->cfd->throughputTip = '吞吐率 = 在制品 / 平均周期时间';
|
||||
|
||||
$lang->execution->charts->cfd->begin = '开始日期';
|
||||
$lang->execution->charts->cfd->end = '结束日期';
|
||||
$lang->execution->charts->cfd->errorBegin = '开始日期应小于结束日期';
|
||||
$lang->execution->charts->cfd->errorDateRange = '累积流图只提供3个月内的数据展示';
|
||||
$lang->execution->charts->cfd->dateRangeTip = '累积流图只展示3个月内的数据';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = '团队内部的简称';
|
||||
$lang->execution->placeholder->totalLeft = "{$lang->executionCommon}开始时的总预计工时";
|
||||
|
||||
@@ -13,11 +13,14 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::import($jsRoot . 'echarts/echarts.common.min.js'); ?>
|
||||
<?php js::import($jsRoot . 'html2canvas/min.js'); ?>
|
||||
<?php js::import($jsRoot . 'misc/base64.js');?>
|
||||
<?php js::set('executionID', $executionID); ?>
|
||||
<?php js::set('withWeekend', $withWeekend); ?>
|
||||
<?php js::set('chartData', $chartData); ?>
|
||||
<?php js::set('YUnit', $lang->execution->count); ?>
|
||||
<?php js::set('XUnit', $lang->execution->burnXUnit); ?>
|
||||
<?php js::set('dateRangeTip', $lang->execution->charts->cfd->dateRangeTip); ?>
|
||||
<?php js::set('today', date(DT_DATE1)); ?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
@@ -32,6 +35,16 @@
|
||||
<div class='input-control w-100px'>
|
||||
<?php echo html::select('type', $lang->execution->cfdTypeList, $type, "class='form-control chosen'");?>
|
||||
</div>
|
||||
<div id="cfdDateSelect">
|
||||
<form method='post' target='hiddenwin' class='not-watch'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $begin, "class='form-control form-date' onchange='$(\"#datePreview\").removeClass(\"hidden\")' placeholder='" . $lang->execution->charts->cfd->begin . "'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
|
||||
<?php echo html::input('end', $end, "class='form-control form-date' onchange='$(\"#datePreview\").removeClass(\"hidden\")' placeholder='" . $lang->execution->charts->cfd->end . "'");?>
|
||||
</div>
|
||||
<?php echo html::commonButton($lang->preview, "onclick='$(this).closest(\"form\").submit()' id='datePreview'", 'btn btn-primary hidden');?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<small class="file-size muted"></small>
|
||||
</div>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-link file-input-rename fileAction"><?php echo $lang->file->edit;?></button>
|
||||
<button type="button" class="btn btn-link file-input-delete fileAction"><?php echo $lang->delete;?></button>
|
||||
<button type="button" class="fileAction btn btn-link file-input-rename"><?php echo $lang->file->edit;?></button>
|
||||
<button type="button" class="fileAction btn btn-link file-input-delete"><?php echo $lang->delete;?></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" name="<?php echo $filesName;?>[]" onchange="checkDangerExtension(this)" />
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<style>
|
||||
.files-list>li>a {display: inline; word-wrap: break-word;}
|
||||
.files-list>li>.right-icon {opacity: 1;}
|
||||
.files-list>li>.right-icon>a {padding-left: 7px;}
|
||||
html[lang|="zh"] .files-list>li>.right-icon>a {padding-left: 3px;}
|
||||
.fileAction {color: #0c64eb !important;}
|
||||
</style>
|
||||
<script>
|
||||
/* Delete a file. */
|
||||
@@ -93,8 +92,8 @@
|
||||
if(common::hasPriv($objectType, 'edit', $object))
|
||||
{
|
||||
echo "<span class='right-icon'> ";
|
||||
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='edit iframe text-primary' title='{$lang->file->edit}'");
|
||||
if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='text-primary' onclick='deleteFile($file->id)' title='$lang->delete'");
|
||||
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'");
|
||||
if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'");
|
||||
echo '</span>';
|
||||
}
|
||||
echo '</li>';
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
/* For the open source version of the file judgment. */
|
||||
if(stripos('txt|jpg|jpeg|gif|png|bmp', $file->extension) !== false)
|
||||
{
|
||||
echo html::a($downloadLink, $lang->file->preview, '_blank', "class='btn btn-link text-primary fileAction' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
|
||||
echo html::a($downloadLink, $lang->file->preview, '_blank', "class='fileAction btn btn-link text-primary' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
|
||||
}
|
||||
|
||||
/* For the max version of the file judgment. */
|
||||
@@ -115,13 +115,13 @@
|
||||
$officeTypes = 'doc|docx|xls|xlsx|ppt|pptx|pdf';
|
||||
if(stripos($officeTypes, $file->extension) !== false)
|
||||
{
|
||||
echo html::a($downloadLink, $lang->file->preview, '_blank', "class='btn btn-link text-primary fileAction' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
|
||||
echo html::a($downloadLink, $lang->file->preview, '_blank', "class='fileAction btn btn-link text-primary' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
|
||||
}
|
||||
}
|
||||
|
||||
common::printLink('file', 'download', "fileID=$file->id", $lang->file->downloadFile, '_blank', "class='btn btn-link text-primary fileAction' title='{$lang->file->downloadFile}'");
|
||||
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='btn btn-link edit iframe text-primary fileAction' title='{$lang->file->edit}'");
|
||||
if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='btn btn-link text-primary fileAction' onclick='deleteFile($file->id)' title='$lang->delete'");
|
||||
common::printLink('file', 'download', "fileID=$file->id", $lang->file->downloadFile, '_blank', "class='fileAction btn btn-link text-primary' title='{$lang->file->downloadFile}'");
|
||||
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'");
|
||||
if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'");
|
||||
echo '</span>';
|
||||
}
|
||||
echo '</li>';
|
||||
|
||||
@@ -118,7 +118,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<tr>
|
||||
<td class='text-left c-id'><?php echo $i;?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
|
||||
@@ -56,7 +56,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->module;?></th>
|
||||
<td id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $task->module, "class='form-control chosen'");?></td>
|
||||
<td id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $task->module, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'");?></td>
|
||||
<td>
|
||||
<div class="checkbox-primary c-modulel">
|
||||
<input type="checkbox" id="showAllModule" <?php if($showAllModule) echo 'checked';?>><label for="showAllModule" class="no-margin"><?php echo $lang->task->allModule;?></label>
|
||||
|
||||
Reference in New Issue
Block a user