+ Add ajaxc getting gitlab project pipeline.
This commit is contained in:
@@ -337,7 +337,7 @@ class gitlab extends control
|
||||
public function ajaxGetExecutionsByProduct($productID)
|
||||
{
|
||||
if(!$productID) return $this->send(array('message' => array()));
|
||||
|
||||
|
||||
$executions = $this->loadModel('product')->getAllExecutionPairsByProduct($productID);
|
||||
$options = "<option value=''></option>";
|
||||
foreach($executions as $index =>$execution)
|
||||
@@ -346,4 +346,24 @@ class gitlab extends control
|
||||
}
|
||||
die($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: Get gitlab project pipeline.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetPipeline($repoID)
|
||||
{
|
||||
if(empty($repoID)) die(json_encode(array('' => '')));
|
||||
$this->loadModel('repo');
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
if(empty($repo)) die(json_encode(array('' => '')));
|
||||
|
||||
$gitlabID = $repo->gitlab;
|
||||
$projectID = $repo->projectID;
|
||||
$pipeline = $this->gitlab->getPipeline($gitlabID, $projectID);
|
||||
die(json_encode($pipeline));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user