* finish task #6921.

This commit is contained in:
wangyidong
2020-03-02 16:53:12 +08:00
parent 05a34ff5f1
commit 7c77155ced
5 changed files with 31 additions and 13 deletions
-1
View File
@@ -1,6 +1,5 @@
<?php
$lang->ci->common = 'CI';
$lang->ci->at = ' at ';
$lang->ci->integration = 'Integration';
$lang->ci->plan = 'Plan';
-1
View File
@@ -1,6 +1,5 @@
<?php
$lang->ci->common = '持续集成';
$lang->ci->at = '于';
$lang->ci->integration = '构建';
$lang->ci->plan = '构建计划';
+5 -1
View File
@@ -13,15 +13,19 @@ $lang->integration->id = 'ID';
$lang->integration->name = 'Name';
$lang->integration->repo = 'Repo';
$lang->integration->svnDir = 'SVN Tag Watch Path';
$lang->integration->jenkins = 'Jenkins';
$lang->integration->jkHost = 'Jenkins Server';
$lang->integration->buildType = 'Build Type';
$lang->integration->jkJob = 'Jenkins Task';
$lang->integration->triggerType = 'Trigger';
$lang->integration->atDay = 'Custom Days';
$lang->integration->atTime = 'At Time';
$lang->integration->lastStatus = 'Last Status';
$lang->integration->lastExec = 'Last Executed';
$lang->integration->comment = 'Match Keywords';
$lang->integration->example = 'e.g.';
$lang->integration->commitEx = '%build% %integration% %id%15, to build Jenkins job that id is 15.';
$lang->integration->commitEx = "Used to match the keywords used to create a compile. Multiple keywords are separated by ','";
$lang->integration->cronSample = 'e.g. 0 0 2 * * 2-6/1 means 2:00 a.m. every weekday.';
$lang->integration->sendExec = 'Send execute request success.';
+3 -1
View File
@@ -13,13 +13,15 @@ $lang->integration->id = 'ID';
$lang->integration->name = '名称';
$lang->integration->repo = '代码库';
$lang->integration->svnDir = 'SVN Tag监控路径';
$lang->integration->jenkins = 'Jenkins';
$lang->integration->jkHost = 'Jenkins服务';
$lang->integration->buildType = '构建类型';
$lang->integration->jkJob = 'Jenkins任务名';
$lang->integration->triggerType = '触发方式';
$lang->integration->atDay = '自定义日期';
$lang->integration->atTime = '执行时间';
$lang->integration->lastExec = '最后执行';
$lang->integration->lastStatus = '最后执行状态';
$lang->integration->lastExec = '最后执行时间';
$lang->integration->comment = '匹配关键字';
$lang->integration->example = '举例';
+23 -9
View File
@@ -27,12 +27,12 @@
<tr class='text-center'>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->integration->id);?></th>
<th class='w-200px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->integration->name);?></th>
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->integration->name);?></th>
<th class='w-200px text-left'><?php common::printOrderLink('repo', $orderBy, $vars, $lang->integration->repo);?></th>
<th class='w-150px text-left'><?php echo $lang->integration->triggerType;?></th>
<th class='w-200px text-left'><?php common::printOrderLink('jkHost', $orderBy, $vars, $lang->integration->jkHost);?></th>
<th class='w-200px text-left'><?php echo $lang->integration->jkJob;?></th>
<th class='text-left'><?php echo $lang->integration->lastExec;?></th>
<th class='w-200px text-left'><?php echo $lang->integration->triggerType;?></th>
<th class='w-300px text-left'><?php common::printOrderLink('jkHost', $orderBy, $vars, $lang->integration->jenkins);?></th>
<th class='w-100px text-left'><?php common::printOrderLink('lastStatus', $orderBy, $vars, $lang->integration->lastStatus);?></th>
<th class='w-120px text-left'><?php common::printOrderLink('lastExec', $orderBy, $vars, $lang->integration->lastExec);?></th>
<th class='w-120px c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
@@ -45,11 +45,25 @@
<?php
$triggerType = zget($lang->integration->triggerTypeList, $job->triggerType);
if($job->triggerType == 'tag' and !empty($job->svnDir)) $triggerType = $lang->integration->dirChange;
$triggerConfig = '';
if($job->triggerType == 'commit')
{
$triggerConfig = "({$job->comment})";
}
elseif($job->triggerType == 'schedule')
{
$atDay = '';
foreach(explode(',', $job->atDay) as $day) $atDay .= zget($lang->datepicker->dayNames, trim($day), '') . ',';
$atDay = trim($atDay, ',');
$triggerConfig = "({$atDay}, {$job->atTime})";
}
?>
<td class='text' title='<?php echo $triggerType;?>'><?php echo $triggerType;?></td>
<td class='text' title='<?php echo $job->jenkinsName; ?>'><?php echo $job->jenkinsName; ?></td>
<td class='text' title='<?php echo $job->jkJob; ?>'><?php echo urldecode($job->jkJob);?></td>
<td class='text'><?php if($job->lastStatus) echo zget($lang->compile->statusList, $job->lastStatus) . $lang->ci->at . $job->lastExec;?></td>
<td class='text' title='<?php echo $triggerType . $triggerConfig;?>'><?php echo $triggerType . $triggerConfig;?></td>
<td class='text' title='<?php echo $job->jenkinsName; ?>'><?php echo urldecode($job->jkJob) . '@' . $job->jenkinsName; ?></td>
<td class='text'><?php if($job->lastStatus) echo zget($lang->compile->statusList, $job->lastStatus);?></td>
<td class='text'><?php if($job->lastStatus) echo $job->lastExec;?></td>
<td class='c-actions text-center'>
<?php
common::printIcon('compile', 'browse', "integrationID=$id", '', 'list', 'file-text');