From 7ea2322002bfaf63b4d3451b0c252af700c4b6f0 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 8 Jun 2021 11:45:32 +0800 Subject: [PATCH 1/4] * Rename PIPLINE to PIPELINE. --- config/zentaopms.php | 2 +- module/{pipline => pipeline}/config.php | 0 module/{pipline => pipeline}/lang/zh-cn.php | 0 module/{pipline => pipeline}/model.php | 10 +++++----- 4 files changed, 6 insertions(+), 6 deletions(-) rename module/{pipline => pipeline}/config.php (100%) rename module/{pipline => pipeline}/lang/zh-cn.php (100%) rename module/{pipline => pipeline}/model.php (91%) diff --git a/config/zentaopms.php b/config/zentaopms.php index b5e0f771de..5777863d6e 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -179,7 +179,7 @@ define('TABLE_LOG', '`' . $config->db->prefix . 'log`'); define('TABLE_SCORE', '`' . $config->db->prefix . 'score`'); define('TABLE_NOTIFY', '`' . $config->db->prefix . 'notify`'); define('TABLE_OAUTH', '`' . $config->db->prefix . 'oauth`'); -define('TABLE_PIPLINE', '`' . $config->db->prefix . 'jenkins`'); +define('TABLE_PIPELINE', '`' . $config->db->prefix . 'jenkins`'); define('TABLE_JOB', '`' . $config->db->prefix . 'job`'); define('TABLE_COMPILE', '`' . $config->db->prefix . 'compile`'); diff --git a/module/pipline/config.php b/module/pipeline/config.php similarity index 100% rename from module/pipline/config.php rename to module/pipeline/config.php diff --git a/module/pipline/lang/zh-cn.php b/module/pipeline/lang/zh-cn.php similarity index 100% rename from module/pipline/lang/zh-cn.php rename to module/pipeline/lang/zh-cn.php diff --git a/module/pipline/model.php b/module/pipeline/model.php similarity index 91% rename from module/pipline/model.php rename to module/pipeline/model.php index eb73a6a595..38fc423af9 100644 --- a/module/pipline/model.php +++ b/module/pipeline/model.php @@ -21,7 +21,7 @@ class piplineModel extends model */ public function getByID($id) { - $pipline = $this->dao->select('*')->from(TABLE_PIPLINE)->where('id')->eq($id)->fetch(); + $pipline = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch(); $pipline->password = base64_decode($pipline->password); return $pipline; } @@ -37,7 +37,7 @@ class piplineModel extends model */ public function getList($type = 'jenkins', $orderBy = 'id_desc', $pager = null) { - return $this->dao->select('*')->from(TABLE_PIPLINE) + return $this->dao->select('*')->from(TABLE_PIPELINE) ->where('deleted')->eq('0') ->AndWhere('type')->eq($type) ->orderBy($orderBy) @@ -52,7 +52,7 @@ class piplineModel extends model */ public function getPairs($type) { - $pipline = $this->dao->select('id,name')->from(TABLE_PIPLINE) + $pipline = $this->dao->select('id,name')->from(TABLE_PIPELINE) ->where('deleted')->eq('0') ->AndWhere('type')->eq($type) ->orderBy('id')->fetchPairs('id', 'name'); @@ -77,7 +77,7 @@ class piplineModel extends model $pipline->password = base64_encode($pipline->password); - $this->dao->insert(TABLE_PIPLINE)->data($pipline) + $this->dao->insert(TABLE_PIPELINE)->data($pipline) ->batchCheck($this->config->pipline->create->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() @@ -103,7 +103,7 @@ class piplineModel extends model $pipline->password = base64_encode($pipline->password); - $this->dao->update(TABLE_PIPLINE)->data($pipline) + $this->dao->update(TABLE_PIPELINE)->data($pipline) ->batchCheck($this->config->pipline->edit->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() From e2157697e8ba4e1e01c3ebf6f9d32f133fad35d5 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 8 Jun 2021 12:13:16 +0800 Subject: [PATCH 2/4] * Rename pipline to pipeline. --- module/pipeline/config.php | 8 +++---- module/pipeline/lang/zh-cn.php | 12 +++++----- module/pipeline/model.php | 42 +++++++++++++++++----------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/module/pipeline/config.php b/module/pipeline/config.php index 0228d4f00c..29bc37b2ea 100644 --- a/module/pipeline/config.php +++ b/module/pipeline/config.php @@ -1,5 +1,5 @@ pipline->create = new stdclass(); -$config->pipline->edit = new stdclass(); -$config->pipline->create->requiredFields = 'name,url,type'; -$config->pipline->edit->requiredFields = 'name,url,type'; +$config->pipeline->create = new stdclass(); +$config->pipeline->edit = new stdclass(); +$config->pipeline->create->requiredFields = 'name,url,type'; +$config->pipeline->edit->requiredFields = 'name,url,type'; diff --git a/module/pipeline/lang/zh-cn.php b/module/pipeline/lang/zh-cn.php index 8d81ee7093..b949e9998d 100644 --- a/module/pipeline/lang/zh-cn.php +++ b/module/pipeline/lang/zh-cn.php @@ -1,7 +1,7 @@ pipline->id = 'ID'; -$lang->pipline->name = '名称'; -$lang->pipline->url = '服务地址'; -$lang->pipline->token = 'Token'; -$lang->pipline->account = '用户名'; -$lang->pipline->password = '密码'; +$lang->pipeline->id = 'ID'; +$lang->pipeline->name = '名称'; +$lang->pipeline->url = '服务地址'; +$lang->pipeline->token = 'Token'; +$lang->pipeline->account = '用户名'; +$lang->pipeline->password = '密码'; diff --git a/module/pipeline/model.php b/module/pipeline/model.php index 38fc423af9..b650093146 100644 --- a/module/pipeline/model.php +++ b/module/pipeline/model.php @@ -1,6 +1,6 @@ dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch(); - $pipline->password = base64_decode($pipline->password); - return $pipline; + $pipeline = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch(); + $pipeline->password = base64_decode($pipeline->password); + return $pipeline; } /** - * Get pipline list. + * Get pipeline list. * * @param string $type jenkins|gitlab * @param string $orderBy @@ -46,39 +46,39 @@ class piplineModel extends model } /** - * Get pipline pairs + * Get pipeline pairs * * @return array */ public function getPairs($type) { - $pipline = $this->dao->select('id,name')->from(TABLE_PIPELINE) + $pipeline = $this->dao->select('id,name')->from(TABLE_PIPELINE) ->where('deleted')->eq('0') ->AndWhere('type')->eq($type) ->orderBy('id')->fetchPairs('id', 'name'); - $pipline = array('' => '') + $pipline; - return $pipline; + $pipeline = array('' => '') + $pipeline; + return $pipeline; } /** - * Create a pipline. + * Create a pipeline. * * @access public * @return bool */ public function create($type) { - $pipline = fixer::input('post') + $pipeline = fixer::input('post') ->add('type', $type) ->add('createdBy', $this->app->user->account) ->add('createdDate', helper::now()) ->skipSpecial('url,token,account,password') ->get(); - $pipline->password = base64_encode($pipline->password); + $pipeline->password = base64_encode($pipeline->password); - $this->dao->insert(TABLE_PIPELINE)->data($pipline) - ->batchCheck($this->config->pipline->create->requiredFields, 'notempty') + $this->dao->insert(TABLE_PIPELINE)->data($pipeline) + ->batchCheck($this->config->pipeline->create->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() ->exec(); @@ -87,7 +87,7 @@ class piplineModel extends model } /** - * Update a pipline. + * Update a pipeline. * * @param int $id * @access public @@ -95,16 +95,16 @@ class piplineModel extends model */ public function update($id) { - $pipline = fixer::input('post') + $pipeline = fixer::input('post') ->add('editedBy', $this->app->user->account) ->add('editedDate', helper::now()) ->skipSpecial('url,token,account,password') ->get(); - $pipline->password = base64_encode($pipline->password); + $pipeline->password = base64_encode($pipeline->password); - $this->dao->update(TABLE_PIPELINE)->data($pipline) - ->batchCheck($this->config->pipline->edit->requiredFields, 'notempty') + $this->dao->update(TABLE_PIPELINE)->data($pipeline) + ->batchCheck($this->config->pipeline->edit->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() ->where('id')->eq($id) From 4492f5f23c12e101cf054a07f3ffbbd7453d44fd Mon Sep 17 00:00:00 2001 From: Guanxiying Date: Tue, 8 Jun 2021 13:04:03 +0800 Subject: [PATCH 3/4] * Rename jenkins table. --- db/zentao.sql | 5 ++-- module/ci/control.php | 2 +- module/ci/model.php | 2 +- module/compile/model.php | 4 ++-- module/gitlab/model.php | 10 ++++---- module/jenkins/control.php | 2 +- module/jenkins/model.php | 49 ++++---------------------------------- module/job/model.php | 4 ++-- 8 files changed, 20 insertions(+), 58 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index fa9301cc1e..adcd1b45d3 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -471,9 +471,10 @@ CREATE TABLE IF NOT EXISTS `zt_history` ( PRIMARY KEY (`id`), KEY `action` (`action`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_jenkins`; -CREATE TABLE IF NOT EXISTS `zt_jenkins` ( +-- DROP TABLE IF EXISTS `zt_pipline`; +CREATE TABLE IF NOT EXISTS `zt_pipline` ( `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, diff --git a/module/ci/control.php b/module/ci/control.php index b22366f61e..654a48a2a1 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -104,7 +104,7 @@ class ci extends control { $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') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') - ->leftJoin(TABLE_JENKINS)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=t3.id') ->where('t1.id')->eq($compileID) ->fetch(); diff --git a/module/ci/model.php b/module/ci/model.php index 46ff711cc9..3a0093d85e 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -31,7 +31,7 @@ class ciModel extends model $compiles = $this->dao->select('t1.*, t2.jkJob, 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_JENKINS)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=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 7f82a344ce..f9f1646335 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -37,7 +37,7 @@ class compileModel extends model 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') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') ->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id') - ->leftJoin(TABLE_JENKINS)->alias('t4')->on('t2.jkHost=t4.id') + ->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.jkHost=t4.id') ->where('t1.deleted')->eq('0') ->andWhere('t1.job')->ne('0') ->beginIF(!empty($jobID))->andWhere('t1.job')->eq($jobID)->fi() @@ -123,7 +123,7 @@ class compileModel extends model { $job = $this->dao->select('t1.id,t1.name,t1.repo,t1.jkJob,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_JENKINS)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') ->where('t1.id')->eq($compile->job) ->fetch(); diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 51d296384a..9ede8dfaa1 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -21,7 +21,7 @@ class gitlabModel extends model */ public function getByID($id) { - $gitlab = $this->dao->select('*')->from(TABLE_JENKINS)->where('id')->eq($id)->fetch(); + $gitlab = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch(); $gitlab->password = base64_decode($gitlab->password); return $gitlab; @@ -37,7 +37,7 @@ class gitlabModel extends model */ public function getList($orderBy = 'id_desc', $pager = null) { - return $this->dao->select('*')->from(TABLE_JENKINS) + return $this->dao->select('*')->from(TABLE_PIPELINE) ->where('deleted')->eq('0') ->andwhere('type')->eq('1') ->orderBy($orderBy) @@ -52,7 +52,7 @@ class gitlabModel extends model */ public function getPairs() { - $gitlab = $this->dao->select('id,name')->from(TABLE_JENKINS) + $gitlab = $this->dao->select('id,name')->from(TABLE_PIPELINE) ->where('deleted')->eq('0') ->orderBy('id')->fetchPairs('id', 'name'); $gitlab = array('' => '') + $gitlab; @@ -74,7 +74,7 @@ class gitlabModel extends model ->skipSpecial('url,token') ->get(); - $this->dao->insert(TABLE_JENKINS)->data($gitlab) + $this->dao->insert(TABLE_PIPELINE)->data($gitlab) ->batchCheck($this->config->gitlab->create->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() @@ -98,7 +98,7 @@ class gitlabModel extends model ->skipSpecial('url,token') ->get(); - $this->dao->update(TABLE_JENKINS)->data($gitlab) + $this->dao->update(TABLE_PIPELINE)->data($gitlab) ->batchCheck($this->config->gitlab->edit->requiredFields, 'notempty') ->batchCheck("url", 'URL') ->autoCheck() diff --git a/module/jenkins/control.php b/module/jenkins/control.php index 70c030d2a4..1a77a02d27 100644 --- a/module/jenkins/control.php +++ b/module/jenkins/control.php @@ -111,7 +111,7 @@ class jenkins extends control { if($confim != 'yes') die(js::confirm($this->lang->jenkins->confirmDelete, inlink('delete', "id=$id&confirm=yes"))); - $this->jenkins->delete(TABLE_JENKINS, $id); + $this->jenkins->delete(TABLE_PIPELINE, $id); die(js::reload('parent')); } diff --git a/module/jenkins/model.php b/module/jenkins/model.php index 2d12469a3f..2c7eab673a 100644 --- a/module/jenkins/model.php +++ b/module/jenkins/model.php @@ -21,10 +21,7 @@ class jenkinsModel extends model */ public function getByID($id) { - $jenkins = $this->dao->select('*')->from(TABLE_JENKINS)->where('id')->eq($id)->fetch(); - $jenkins->password = base64_decode($jenkins->password); - - return $jenkins; + return $this->loadModel('pipline')->getByID($id); } /** @@ -37,11 +34,7 @@ class jenkinsModel extends model */ public function getList($orderBy = 'id_desc', $pager = null) { - return $this->dao->select('*')->from(TABLE_JENKINS) - ->where('deleted')->eq('0') - ->orderBy($orderBy) - ->page($pager) - ->fetchAll('id'); + return $this->loadModel('pipline')->getList('jenkins', $orderBy, $pager); } /** @@ -51,11 +44,7 @@ class jenkinsModel extends model */ public function getPairs() { - $jenkins = $this->dao->select('id,name')->from(TABLE_JENKINS) - ->where('deleted')->eq('0') - ->orderBy('id')->fetchPairs('id', 'name'); - $jenkins = array('' => '') + $jenkins; - return $jenkins; + return $this->loadModel('pipline')->getPairs('jenkins'); } /** @@ -94,21 +83,7 @@ class jenkinsModel extends model */ public function create() { - $jenkins = fixer::input('post') - ->add('createdBy', $this->app->user->account) - ->add('createdDate', helper::now()) - ->skipSpecial('url,token,account,password') - ->get(); - - $jenkins->password = base64_encode($jenkins->password); - - $this->dao->insert(TABLE_JENKINS)->data($jenkins) - ->batchCheck($this->config->jenkins->create->requiredFields, 'notempty') - ->batchCheck("url", 'URL') - ->autoCheck() - ->exec(); - if(dao::isError()) return false; - return $this->dao->lastInsertId(); + return $this->loadModel('pipline')->create('jenkins'); } /** @@ -120,20 +95,6 @@ class jenkinsModel extends model */ public function update($id) { - $jenkins = fixer::input('post') - ->add('editedBy', $this->app->user->account) - ->add('editedDate', helper::now()) - ->skipSpecial('url,token,account,password') - ->get(); - - $jenkins->password = base64_encode($jenkins->password); - - $this->dao->update(TABLE_JENKINS)->data($jenkins) - ->batchCheck($this->config->jenkins->edit->requiredFields, 'notempty') - ->batchCheck("url", 'URL') - ->autoCheck() - ->where('id')->eq($id) - ->exec(); - return !dao::isError(); + return $this->loadModel('pipline')->update($id); } } diff --git a/module/job/model.php b/module/job/model.php index 5d19e6c298..c948ada4e7 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_JENKINS)->alias('t3')->on('t1.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.jkHost=t3.id') ->where('t1.deleted')->eq('0') ->orderBy($orderBy) ->page($pager) @@ -290,7 +290,7 @@ class jobModel extends model { $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') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_JENKINS)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') ->where('t1.id')->eq($id) ->fetch(); if(!$job) return false; From f27fef0b00c4e6339c7da43017805de2cea8c4c2 Mon Sep 17 00:00:00 2001 From: Guanxiying Date: Tue, 8 Jun 2021 13:16:58 +0800 Subject: [PATCH 4/4] * Call pipeline model in gitlab model. --- config/zentaopms.php | 2 +- module/gitlab/model.php | 49 ++++------------------------------------ module/jenkins/model.php | 10 ++++---- 3 files changed, 11 insertions(+), 50 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 5777863d6e..6a8fe3ca3a 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -179,7 +179,7 @@ define('TABLE_LOG', '`' . $config->db->prefix . 'log`'); define('TABLE_SCORE', '`' . $config->db->prefix . 'score`'); define('TABLE_NOTIFY', '`' . $config->db->prefix . 'notify`'); define('TABLE_OAUTH', '`' . $config->db->prefix . 'oauth`'); -define('TABLE_PIPELINE', '`' . $config->db->prefix . 'jenkins`'); +define('TABLE_PIPELINE', '`' . $config->db->prefix . 'pipeline`'); define('TABLE_JOB', '`' . $config->db->prefix . 'job`'); define('TABLE_COMPILE', '`' . $config->db->prefix . 'compile`'); diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 9ede8dfaa1..0e123d100c 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -21,10 +21,7 @@ class gitlabModel extends model */ public function getByID($id) { - $gitlab = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch(); - $gitlab->password = base64_decode($gitlab->password); - - return $gitlab; + return $this->loadModel('pipeline')->getByID($id); } /** @@ -37,12 +34,7 @@ class gitlabModel extends model */ public function getList($orderBy = 'id_desc', $pager = null) { - return $this->dao->select('*')->from(TABLE_PIPELINE) - ->where('deleted')->eq('0') - ->andwhere('type')->eq('1') - ->orderBy($orderBy) - ->page($pager) - ->fetchAll('id'); + return $this->loadModel('pipeline')->getList('gitlab', $orderBy, $pager); } /** @@ -52,11 +44,7 @@ class gitlabModel extends model */ public function getPairs() { - $gitlab = $this->dao->select('id,name')->from(TABLE_PIPELINE) - ->where('deleted')->eq('0') - ->orderBy('id')->fetchPairs('id', 'name'); - $gitlab = array('' => '') + $gitlab; - return $gitlab; + return $this->loadModel('pipeline')->getPairs('gitlab'); } /** @@ -67,20 +55,7 @@ class gitlabModel extends model */ public function create() { - $gitlab = fixer::input('post') - ->add('createdBy', $this->app->user->account) - ->add('createdDate', helper::now()) - ->add('type', 1) - ->skipSpecial('url,token') - ->get(); - - $this->dao->insert(TABLE_PIPELINE)->data($gitlab) - ->batchCheck($this->config->gitlab->create->requiredFields, 'notempty') - ->batchCheck("url", 'URL') - ->autoCheck() - ->exec(); - if(dao::isError()) return false; - return $this->dao->lastInsertId(); + return $this->loadModel('pipeline')->create('gitlab'); } /** @@ -92,19 +67,7 @@ class gitlabModel extends model */ public function update($id) { - $gitlab = fixer::input('post') - ->add('editedBy', $this->app->user->account) - ->add('editedDate', helper::now()) - ->skipSpecial('url,token') - ->get(); - - $this->dao->update(TABLE_PIPELINE)->data($gitlab) - ->batchCheck($this->config->gitlab->edit->requiredFields, 'notempty') - ->batchCheck("url", 'URL') - ->autoCheck() - ->where('id')->eq($id) - ->exec(); - return !dao::isError(); + return $this->loadModel('pipeline')->update($id); } /** @@ -119,10 +82,8 @@ class gitlabModel extends model { $host = rtrim($host, '/'); $host .= '/api/v4/activities'; - $results = json_decode(file_get_contents($host . "?private_token=$token")); return $results; } - } diff --git a/module/jenkins/model.php b/module/jenkins/model.php index 2c7eab673a..48eaa13a1b 100644 --- a/module/jenkins/model.php +++ b/module/jenkins/model.php @@ -21,7 +21,7 @@ class jenkinsModel extends model */ public function getByID($id) { - return $this->loadModel('pipline')->getByID($id); + return $this->loadModel('pipeline')->getByID($id); } /** @@ -34,7 +34,7 @@ class jenkinsModel extends model */ public function getList($orderBy = 'id_desc', $pager = null) { - return $this->loadModel('pipline')->getList('jenkins', $orderBy, $pager); + return $this->loadModel('pipeline')->getList('jenkins', $orderBy, $pager); } /** @@ -44,7 +44,7 @@ class jenkinsModel extends model */ public function getPairs() { - return $this->loadModel('pipline')->getPairs('jenkins'); + return $this->loadModel('pipeline')->getPairs('jenkins'); } /** @@ -83,7 +83,7 @@ class jenkinsModel extends model */ public function create() { - return $this->loadModel('pipline')->create('jenkins'); + return $this->loadModel('pipeline')->create('jenkins'); } /** @@ -95,6 +95,6 @@ class jenkinsModel extends model */ public function update($id) { - return $this->loadModel('pipline')->update($id); + return $this->loadModel('pipeline')->update($id); } }