* adjust for create job.
This commit is contained in:
@@ -272,7 +272,7 @@ class job extends control
|
||||
$this->view->title = $this->lang->job->runPipeline;
|
||||
$this->view->refList = $refList;
|
||||
$this->view->job = $job;
|
||||
$this->view->pipelineTips = $this->lang->job->pipeline->pipelineTips;
|
||||
$this->view->pipelineTips = $this->lang->job->pipelineTips;
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->job->jkJob = 'Jenkins Task';
|
||||
$lang->job->buildSpec = 'Build Target'; // 'pipeline@server'
|
||||
$lang->job->engine = 'Engine';
|
||||
$lang->job->server = 'Server';
|
||||
$lang->job->Pipeline = 'Pipeline';
|
||||
$lang->job->pipeline = 'Pipeline';
|
||||
$lang->job->buildType = 'Build Type';
|
||||
$lang->job->frame = 'Frame';
|
||||
$lang->job->triggerType = 'Trigger';
|
||||
@@ -81,9 +81,8 @@ $lang->job->engineTips = new stdclass;
|
||||
$lang->job->engineTips->success = 'Build engine will use the built pipeline in GitLab.';
|
||||
$lang->job->engineTips->error = 'No pipeline is currently available in the GitLab project, please go to GitLab configuration first. ';
|
||||
|
||||
$lang->job->pipeline = new stdclass;
|
||||
$lang->job->pipeline->pipelineTips = "Run for branch name or tag";
|
||||
$lang->job->pipeline->variables = "Variables";
|
||||
$lang->job->pipeline->variablesKeyPlaceHolder = "Input variable key";
|
||||
$lang->job->pipeline->variablesValuePlaceHolder = "Input variable value";
|
||||
$lang->job->pipeline->variablesTips = "Specify variable values to be used in this run. The values specified in CI/CD settings will be used by default.";
|
||||
$lang->job->pipelineTips = "Run for branch name or tag";
|
||||
$lang->job->pipelineVariables = "Variables";
|
||||
$lang->job->pipelineVariablesKeyPlaceHolder = "Input variable key";
|
||||
$lang->job->pipelineVariablesValuePlaceHolder = "Input variable value";
|
||||
$lang->job->pipelineVariablesTips = "Specify variable values to be used in this run. The values specified in CI/CD settings will be used by default.";
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->job->jkJob = 'Jenkins任务';
|
||||
$lang->job->buildSpec = '构建对象'; // 'pipeline@server'
|
||||
$lang->job->engine = '构建引擎';
|
||||
$lang->job->server = '服务器';
|
||||
$lang->job->Pipeline = '流水线';
|
||||
$lang->job->pipeline = '流水线';
|
||||
$lang->job->buildType = '构建类型';
|
||||
$lang->job->frame = '工具/框架';
|
||||
$lang->job->triggerType = '触发方式';
|
||||
@@ -81,9 +81,8 @@ $lang->job->engineTips = new stdclass;
|
||||
$lang->job->engineTips->success = '构建引擎将使用GitLab项目内置的流水线。';
|
||||
$lang->job->engineTips->error = '当前GitLab项目内没有可用的流水线,请先前往GitLab配置。';
|
||||
|
||||
$lang->job->pipeline = new stdclass;
|
||||
$lang->job->pipeline->pipelineTips = "选择要运行流水线的分支名或标签名";
|
||||
$lang->job->pipeline->variables = "变量";
|
||||
$lang->job->pipeline->variablesKeyPlaceHolder = "输入变量的名称";
|
||||
$lang->job->pipeline->variablesValuePlaceHolder = "输入变量的值";
|
||||
$lang->job->pipeline->variablesTips = "指定要在此次运行中使用的变量值。CI/CD设置中指定的值将用作默认值。";
|
||||
$lang->job->pipelineTips = "选择要运行流水线的分支名或标签名";
|
||||
$lang->job->pipelineVariables = "变量";
|
||||
$lang->job->pipelineVariablesKeyPlaceHolder = "输入变量的名称";
|
||||
$lang->job->pipelineVariablesValuePlaceHolder = "输入变量的值";
|
||||
$lang->job->pipelineVariablesTips = "指定要在此次运行中使用的变量值。CI/CD设置中指定的值将用作默认值。";
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->job->jkJob = 'Jenkins任務';
|
||||
$lang->job->buildSpec = '構建對象'; // 'pipeline@server'
|
||||
$lang->job->engine = '構建引擎';
|
||||
$lang->job->server = '伺服器';
|
||||
$lang->job->Pipeline = '流水綫';
|
||||
$lang->job->pipeline = '流水綫';
|
||||
$lang->job->buildType = '構建類型';
|
||||
$lang->job->frame = '工具/框架';
|
||||
$lang->job->triggerType = '觸發方式';
|
||||
@@ -81,9 +81,8 @@ $lang->job->engineTips = new stdclass;
|
||||
$lang->job->engineTips->success = '構建引擎將使用GitLab項目內置的流水綫。';
|
||||
$lang->job->engineTips->error = '當前GitLab項目內沒有可用的流水綫,請先前往GitLab配置。';
|
||||
|
||||
$lang->job->pipeline = new stdclass;
|
||||
$lang->job->pipeline->pipelineTips = "選擇要運行流水綫的分支名或標籤名";
|
||||
$lang->job->pipeline->variables = "變數";
|
||||
$lang->job->pipeline->variablesKeyPlaceHolder = "輸入變數的名稱";
|
||||
$lang->job->pipeline->variablesValuePlaceHolder = "輸入變數的值";
|
||||
$lang->job->pipeline->variablesTips = "指定要在此次運行中使用的變數值。CI/CD設置中指定的值將用作預設值。";
|
||||
$lang->job->pipelineTips = "選擇要運行流水綫的分支名或標籤名";
|
||||
$lang->job->pipelineVariables = "變數";
|
||||
$lang->job->pipelineVariablesKeyPlaceHolder = "輸入變數的名稱";
|
||||
$lang->job->pipelineVariablesValuePlaceHolder = "輸入變數的值";
|
||||
$lang->job->pipelineVariablesTips = "指定要在此次運行中使用的變數值。CI/CD設置中指定的值將用作預設值。";
|
||||
|
||||
@@ -122,8 +122,8 @@ class jobModel extends model
|
||||
|
||||
if($job->engine == 'jenkins')
|
||||
{
|
||||
$job->server = $job->jkServer;
|
||||
$job->pipeline = $job->jkTask;
|
||||
$job->server = zget($job, 'jkServer', '');
|
||||
$job->pipeline = zget($job, 'jkTask', '');
|
||||
}
|
||||
|
||||
if(strtolower($job->engine) == 'gitlab')
|
||||
@@ -177,7 +177,7 @@ class jobModel extends model
|
||||
->batchCheckIF(($this->post->repoType == 'Subversion' and $job->triggerType == 'tag'), "svnDir", 'notempty')
|
||||
->autoCheck()
|
||||
->exec();
|
||||
if(dao::isError()) return dao::getError();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$id = $this->dao->lastInsertId();
|
||||
if(strtolower($job->engine) == 'jenkins') $this->initJob($id, $job, $this->post->repoType);
|
||||
@@ -206,8 +206,8 @@ class jobModel extends model
|
||||
|
||||
if($job->engine == 'jenkins')
|
||||
{
|
||||
$job->server = $job->jkServer;
|
||||
$job->pipeline = $job->jkTask;
|
||||
$job->server = zget($job, 'jkServer', '');
|
||||
$job->pipeline = zget($job, 'jkTask', '');
|
||||
}
|
||||
|
||||
if(strtolower($job->engine) == 'gitlab')
|
||||
@@ -263,6 +263,7 @@ class jobModel extends model
|
||||
->autoCheck()
|
||||
->where('id')->eq($id)
|
||||
->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$this->initJob($id, $job, $this->post->repoType);
|
||||
return true;
|
||||
|
||||
@@ -86,12 +86,12 @@
|
||||
</tr>
|
||||
<tr id="jenkinsServerTR">
|
||||
<th><?php echo $lang->job->jkHost; ?></th>
|
||||
<td colspan='2'>
|
||||
<td colspan='2' class='required'>
|
||||
<div class='table-row'>
|
||||
<div class='table-col'><?php echo html::select('jkServer', $jenkinsServerList, '', "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('' => ''), '', "class='form-control chosen'"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,12 +104,12 @@
|
||||
<?php if($job->engine == 'jenkins'):?>
|
||||
<tr id="jenkinsServerTR">
|
||||
<th><?php echo $lang->job->server;?></th>
|
||||
<td colspan='2'>
|
||||
<td colspan='2' class='required'>
|
||||
<div class='table-row'>
|
||||
<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>
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<td class='required'><?php echo html::select("ref", $refList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->job->pipeline->variables; ?></td>
|
||||
<td><?php echo $lang->job->pipelineVariables; ?></td>
|
||||
</tr>
|
||||
<tr id='insertItemBox' class='row-module'>
|
||||
<td><?php echo html::input("keys[]", '', "class='form-control' placeholder='{$lang->job->pipeline->variablesKeyPlaceHolder}'");?></td>
|
||||
<td><?php echo html::input("values[]", '', "class='form-control' placeholder='{$lang->job->pipeline->variablesValuePlaceHolder}'");?></td>
|
||||
<td><?php echo html::input("keys[]", '', "class='form-control' placeholder='{$lang->job->pipelineVariablesKeyPlaceHolder}'");?></td>
|
||||
<td><?php echo html::input("values[]", '', "class='form-control' placeholder='{$lang->job->pipelineVariablesValuePlaceHolder}'");?></td>
|
||||
<td><button type="button" class="btn btn-link btn-icon btn-add" onclick="addVariable(this)"><i class="icon icon-plus"></i></button></td>
|
||||
<td><button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteVariable(this)"><i class="icon icon-close"></i></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->job->pipeline->variablesTips; ?></td>
|
||||
<td><?php echo $lang->job->pipelineVariablesTips; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -43,7 +43,7 @@ $lang->repo->line = '行';
|
||||
$lang->repo->expand = '點擊展開';
|
||||
$lang->repo->collapse = '點擊摺疊';
|
||||
|
||||
$lang->repo->id = '編號';
|
||||
$lang->repo->id = 'ID';
|
||||
$lang->repo->SCM = '類型';
|
||||
$lang->repo->name = '名稱';
|
||||
$lang->repo->path = '地址';
|
||||
|
||||
Reference in New Issue
Block a user