This commit is contained in:
wangyidong
2021-08-02 16:31:51 +08:00
6 changed files with 10 additions and 8 deletions
+5 -3
View File
@@ -125,9 +125,11 @@ class ciModel extends model
*/
public function syncGitlabTaskStatus($compile)
{
$this->loadModel('gitlab');
$now = helper::now();
$pipeline = $this->loadModel('gitlab')->apiGetSinglePipeline($compile->server, $compile->pipeline, $compile->queue);
$jobs = $this->loadModel('gitlab')->apiGetJobs($compile->server, $compile->pipeline, $compile->queue);
$pipeline = $this->apiGetSinglePipeline($compile->server, $compile->pipeline, $compile->queue);
$jobs = $this->apiGetJobs($compile->server, $compile->pipeline, $compile->queue);
$data = new stdclass;
$data->status = $pipeline->status;
@@ -136,7 +138,7 @@ class ciModel extends model
foreach($jobs as $job)
{
if(empty($job->duration) or $job->duration == '') $job->duration = '-';
$data->logs = "<font style='font-weight:bold'>&gt;&gt;&gt; Job: $job->name, Stage: $job->stage, Status: $job->status, Duration: $job->duration Sec\r\n </font>";
$data->logs = "<font style='font-weight:bold'>&gt;&gt;&gt; Job: $job->name, Stage: $job->stage, Status: $job->status, Duration: $job->duration Sec\r\n </font>";
$data->logs .= "Job URL: <a href=\"$job->web_url\" target='_blank'>$job->web_url</a> \r\n";
$data->logs .= $this->transformAnsiToHtml($this->loadModel('gitlab')->apiGetJobLog($compile->server, $compile->pipeline, $job->id));
}
+1 -1
View File
@@ -47,7 +47,7 @@
<th></th>
<td class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php echo html::backButton(); ?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
</tr>
</table>
+1 -1
View File
@@ -47,7 +47,7 @@
<th></th>
<td class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php echo html::backButton() ?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
</tr>
</table>
+1 -1
View File
@@ -109,7 +109,7 @@
<div class='table-col'><?php echo html::select('jkServer', $jenkinsServerList, $job->server, "class='form-control chosen'");?></div>
<div class='table-col'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->job->pipeline; ?></span>
<span class='input-group-addon'><?php echo $lang->job->Pipeline; ?></span>
<?php echo html::select('jkTask', array('' => ''), $job->pipeline, "class='form-control chosen'");?>
</div>
</div>
+1 -1
View File
@@ -101,7 +101,7 @@
<th></th>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton(); ?>
<?php echo html::backButton(); ?>
<?php if(!isonlybody()) echo html::a(inlink('maintain', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
</tr>
</table>
+1 -1
View File
@@ -93,7 +93,7 @@
<tr>
<td colspan='4' class='text-center'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php if(!isonlybody()) echo html::a(inlink('browse', ""), $lang->goback, '', 'class="btn btn-wide"');?>
</td>
</tr>
</tbody>