From f0bb1eb52ba3aa88d99eff2b6da096aeb880b6bf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 21 Jul 2021 08:26:59 +0800 Subject: [PATCH 1/6] * adjust for changelog. --- doc/CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index d702101a98..2bd53acec8 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,4 +1,5 @@ 2021-07-20 15.2 +完成的需求 27297 调整产品下拉菜单信息展现方式 27298 调整执行下拉菜单信息展现方式 27300 调整测试中产品下拉菜单信息展现方式 From fa763bc55028a933a29eaaed7d3710ecbf436f43 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 21 Jul 2021 09:43:32 +0800 Subject: [PATCH 2/6] * Fix bug #13742. --- module/my/view/bug.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index 0a2a9d6fe1..b7e63e9fee 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -104,7 +104,8 @@ pri?>' title='bug->priList, $bug->pri);?>'>bug->priList, $bug->pri)?> createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color' title={$bug->title}");?> - createLink('product', explode('-', $config->productLink)[1], "productID=$bug->product"), $bug->productName, null, "title={$bug->productName}");?> + productLink == 'product-all' ? '' : "productID=$bug->product";?> + createLink('product', explode('-', $config->productLink)[1], $param), $bug->productName, null, "title={$bug->productName}");?> bug->typeList, $bug->type, '');?> openedBy);?> From 7c0ee909ec182c69f7619679cc7d267d1945e6ff Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 21 Jul 2021 11:38:10 +0800 Subject: [PATCH 3/6] * Fix bug #13744. --- module/execution/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index b5a72a88ca..5f50f66ce3 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2985,7 +2985,7 @@ class execution extends control $this->loadModel('project'); $project = $this->project->getByID($this->session->project); - if($project->model == 'waterfall') $this->lang->executionCommon = $this->lang->project->stage; + if(!empty($project->model) and $project->model == 'waterfall') $this->lang->executionCommon = $this->lang->project->stage; $this->view->fileName = (in_array($status, array('all', 'undone')) ? $this->lang->execution->$status : $this->lang->execution->statusList[$status]) . $this->lang->executionCommon; From 7781d1d5fdb9217355f5dcfac78b8f563399f1b5 Mon Sep 17 00:00:00 2001 From: zenggang Date: Wed, 21 Jul 2021 11:44:13 +0800 Subject: [PATCH 4/6] * Finish bug #13740 --- module/story/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/story/model.php b/module/story/model.php index 7b3de9a339..7b67c5ea1f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1846,6 +1846,7 @@ class storyModel extends model $story->assignedTo = $assignedTo; $story->assignedDate = $now; + $this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec(); if(!dao::isError()) { $this->loadModel('gitlab'); From bbee699fe87367742d8768a1a99485694ee83a40 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 21 Jul 2021 12:12:41 +0800 Subject: [PATCH 5/6] * Fix bug #13743. --- module/stakeholder/lang/de.php | 1 + module/stakeholder/lang/en.php | 1 + module/stakeholder/lang/fr.php | 1 + module/stakeholder/lang/vi.php | 1 + module/stakeholder/lang/zh-cn.php | 1 + module/stakeholder/model.php | 2 -- module/stakeholder/view/view.html.php | 3 +++ 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/stakeholder/lang/de.php b/module/stakeholder/lang/de.php index 020050a311..a59ba2f632 100644 --- a/module/stakeholder/lang/de.php +++ b/module/stakeholder/lang/de.php @@ -25,6 +25,7 @@ $lang->stakeholder->viewExpect = 'Expectation Info'; $lang->stakeholder->issue = 'Issue Management'; $lang->stakeholder->viewIssue = 'Active Issues'; $lang->stakeholder->userIssue = 'Stakeholder Issues'; +$lang->stakeholder->deleted = 'Deleted'; /* Fields. */ $lang->stakeholder->id = 'ID'; diff --git a/module/stakeholder/lang/en.php b/module/stakeholder/lang/en.php index 7824102a67..ebe2002d9f 100644 --- a/module/stakeholder/lang/en.php +++ b/module/stakeholder/lang/en.php @@ -25,6 +25,7 @@ $lang->stakeholder->viewExpect = 'Expectation Info'; $lang->stakeholder->issue = 'Issue Management'; $lang->stakeholder->viewIssue = 'Active Issues'; $lang->stakeholder->userIssue = 'Stakeholder Issues'; +$lang->stakeholder->deleted = 'Deleted'; $lang->stakeholder->viewAction = 'View Stakeholder'; $lang->stakeholder->viewIssueAction = 'Issue List'; diff --git a/module/stakeholder/lang/fr.php b/module/stakeholder/lang/fr.php index 020050a311..a59ba2f632 100644 --- a/module/stakeholder/lang/fr.php +++ b/module/stakeholder/lang/fr.php @@ -25,6 +25,7 @@ $lang->stakeholder->viewExpect = 'Expectation Info'; $lang->stakeholder->issue = 'Issue Management'; $lang->stakeholder->viewIssue = 'Active Issues'; $lang->stakeholder->userIssue = 'Stakeholder Issues'; +$lang->stakeholder->deleted = 'Deleted'; /* Fields. */ $lang->stakeholder->id = 'ID'; diff --git a/module/stakeholder/lang/vi.php b/module/stakeholder/lang/vi.php index 020050a311..a59ba2f632 100644 --- a/module/stakeholder/lang/vi.php +++ b/module/stakeholder/lang/vi.php @@ -25,6 +25,7 @@ $lang->stakeholder->viewExpect = 'Expectation Info'; $lang->stakeholder->issue = 'Issue Management'; $lang->stakeholder->viewIssue = 'Active Issues'; $lang->stakeholder->userIssue = 'Stakeholder Issues'; +$lang->stakeholder->deleted = 'Deleted'; /* Fields. */ $lang->stakeholder->id = 'ID'; diff --git a/module/stakeholder/lang/zh-cn.php b/module/stakeholder/lang/zh-cn.php index 7c2dd53148..e59da0129a 100644 --- a/module/stakeholder/lang/zh-cn.php +++ b/module/stakeholder/lang/zh-cn.php @@ -25,6 +25,7 @@ $lang->stakeholder->viewExpect = '期望信息'; $lang->stakeholder->issue = '问题管理'; $lang->stakeholder->viewIssue = '活动问题列表'; $lang->stakeholder->userIssue = '干系人问题列表'; +$lang->stakeholder->deleted = '已删除'; $lang->stakeholder->viewAction = '干系人详情'; $lang->stakeholder->viewIssueAction = '问题列表'; diff --git a/module/stakeholder/model.php b/module/stakeholder/model.php index afdd39b99b..95f3834aa5 100644 --- a/module/stakeholder/model.php +++ b/module/stakeholder/model.php @@ -382,8 +382,6 @@ class stakeholderModel extends model ->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account') ->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id') ->where('t1.id')->eq($userID) - ->andWhere('t1.deleted')->eq('0') - ->andWhere('t1.objectID')->eq($this->session->project) ->fetch(); return $stakeholder; diff --git a/module/stakeholder/view/view.html.php b/module/stakeholder/view/view.html.php index a50000e2bd..f74de985d5 100644 --- a/module/stakeholder/view/view.html.php +++ b/module/stakeholder/view/view.html.php @@ -25,6 +25,9 @@ $createLink = $this->createLink('stakeholder', 'create', "projectID=$user->objec
id?> name?> + deleted):?> + stakeholder->deleted;?> +
From 443f016f252d968bd92658477849deab736e0018 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Wed, 21 Jul 2021 13:57:20 +0800 Subject: [PATCH 6/6] * Finish task #40406 (change jenkins variables to general name). --- db/zentao.sql | 39 +++++++++++++++-------------- module/ci/control.php | 4 +-- module/ci/model.php | 4 +-- module/compile/model.php | 10 ++++---- module/compile/view/browse.html.php | 2 +- module/job/config.php | 4 +-- module/job/control.php | 8 +++--- module/job/css/create.css | 4 +-- module/job/css/edit.css | 4 +-- module/job/js/create.js | 16 ++++++------ module/job/js/edit.js | 18 ++++++------- module/job/lang/de.php | 4 ++- module/job/lang/en.php | 5 +++- module/job/lang/fr.php | 4 ++- module/job/lang/vi.php | 4 ++- module/job/lang/zh-cn.php | 5 +++- module/job/lang/zh-tw.php | 4 ++- module/job/model.php | 6 ++--- module/job/view/browse.html.php | 4 +-- module/job/view/create.html.php | 10 ++++---- module/job/view/edit.html.php | 14 ++++++----- module/job/view/view.html.php | 4 +-- 22 files changed, 97 insertions(+), 80 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index 3e1fc29691..9457583bc7 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -471,23 +471,6 @@ CREATE TABLE IF NOT EXISTS `zt_history` ( PRIMARY KEY (`id`), KEY `action` (`action`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_pipeline`; -CREATE TABLE IF NOT EXISTS `zt_pipeline` ( - `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, - `type` char(30) NOT NULL, - `name` varchar(50) NOT NULL, - `url` varchar(255) DEFAULT NULL, - `account` varchar(30) DEFAULT NULL, - `password` varchar(255) NOT NULL, - `token` varchar(255) DEFAULT NULL, - `private` char(32) DEFAULT NULL, - `createdBy` varchar(30) NOT NULL, - `createdDate` datetime NOT NULL, - `editedBy` varchar(30) NOT NULL, - `editedDate` datetime NOT NULL, - `deleted` enum('0','1') NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_job`; CREATE TABLE IF NOT EXISTS `zt_job` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -495,8 +478,9 @@ CREATE TABLE IF NOT EXISTS `zt_job` ( `repo` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, `frame` varchar(20) NOT NULL, - `jkHost` mediumint(8) unsigned NOT NULL, - `jkJob` varchar(500) NOT NULL, + `engine` varchar(20) NOT NULL, + `server` mediumint(8) unsigned NOT NULL, + `pipeline` varchar(500) NOT NULL, `triggerType` varchar(255) NOT NULL, `svnDir` varchar(255) NOT NULL, `atDay` varchar(255) DEFAULT NULL, @@ -588,6 +572,23 @@ CREATE TABLE IF NOT EXISTS `zt_oauth` ( KEY `providerType` (`providerType`), KEY `providerID` (`providerID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_pipeline`; +CREATE TABLE IF NOT EXISTS `zt_pipeline` ( + `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `name` varchar(50) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `account` varchar(30) DEFAULT NULL, + `password` varchar(255) NOT NULL, + `token` varchar(255) DEFAULT NULL, + `private` char(32) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_planstory`; CREATE TABLE IF NOT EXISTS `zt_planstory` ( `plan` mediumint(8) unsigned NOT NULL, diff --git a/module/ci/control.php b/module/ci/control.php index dd9a637b0c..1ead086056 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -102,9 +102,9 @@ class ci extends control $jobID = 0; if($compileID) { - $compile = $this->dao->select('t1.*, t2.jkJob,t2.product,t2.frame,t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password')->from(TABLE_COMPILE)->alias('t1') + $compile = $this->dao->select('t1.*, t2.pipeline,t2.product,t2.frame,t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password')->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.server=t3.id') ->where('t1.id')->eq($compileID) ->fetch(); diff --git a/module/ci/model.php b/module/ci/model.php index e2323dc447..45e9cee5ad 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -28,10 +28,10 @@ class ciModel extends model */ public function checkCompileStatus() { - $compiles = $this->dao->select('t1.*, t2.jkJob, t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password') + $compiles = $this->dao->select('t1.*, t2.pipeline, t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password') ->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.server=t3.id') ->where('t1.status')->ne('success') ->andWhere('t1.status')->ne('failure') ->andWhere('t1.status')->ne('create_fail') diff --git a/module/compile/model.php b/module/compile/model.php index f9f1646335..b03b2b7036 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -34,10 +34,10 @@ class compileModel extends model */ public function getList($jobID, $orderBy = 'id_desc', $pager = null) { - return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate,t1.testtask, t2.jkJob,t2.triggerType,t2.comment,t2.atDay,t2.atTime, 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.comment,t2.atDay,t2.atTime, 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.jkHost=t4.id') + ->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id') ->where('t1.deleted')->eq('0') ->andWhere('t1.job')->ne('0') ->beginIF(!empty($jobID))->andWhere('t1.job')->eq($jobID)->fi() @@ -84,7 +84,7 @@ class compileModel extends model $url = new stdclass(); $url->userPWD = "$jenkinsUser:$jenkinsPassword"; - $url->url = sprintf('%s/job/%s/buildWithParameters/api/json', $jenkinsServer, $jenkins->jkJob); + $url->url = sprintf('%s/job/%s/buildWithParameters/api/json', $jenkinsServer, $jenkins->pipeline); return $url; } @@ -121,9 +121,9 @@ class compileModel extends model */ public function exec($compile) { - $job = $this->dao->select('t1.id,t1.name,t1.repo,t1.jkJob,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') + $job = $this->dao->select('t1.id,t1.name,t1.repo,t1.pipeline,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.server=t2.id') ->where('t1.id')->eq($compile->job) ->fetch(); diff --git a/module/compile/view/browse.html.php b/module/compile/view/browse.html.php index 899ad70a6c..0f8820e775 100644 --- a/module/compile/view/browse.html.php +++ b/module/compile/view/browse.html.php @@ -42,7 +42,7 @@ createLink('job', 'view', "jobID={$build->job}&compileID={$build->id}", 'html', true), $build->name, '', "class='iframe' data-width='90%'") : $build->name;?> repoName;?> - jkJob) . '@' . $build->jenkinsName;?> + pipeline) . '@' . $build->jenkinsName;?> loadModel('job')->getTriggerConfig($build);?> diff --git a/module/job/config.php b/module/job/config.php index fbca68a83a..75baa8009d 100644 --- a/module/job/config.php +++ b/module/job/config.php @@ -2,5 +2,5 @@ $config->job = new stdclass(); $config->job->create = new stdclass(); $config->job->edit = new stdclass(); -$config->job->create->requiredFields = 'name,repo,jkHost,jkJob,triggerType'; -$config->job->edit->requiredFields = 'name,repo,jkHost,jkJob,triggerType'; +$config->job->create->requiredFields = 'name,repo,server,pipeline,triggerType'; +$config->job->edit->requiredFields = 'name,repo,server,pipeline,triggerType'; diff --git a/module/job/control.php b/module/job/control.php index 5151d7eb4e..5baf3183da 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -86,7 +86,7 @@ class job extends control $this->view->repoPairs = $repoPairs; $this->view->repoTypes = $repoTypes; $this->view->products = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->projectID); - $this->view->jkHostList = $this->loadModel('jenkins')->getPairs(); + $this->view->serverList = $this->loadModel('jenkins')->getPairs(); $this->display(); } @@ -129,8 +129,8 @@ class job extends control $this->view->repoType = zget($repoTypes, $job->repo, 'Git'); $this->view->job = $job; $this->view->products = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->projectID); - $this->view->jkHostList = $this->loadModel('jenkins')->getPairs(); - $this->view->jkJobs = $this->jenkins->getTasks($job->jkHost); + $this->view->serverList = $this->loadModel('jenkins')->getPairs(); + $this->view->pipelines = $this->jenkins->getTasks($job->server); $this->display(); } @@ -226,7 +226,7 @@ class job extends control $this->view->job = $job; $this->view->compile = $compile; $this->view->repo = $this->loadModel('repo')->getRepoByID($job->repo); - $this->view->jenkins = $this->loadModel('jenkins')->getById($job->jkHost); + $this->view->jenkins = $this->loadModel('jenkins')->getById($job->server); $this->view->product = $this->loadModel('product')->getById($job->product); $this->display(); } diff --git a/module/job/css/create.css b/module/job/css/create.css index cbbff7de9e..2eaabdfeb4 100644 --- a/module/job/css/create.css +++ b/module/job/css/create.css @@ -2,7 +2,7 @@ .only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} .checkbox-primary.checkbox-inline {display: inline-block !important;} .checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -#jkHost_chosen .chosen-single {border-right: 0px;} -#jkJobBox {width: 385px;} +#server_chosen .chosen-single {border-right: 0px;} +#pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} #paramDiv .input-group {padding: 3px;} diff --git a/module/job/css/edit.css b/module/job/css/edit.css index cbbff7de9e..2eaabdfeb4 100644 --- a/module/job/css/edit.css +++ b/module/job/css/edit.css @@ -2,7 +2,7 @@ .only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} .checkbox-primary.checkbox-inline {display: inline-block !important;} .checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -#jkHost_chosen .chosen-single {border-right: 0px;} -#jkJobBox {width: 385px;} +#server_chosen .chosen-single {border-right: 0px;} +#pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} #paramDiv .input-group {padding: 3px;} diff --git a/module/job/js/create.js b/module/job/js/create.js index 20d93c09ed..517b7eab3a 100644 --- a/module/job/js/create.js +++ b/module/job/js/create.js @@ -82,25 +82,25 @@ $('#triggerType').change(function() } }); -$('#jkHost').change(function() +$('#server').change(function() { var jenkinsID = $(this).val(); - $('#jkJobBox #jkJob').remove(); - $('#jkJobBox #jkJob_chosen').remove(); - $('#jkJobBox .input-group').append("
"); + $('#pipelineBox #pipeline').remove(); + $('#pipelineBox #pipeline_chosen').remove(); + $('#pipelineBox .input-group').append("
"); $.getJSON(createLink('jenkins', 'ajaxGetTasks', 'jenkinsID=' + jenkinsID), function(tasks) { - html = ""; for(taskKey in tasks) { var task = tasks[taskKey]; html += ""; } html += ''; - $('#jkJobBox .loading').remove(); - $('#jkJobBox .input-group').append(html); + $('#pipelineBox .loading').remove(); + $('#pipelineBox .input-group').append(html); - $('#jkJobBox #jkJob').chosen({drop_direction: 'auto'}); + $('#pipelineBox #pipeline').chosen({drop_direction: 'auto'}); }) }) diff --git a/module/job/js/edit.js b/module/job/js/edit.js index 4b30331753..7493ff25b3 100644 --- a/module/job/js/edit.js +++ b/module/job/js/edit.js @@ -86,30 +86,30 @@ $('#triggerType').change(function() } }); -$('#jkHost').change(function() +$('#server').change(function() { var jenkinsID = $(this).val(); - $('#jkJobBox #jkJob').remove(); - $('#jkJobBox #jkJob_chosen').remove(); - $('#jkJobBox .input-group').append("
"); + $('#pipelineBox #pipeline').remove(); + $('#pipelineBox #pipeline_chosen').remove(); + $('#pipelineBox .input-group').append("
"); $.getJSON(createLink('jenkins', 'ajaxGetTasks', 'jenkinsID=' + jenkinsID), function(tasks) { - html = ""; for(taskKey in tasks) { var task = tasks[taskKey]; html += ""; } html += ''; - $('#jkJobBox .loading').remove(); - $('#jkJobBox .input-group').append(html); + $('#pipelineBox .loading').remove(); + $('#pipelineBox .input-group').append(html); - $('#jkJobBox #jkJob').val(jkJob).chosen({drop_direction: 'auto'}); + $('#pipelineBox #pipeline').val(pipeline).chosen({drop_direction: 'auto'}); }) }) $(function() { - $('#jkHost').change(); + $('#server').change(); $('#triggerType').change(); }); diff --git a/module/job/lang/de.php b/module/job/lang/de.php index a25a455a43..d9dc102465 100644 --- a/module/job/lang/de.php +++ b/module/job/lang/de.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Build Type'; $lang->job->jkJob = 'Jenkins Task'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Build Type'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Custom Days'; diff --git a/module/job/lang/en.php b/module/job/lang/en.php index b7d5877f00..3cf9727194 100644 --- a/module/job/lang/en.php +++ b/module/job/lang/en.php @@ -19,8 +19,11 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Build Type'; $lang->job->jkJob = 'Jenkins Task'; +$lang->job->engine = 'Engine'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Build Type'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Custom Days'; diff --git a/module/job/lang/fr.php b/module/job/lang/fr.php index 87a500e728..4494a9ed78 100644 --- a/module/job/lang/fr.php +++ b/module/job/lang/fr.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Serveur Jenkins'; -$lang->job->buildType = 'Type Build'; $lang->job->jkJob = 'T鈉he Jenkins'; +$lang->job->server = 'Serveur'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Type Build'; $lang->job->frame = 'Cadre'; $lang->job->triggerType = 'D閏lencheur'; $lang->job->atDay = 'Jours Person.'; diff --git a/module/job/lang/vi.php b/module/job/lang/vi.php index 490c38ef61..d6a5c8a22d 100644 --- a/module/job/lang/vi.php +++ b/module/job/lang/vi.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Loại bản dựng'; $lang->job->jkJob = 'Jenkins nhiệm vụ'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Loại bản dựng'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Ngày tùy chọn'; diff --git a/module/job/lang/zh-cn.php b/module/job/lang/zh-cn.php index 366fb3c0de..4fa94783f1 100644 --- a/module/job/lang/zh-cn.php +++ b/module/job/lang/zh-cn.php @@ -19,8 +19,11 @@ $lang->job->product = '关联' . $lang->productCommon; $lang->job->svnDir = 'SVN监控路径'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins服务器'; -$lang->job->buildType = '构建类型'; $lang->job->jkJob = 'Jenkins任务'; +$lang->job->engine = '构建引擎'; +$lang->job->server = '服务器'; +$lang->job->pipeline = '流水线'; +$lang->job->buildType = '构建类型'; $lang->job->frame = '工具/框架'; $lang->job->triggerType = '触发方式'; $lang->job->atDay = '自定义日期'; diff --git a/module/job/lang/zh-tw.php b/module/job/lang/zh-tw.php index 00f69b430f..9449dc686e 100644 --- a/module/job/lang/zh-tw.php +++ b/module/job/lang/zh-tw.php @@ -19,8 +19,10 @@ $lang->job->product = '關聯' . $lang->productCommon; $lang->job->svnDir = 'SVN監控路徑'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins伺服器'; -$lang->job->buildType = '構建類型'; $lang->job->jkJob = 'Jenkins任務'; +$lang->job->server = '伺服器'; +$lang->job->pipeline = '流水線'; +$lang->job->buildType = '構建類型'; $lang->job->frame = '工具/框架'; $lang->job->triggerType = '觸發方式'; $lang->job->atDay = '自定義日期'; diff --git a/module/job/model.php b/module/job/model.php index c948ada4e7..5ac819f9a0 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -35,7 +35,7 @@ class jobModel extends model { return $this->dao->select('t1.*, t2.name as repoName, t3.name as jenkinsName')->from(TABLE_JOB)->alias('t1') ->leftJoin(TABLE_REPO)->alias('t2')->on('t1.repo=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.server=t3.id') ->where('t1.deleted')->eq('0') ->orderBy($orderBy) ->page($pager) @@ -288,9 +288,9 @@ class jobModel extends model */ public function exec($id) { - $job = $this->dao->select('t1.id,t1.name,t1.product,t1.repo,t1.jkJob,t1.triggerType,t1.atTime,t1.customParam,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') + $job = $this->dao->select('t1.id,t1.name,t1.product,t1.repo,t1.pipeline,t1.triggerType,t1.atTime,t1.customParam,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.server=t2.id') ->where('t1.id')->eq($id) ->fetch(); if(!$job) return false; diff --git a/module/job/view/browse.html.php b/module/job/view/browse.html.php index c54b21a591..4e580471c0 100644 --- a/module/job/view/browse.html.php +++ b/module/job/view/browse.html.php @@ -30,7 +30,7 @@ job->name);?> job->repo);?> job->frame);?> - job->jenkins);?> + job->jenkins);?> job->triggerType;?> job->lastStatus);?> job->lastExec);?> @@ -44,7 +44,7 @@ createLink('job', 'view', "jobID={$job->id}", 'html', true), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?> repoName; ?> job->frameList, $job->frame);?> - jkJob) . '@' . $job->jenkinsName;?> + pipeline) . '@' . $job->jenkinsName;?> job->getTriggerConfig($job);?> diff --git a/module/job/view/create.html.php b/module/job/view/create.html.php index 955e283804..83d2d51bac 100644 --- a/module/job/view/create.html.php +++ b/module/job/view/create.html.php @@ -73,14 +73,14 @@ - job->jkHost; ?> + job->server; ?>
-
-
+
+
- job->jkJob; ?> - ''), '', "class='form-control chosen'"); ?> + job->pipeline; ?> + ''), '', "class='form-control chosen'"); ?>
diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 036cc5b9cc..222b5260c5 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -14,7 +14,7 @@ triggerType);?> -jkJob);?> +pipeline);?> job->dirChange);?> job->buildTag);?> @@ -96,14 +96,14 @@ - job->jkHost; ?> + job->server; ?>
-
jkHost, "class='form-control chosen'");?>
-
+
server, "class='form-control chosen'");?>
+
- job->jkJob; ?> - ''), $job->jkJob, "class='form-control chosen'");?> + job->pipeline; ?> + ''), $job->pipeline, "class='form-control chosen'");?>
@@ -112,6 +112,7 @@ job->customParam;?> + customParam):?> customParam) as $paramName => $paramValue):?>
job->paramName; ?> @@ -135,6 +136,7 @@
+
job->paramName; ?> diff --git a/module/job/view/view.html.php b/module/job/view/view.html.php index e546cb27ed..ee280691db 100644 --- a/module/job/view/view.html.php +++ b/module/job/view/view.html.php @@ -50,8 +50,8 @@ job->frameList, $job->frame);?> - job->jkHost;?> - jkJob) . '@' . $jenkins->name;?> + job->server;?> + pipeline) . '@' . $jenkins->name;?> job->triggerType;?>