* [bug#56295] adjust compile page data.

This commit is contained in:
caoyanyi
2024-10-18 13:29:54 +08:00
committed by 田淑杰
parent 2434cd67aa
commit c1a0a7ec2b
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -43,11 +43,11 @@ class compile extends control
public function browse(int $repoID = 0, int $jobID = 0, string $browseType = '', int $param = 0, string $orderBy = 'createdDate_desc', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1)
{
$this->loadModel('ci');
$this->app->loadLang('job');
$this->loadModel('job');
if($jobID)
{
$job = $this->loadModel('job')->getById($jobID);
$job = $this->job->getByID($jobID);
$repoID = $job->repo;
$this->view->job = $job;
@@ -70,7 +70,7 @@ class compile extends control
$this->compileZen->buildSearchForm($repoID, $jobID, (int)$param);
$buildList = $this->compile->getList($repoID, $jobID, $browseType, (int)$param, $orderBy, $pager);
foreach($buildList as $build) $build->triggerType = $this->loadModel('job')->getTriggerConfig($build);
foreach($buildList as $build) $build->triggerType = $this->job->getTriggerConfig($build);
$this->view->title = $this->lang->ci->job . $this->lang->hyphen . $this->lang->compile->browse;
$this->view->repoID = $repoID;
+1 -1
View File
@@ -61,7 +61,7 @@ class compileModel extends model
$this->session->set('compileOnlyCondition', true, $this->app->tab);
}
return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate, t1.testtask, t2.pipeline, t2.triggerType, t2.comment, t2.atDay, t2.atTime, t2.engine, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate, t1.testtask, t2.pipeline, t2.triggerType, t2.svnDir, t2.comment, t2.atDay, t2.atTime, t2.engine, t2.triggerActions, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id')
->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id')
->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id')