* [task#150385] fix bug for devops menu.

This commit is contained in:
liyang
2025-09-30 14:06:12 +08:00
parent 820afcb881
commit f18bd7aeac
4 changed files with 14 additions and 1 deletions
+5
View File
@@ -230,6 +230,11 @@ class executionModel extends model
if(!$features['burn']) unset($this->lang->execution->menu->burn);
if(!$features['other']) unset($this->lang->execution->menu->other);
if(!$features['story'] && $this->config->edition == 'open') unset($this->lang->execution->menu->view);
if($this->config->inCompose)
{
$repoServers = $this->loadModel('pipeline')->getPairs($this->config->pipeline->checkRepoServers);
if(empty($repoServers)) unset($this->lang->execution->menu->devops);
}
return true;
}
+1
View File
@@ -5,3 +5,4 @@ $config->pipeline->create->requiredFields = 'name,url,type';
$config->pipeline->edit->requiredFields = 'name,url,type';
$config->pipeline->formatTypeService = array('gitlab');
$config->pipeline->checkRepoServers = 'gitlab,gitea,gogs';
+6
View File
@@ -1080,6 +1080,12 @@ class projectTao extends projectModel
if($lang->{$model}->dividerMenu) $lang->{$model}->dividerMenu = ',' . trim($lang->{$model}->dividerMenu, ',') . ',';
}
if($this->config->inCompose)
{
$repoServers = $this->loadModel('pipeline')->getPairs($this->config->pipeline->checkRepoServers);
if(empty($repoServers)) unset($lang->{$model}->menu->devops);
}
$lang->project->menu = $lang->{$model}->menu;
$lang->project->menuOrder = $lang->{$model}->menuOrder;
$lang->project->dividerMenu = $lang->{$model}->dividerMenu;
+2 -1
View File
@@ -81,6 +81,7 @@ class repo extends control
if(empty($this->repos) && !in_array(strtolower($this->methodName), array('create', 'setrules', 'createrepo', 'import', 'maintain')))
{
$method = $this->app->tab == 'devops' ? 'maintain' : 'create';
if($this->config->inCompose && $method == 'create') $method = 'createRepo';
return $this->locate(inLink($method, "objectID=$objectID"));
}
$this->view->fromModal = $fromModal;
@@ -134,7 +135,7 @@ class repo extends control
$this->view->projects = $projects;
$this->view->sonarRepoList = $sonarRepoList;
$this->view->successJobs = $successJobs;
$this->view->repoServers = $this->pipeline->getPairs('gitlab,gitea,gogs');
$this->view->repoServers = $this->pipeline->getPairs($this->config->pipeline->checkRepoServers);
$this->display();
}