+ Add devops application options process.

This commit is contained in:
caoyanyi
2023-12-27 14:35:02 +08:00
parent bf71fef380
commit 01cd2cf699
3 changed files with 34 additions and 5 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ class install extends control
$this->view->title = $this->lang->solution->install;
$this->view->cloudSolution = $cloudSolution;
$this->view->components = $components;
$this->view->components = $this->installZen->processComponents($components, $cloudSolution);
$this->view->category = $category;
$this->display();
+1 -4
View File
@@ -18,15 +18,12 @@ h::importJs($app->getWebRoot() . 'js/xterm/xterm.js');
$formRows = array();
foreach($components->category as $item)
{
if(in_array($item->name, array('analysis', 'artifact'))) array_unshift($item->choices, (object)array('name' => $lang->install->solution->skipInstall, 'version' => ''));
if($item->name === 'pms') continue;
$formRows[] = formGroup
(
set::label($item->alias),
set::name($item->name),
set::required(true),
set::items($this->solution->createSelectOptions($item->choices, $cloudSolution)),
set::items($item->schemaChoices),
on::change('checkMemory(this)')
);
}
+32
View File
@@ -414,4 +414,36 @@ class installZen extends install
return $customSession;
}
/**
* 处理安装应用下拉选择的数据。
* Process application options.
*
* @param object $components
* @param object $cloudSolution
* @access protected
* @return object
*/
protected function processComponents(object $components, object $cloudSolution): object
{
foreach($components->category as $key => &$item)
{
if($item->name === 'pms')
{
unset($components->category[$key]);
continue;
}
if(in_array($item->name, array('analysis', 'artifact'))) array_unshift($item->choices, (object)array('name' => $this->lang->install->solution->skipInstall, 'version' => ''));
$item->schemaChoices = array();
foreach($item->choices as $cloudApp)
{
$appInfo = zget($cloudSolution->apps, $cloudApp->name, array());
$item->schemaChoices[$cloudApp->name] = zget($appInfo, 'alias', $cloudApp->name);
}
}
return $components;
}
}