From 09503f95af69b09b85ee02b71a4429ad6e88f36f Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 25 Aug 2023 10:50:43 +0800 Subject: [PATCH] * Fix load error of edit host page. --- module/host/config.php | 10 +--------- module/host/js/edit.ui.js | 1 - module/host/ui/edit.html.php | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/module/host/config.php b/module/host/config.php index 14f14f744f..c77124fede 100644 --- a/module/host/config.php +++ b/module/host/config.php @@ -33,15 +33,7 @@ $config->host->actions = new stdclass(); $config->host->actions->view = array(); $config->host->actions->view['suffixActions'] = array('edit', 'delete'); -$config->host->create = new stdclass(); -$config->host->create->requiredFields = 'name,hostType,extranet,cpuCores,memory,diskSize,vsoft'; -$config->host->create->ipFields = 'extranet'; - -$config->host->defaultPort = '55001'; - -$config->host->edit = new stdclass(); -$config->host->edit->requiredFields = 'name,hostType,cpuCores,memory,diskSize,vsoft'; - +$config->host->defaultPort = '55001'; $config->host->imageListUrl = 'https://pkg.qucheng.com/zenagent/list.json'; $config->host->cpuCoreList = array(1 => 1, 2 => 2, 4 => 4, 6 => 6, 8 => 8, 10 => 10, 12 => 12, 16 => 16, 24 => 24, 32 => 32, 64 => 64); diff --git a/module/host/js/edit.ui.js b/module/host/js/edit.ui.js index 8fcee1293c..6f7c78171c 100644 --- a/module/host/js/edit.ui.js +++ b/module/host/js/edit.ui.js @@ -13,7 +13,6 @@ window.hostTypeChange = function(e) window.isTestNodeChange = function(e) { const checked = $('#isTestNode_1').prop('checked'); - console.log(111, checked) var currentParam = params.replace('{osName}', osName).replace('{hostType}', hostType).replace('{isTestNode}', checked ? 1 : 0); loadPage($.createLink('host', 'edit', currentParam), '#testContainer'); } diff --git a/module/host/ui/edit.html.php b/module/host/ui/edit.html.php index 126ddd8017..adc61d77fe 100644 --- a/module/host/ui/edit.html.php +++ b/module/host/ui/edit.html.php @@ -163,7 +163,7 @@ formPanel set::label($lang->host->osVersion), set::control('picker'), set::name('osVersion'), - set::items($lang->host->{"{$osName}List"}), + set::items(empty($osName) ? array() : $lang->host->{"{$osName}List"}), set::value($host->osVersion) ) ),