Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -178,13 +178,13 @@ $(document).ready(function()
|
||||
projects = '';
|
||||
$.each(gitlabProjects[host], function(id, obj){projects = projects + ',' + obj.gitlabProject});
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + "&projects=" + projects);
|
||||
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
$('#gitlabProject').html('').append(response);
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -151,4 +151,4 @@ $lang->icons['unlock'] = 'unlock-alt';
|
||||
$lang->icons['confirmStoryChange'] = 'search';
|
||||
$lang->icons['score'] = 'tint';
|
||||
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins','gitlab');
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins', 'gitlab');
|
||||
|
||||
@@ -169,10 +169,10 @@ class repo extends control
|
||||
|
||||
if($repo->SCM == 'Gitlab')
|
||||
{
|
||||
$projects = $this->loadModel('gitlab')->apiGetProjects($repo->gitlab, $repo->password);
|
||||
|
||||
$projects = $this->repo->getGitlabProjects($repo->client, $repo->password);
|
||||
$options = array();
|
||||
foreach($projects as $project) $options[$project->id] = $project->name_with_namespace;
|
||||
foreach($projects as $project) $options[$project->id] = $project->name . ':' . $project->http_url_to_repo;
|
||||
|
||||
$this->view->projects = $options;
|
||||
}
|
||||
@@ -1116,10 +1116,10 @@ class repo extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetGitlabProjects($host, $projectIdList = '')
|
||||
public function ajaxGetGitlabProjects($host, $token)
|
||||
{
|
||||
$projects = $this->loadModel('gitlab')->apiGetProjects($host);
|
||||
|
||||
$host = helper::safe64Decode($host);
|
||||
$projects = $this->repo->getGitlabProjects($host, $token);
|
||||
if(!$projects) return $this->send(array('message' => array()));
|
||||
$projectIdList = $projectIdList ? explode(',', $projectIdList) : null;
|
||||
$options = "<option value=''></option>";
|
||||
|
||||
@@ -1754,7 +1754,6 @@ class repoModel extends model
|
||||
{
|
||||
$host = rtrim($host, '/');
|
||||
$host .= '/api/v4/projects';
|
||||
|
||||
$allResults = array();
|
||||
for($page = 1; true; $page ++)
|
||||
{
|
||||
@@ -1768,7 +1767,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Process gitlab repo.
|
||||
*
|
||||
*
|
||||
* @param oobject $repo
|
||||
* @access public
|
||||
* @return object
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='cell'>
|
||||
<div class='alert with-icon'>
|
||||
<div class='alert with-icon'>
|
||||
<i class="icon-check-sign"></i>
|
||||
<div class='content'>
|
||||
<h3><?php echo $lang->repo->notice->syncing;?></h3>
|
||||
|
||||
Reference in New Issue
Block a user