From cec55d0345751f011fb3179d3c168239608bf1bb Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 3 Mar 2020 08:55:01 +0800 Subject: [PATCH] * finish task #6929. --- module/compile/lang/zh-cn.php | 2 +- module/compile/model.php | 2 +- module/compile/view/browse.html.php | 27 ++++++++++++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/module/compile/lang/zh-cn.php b/module/compile/lang/zh-cn.php index 2766e54c60..477551f52b 100644 --- a/module/compile/lang/zh-cn.php +++ b/module/compile/lang/zh-cn.php @@ -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 = '构建时间'; diff --git a/module/compile/model.php b/module/compile/model.php index e2f85b96f3..3d89c53d1c 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -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') diff --git a/module/compile/view/browse.html.php b/module/compile/view/browse.html.php index b7054265ff..c2eac067cd 100644 --- a/module/compile/view/browse.html.php +++ b/module/compile/view/browse.html.php @@ -29,8 +29,8 @@ compile->id);?> compile->name);?> integration->repo;?> - integration->jkHost;?> - integration->triggerType;?> + integration->jenkins;?> + integration->triggerType;?> compile->status);?> compile->time);?> actions;?> @@ -42,9 +42,26 @@ name;?> repoName;?> - jenkinsName;?> - integration->triggerTypeList, $build->triggerType);?> - + jkJob) . "@{$build->jenkinsName}";?> + 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})"; + } + ?> + compile->statusList, $build->status);?> createdDate;?>