* finish task #6929.

This commit is contained in:
wangyidong
2020-03-03 08:55:01 +08:00
parent 68896b27b9
commit cec55d0345
3 changed files with 24 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ $lang->compile->browse = '构建历史';
$lang->compile->logs = '构建日志';
$lang->compile->id = 'ID';
$lang->compile->name = '名称';
$lang->compile->name = '构建名称';
$lang->compile->status = '构建状态';
$lang->compile->time = '构建时间';
+1 -1
View File
@@ -22,7 +22,7 @@ class compileModel extends model
*/
public function getList($integrationID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.id, t1.name, t1.status, t1.createdDate, t2.triggerType, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
return $this->dao->select('t1.id, t1.name, t1.status, t1.createdDate, t2.jkJob,t2.triggerType,t2.comment,t2.atDay,t2.atTime, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
->leftJoin(TABLE_INTEGRATION)->alias('t2')->on('t1.integration=t2.id')
->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id')
->leftJoin(TABLE_JENKINS)->alias('t4')->on('t2.jkHost=t4.id')
+22 -5
View File
@@ -29,8 +29,8 @@
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->compile->id);?></th>
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->compile->name);?></th>
<th class='text-left'><?php echo $lang->integration->repo;?></th>
<th class='w-200px text-left'><?php echo $lang->integration->jkHost;?></th>
<th class='w-140px text-left'><?php echo $lang->integration->triggerType;?></th>
<th class='w-250px text-left'><?php echo $lang->integration->jenkins;?></th>
<th class='w-200px text-left'><?php echo $lang->integration->triggerType;?></th>
<th class='w-80px text-left'><?php common::printOrderLink('status', $orderBy, $vars, $lang->compile->status);?></th>
<th class='w-130px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->compile->time);?></th>
<th class='c-actions-1'><?php echo $lang->actions;?></th>
@@ -42,9 +42,26 @@
<td class='text-center'><?php echo $id;?></td>
<td class='text' title='<?php echo $build->name;?>'><?php echo $build->name;?></td>
<td class='text' title='<?php echo $build->repoName;?>'><?php echo $build->repoName;?></td>
<td class='text' title='<?php echo $build->jenkinsName;?>'><?php echo $build->jenkinsName;?></td>
<?php $triggerType = zget($lang->integration->triggerTypeList, $build->triggerType);?>
<td class='text' title='<?php echo $triggerType;?>'><?php echo $triggerType;?></td>
<td class='text' title='<?php echo $build->jenkinsName;?>'><?php echo urldecode($build->jkJob) . "@{$build->jenkinsName}";?></td>
<?php
$triggerType = zget($lang->integration->triggerTypeList, $build->triggerType);
if($build->triggerType == 'tag' and !empty($build->svnDir)) $triggerType = $lang->integration->dirChange;
$triggerConfig = '';
if($build->triggerType == 'commit')
{
$triggerConfig = "({$build->comment})";
}
elseif($build->triggerType == 'schedule')
{
$atDay = '';
foreach(explode(',', $build->atDay) as $day) $atDay .= zget($lang->datepicker->dayNames, trim($day), '') . ',';
$atDay = trim($atDay, ',');
$triggerConfig = "({$atDay}, {$build->atTime})";
}
?>
<td class='text' title='<?php echo $triggerType . $triggerConfig;?>'><?php echo $triggerType . $triggerConfig;?></td>
<?php $buildStatus = zget($lang->compile->statusList, $build->status);?>
<td class='text' title='<?php echo $buildStatus;?>'><?php echo $buildStatus;?></td>
<td class='text' title='<?php echo $build->createdDate;?>'><?php echo $build->createdDate;?></td>