From cd1a40b066a7d2f7aa84a0dd3346b37c190213e5 Mon Sep 17 00:00:00 2001 From: Guan Xiying Date: Mon, 6 Sep 2021 17:45:08 +0800 Subject: [PATCH] * Fix job object name in browse page. --- module/job/lang/zh-cn.php | 2 +- module/job/view/browse.html.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/module/job/lang/zh-cn.php b/module/job/lang/zh-cn.php index 12681b5324..d95c034f77 100644 --- a/module/job/lang/zh-cn.php +++ b/module/job/lang/zh-cn.php @@ -86,4 +86,4 @@ $lang->job->pipelineVariables = "变量"; $lang->job->pipelineVariablesKeyPlaceHolder = "输入变量的名称"; $lang->job->pipelineVariablesValuePlaceHolder = "输入变量的值"; $lang->job->pipelineVariablesTips = "指定要在此次运行中使用的变量值。CI/CD设置中指定的值将用作默认值。"; -$lang->job->setReferenceTips = "在执行构建前,请先设置构建的 Reference."; +$lang->job->setReferenceTips = "在执行构建前,请先设置代码库的分支信息。"; diff --git a/module/job/view/browse.html.php b/module/job/view/browse.html.php index 177cb7a320..4fc37ec44e 100644 --- a/module/job/view/browse.html.php +++ b/module/job/view/browse.html.php @@ -50,13 +50,20 @@ $job):?> +I engine) == 'gitlab') + { + $pipeline = json_decode($job->pipeline); + if(is_numeric($job->pipeline)) $job->pipeline = $this->loadModel('gitlab')->getProjectName($job->server, $job->pipeline); + if(isset($pipeline->reference)) $job->pipeline = $this->loadModel('gitlab')->getProjectName($job->server, $pipeline->project); + } + ?> createLink('job', 'view', "jobID={$job->id}", 'html', true), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?> repoName;?> job->engineList, $job->engine);?> job->frameList, $job->frame);?> - engine) == 'gitlab') $job->pipeline = $this->loadModel('gitlab')->getProjectName($job->server, $job->pipeline);?> pipeline) . '@' . $job->jenkinsName;?> job->getTriggerConfig($job);?>