diff --git a/db/update17.7.sql b/db/update17.7.sql new file mode 100644 index 0000000000..e5beb95eab --- /dev/null +++ b/db/update17.7.sql @@ -0,0 +1,14 @@ +ALTER TABLE `zt_host` ADD `type` varchar(30) NOT NULL DEFAULT 'normal' AFTER `admin`; +ALTER TABLE `zt_host` ADD `secret` varchar(50) NOT NULL DEFAULT '' AFTER `type`; +ALTER TABLE `zt_host` ADD `token` varchar(50) NOT NULL DEFAULT '' AFTER `secret`; +ALTER TABLE `zt_host` ADD `expiredDate` datetime NOT NULL AFTER `token`; +ALTER TABLE `zt_host` ADD `virtualSoftware` varchar(30) NOT NULL DEFAULT '' AFTER `expiredDate`; +ALTER TABLE `zt_asset` ADD `registerDate` datetime NOT NULL AFTER `editedDate`; +ALTER TABLE `zt_vmtemplate` ADD `type` varchar(30) NOT NULL DEFAULT 'normal' AFTER `hostID`; +ALTER TABLE `zt_vmtemplate` ADD `imageName` varchar(50) NOT NULL; +ALTER TABLE `zt_vmtemplate` ADD `createdBy` varchar(30) NOT NULL; +ALTER TABLE `zt_vmtemplate` ADD `createdDate` datetime NOT NULL; +ALTER TABLE `zt_vmtemplate` ADD `editedBy` varchar(30) NOT NULL; +ALTER TABLE `zt_vmtemplate` ADD `editedDate` datetime NOT NULL; +ALTER TABLE `zt_vm` ADD `osVersion` varchar(50) NOT NULL DEFAULT '' AFTER `osCategory`; +ALTER TABLE `zt_vm` ADD `unit` enum('GB','TB') NOT NULL DEFAULT 'GB' AFTER `osDisk`; diff --git a/module/executionnode/config.php b/module/executionnode/config.php index ac8e8e93fd..cf3727c872 100755 --- a/module/executionnode/config.php +++ b/module/executionnode/config.php @@ -20,24 +20,6 @@ $config->executionnode->os->cpu['8'] = '8'; $config->executionnode->os->cpu['12'] = '12'; $config->executionnode->os->cpu['16'] = '16'; -$config->executionnode->os->memory = array(); -$config->executionnode->os->memory['512'] = '512MB'; -$config->executionnode->os->memory['1024'] = '1GB'; -$config->executionnode->os->memory['2048'] = '2GB'; -$config->executionnode->os->memory['4096'] = '4GB'; -$config->executionnode->os->memory['9120'] = '8GB'; -$config->executionnode->os->memory['16384'] = '16GB'; - -$config->executionnode->os->disk = array(); -$config->executionnode->os->disk['10240'] = '10GB'; -$config->executionnode->os->disk['20480'] = '20GB'; -$config->executionnode->os->disk['40960'] = '40GB'; -$config->executionnode->os->disk['61440'] = '60GB'; -$config->executionnode->os->disk['81920'] = '80GB'; -$config->executionnode->os->disk['102400'] = '100GB'; -$config->executionnode->os->disk['204800'] = '200GB'; -$config->executionnode->os->disk['307200'] = '300GB'; - $config->executionnode->os->type = array(); $config->executionnode->os->type['windows']['winServer'] = 'Windows Server'; $config->executionnode->os->type['windows']['win11'] = 'Windows 11'; @@ -49,21 +31,21 @@ $config->executionnode->os->type['linux']['centos'] = 'CentOS'; $config->executionnode->os->type['linux']['debian'] = 'Debian'; global $lang; -$config->executionnode->search['module'] = 'vm'; +$config->executionnode->search['module'] = 'executionnode'; $config->executionnode->search['fields']['name'] = $lang->executionnode->name; $config->executionnode->search['fields']['osType'] = $lang->executionnode->osType; $config->executionnode->search['fields']['osVersion'] = $lang->executionnode->osVersion; $config->executionnode->search['fields']['hostID'] = $lang->executionnode->hostName; $config->executionnode->search['fields']['status'] = $lang->executionnode->status; $config->executionnode->search['fields']['osCpu'] = $lang->executionnode->cpu; -$config->executionnode->search['fields']['osMemory'] = $lang->executionnode->memory; -$config->executionnode->search['fields']['osDisk'] = $lang->executionnode->disk; +$config->executionnode->search['fields']['osMemory'] = $lang->executionnode->osMemory; +$config->executionnode->search['fields']['osDisk'] = $lang->executionnode->osDisk; $config->executionnode->search['fields']['macAddress'] = $lang->executionnode->macAddress; $config->executionnode->search['fields']['publicIP'] = $lang->executionnode->ip; $config->executionnode->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->executionnode->search['params']['osType'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->type['windows'] + $config->executionnode->os->type['linux']); -$config->executionnode->search['params']['hostID'] = array('operator' => '=', 'control' => 'select', 'values' => ''); -$config->executionnode->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->executionnode->statusList); -$config->executionnode->search['params']['osCpu'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->cpu); -$config->executionnode->search['params']['osMemory'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->memory); -$config->executionnode->search['params']['osDisk'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->disk); +$config->executionnode->search['params']['hostID'] = array('operator' => '=', 'control' => 'select', 'values' => ''); +$config->executionnode->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->executionnode->statusList); +$config->executionnode->search['params']['osCpu'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->cpu); +$config->executionnode->search['params']['osMemory'] = array('operator' => '=', 'control' => 'input', 'values' => ''); +$config->executionnode->search['params']['osDisk'] = array('operator' => '=', 'control' => 'input', 'values' => ''); diff --git a/module/executionnode/css/create.css b/module/executionnode/css/create.css new file mode 100644 index 0000000000..662cc09295 --- /dev/null +++ b/module/executionnode/css/create.css @@ -0,0 +1,3 @@ +#unit {padding: 0px !important; width:0px; border-left: 0px;} +.input-group-addon {border: 0px; width: 100px;} +#unit_chosen a {border-left: 0px; border-radius: 0 2px;} diff --git a/module/executionnode/lang/de.php b/module/executionnode/lang/de.php index 39fb89f920..0687a90e7c 100755 --- a/module/executionnode/lang/de.php +++ b/module/executionnode/lang/de.php @@ -25,8 +25,8 @@ $lang->executionnode->ip = 'IP'; $lang->executionnode->osArch = 'Arch'; $lang->executionnode->osLang = 'Language'; $lang->executionnode->cpu = 'CPU Cores'; -$lang->executionnode->memory = 'Memory Size'; -$lang->executionnode->disk = 'Disk Size'; +$lang->executionnode->osMemory = 'Memory Size'; +$lang->executionnode->osDisk = 'Disk Size'; $lang->executionnode->status = 'Status'; $lang->executionnode->macAddress = 'MAC'; $lang->executionnode->vnc = 'VNC Port'; diff --git a/module/executionnode/lang/en.php b/module/executionnode/lang/en.php index 39fb89f920..0687a90e7c 100755 --- a/module/executionnode/lang/en.php +++ b/module/executionnode/lang/en.php @@ -25,8 +25,8 @@ $lang->executionnode->ip = 'IP'; $lang->executionnode->osArch = 'Arch'; $lang->executionnode->osLang = 'Language'; $lang->executionnode->cpu = 'CPU Cores'; -$lang->executionnode->memory = 'Memory Size'; -$lang->executionnode->disk = 'Disk Size'; +$lang->executionnode->osMemory = 'Memory Size'; +$lang->executionnode->osDisk = 'Disk Size'; $lang->executionnode->status = 'Status'; $lang->executionnode->macAddress = 'MAC'; $lang->executionnode->vnc = 'VNC Port'; diff --git a/module/executionnode/lang/fr.php b/module/executionnode/lang/fr.php index 642e9a9623..2f87c20538 100755 --- a/module/executionnode/lang/fr.php +++ b/module/executionnode/lang/fr.php @@ -25,8 +25,8 @@ $lang->executionnode->ip = 'IP'; $lang->executionnode->osArch = 'Arch'; $lang->executionnode->osLang = 'Language'; $lang->executionnode->cpu = 'CPU Cores'; -$lang->executionnode->memory = 'Memory Size'; -$lang->executionnode->disk = 'Disk Size'; +$lang->executionnode->osMemory = 'Memory Size'; +$lang->executionnode->osDisk = 'Disk Size'; $lang->executionnode->status = 'Status'; $lang->executionnode->macAddress = 'MAC'; $lang->executionnode->vnc = 'VNC Port'; diff --git a/module/executionnode/lang/zh-cn.php b/module/executionnode/lang/zh-cn.php index 70d1c10c09..1bb1dc695a 100755 --- a/module/executionnode/lang/zh-cn.php +++ b/module/executionnode/lang/zh-cn.php @@ -25,8 +25,8 @@ $lang->executionnode->ip = 'IP'; $lang->executionnode->osArch = '架构'; $lang->executionnode->osLang = '系统语言'; $lang->executionnode->cpu = 'CPU核心数'; -$lang->executionnode->memory = '内存'; -$lang->executionnode->disk = '硬盘'; +$lang->executionnode->osMemory = '内存'; +$lang->executionnode->osDisk = '硬盘'; $lang->executionnode->status = '状态'; $lang->executionnode->macAddress = 'MAC地址'; $lang->executionnode->vnc = 'VNC端口'; diff --git a/module/executionnode/view/browse.html.php b/module/executionnode/view/browse.html.php index 87e28666c4..76db50882f 100755 --- a/module/executionnode/view/browse.html.php +++ b/module/executionnode/view/browse.html.php @@ -51,8 +51,8 @@