+ Add devops application options process.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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)')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user