* Fix bug #30962,30965.

This commit is contained in:
tanghucheng
2022-12-16 15:15:42 +08:00
parent 06061a1b57
commit 3d3d9a3ef4
3 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -89,15 +89,17 @@ class zahostModel extends model
if(dao::isError()) return false;
$ping = $this->checkAddress($hostInfo->extranet);
if(!$ping)
{
return false;
}
$this->dao->update(TABLE_ZAHOST)->data($hostInfo, 'name')->autoCheck()
$this->dao->update(TABLE_ZAHOST)->data($hostInfo)->autoCheck()
->batchCheck('cpuCores,diskSize', 'gt', 0)
->batchCheck('diskSize,memory', 'float')
->where('id')->eq($hostID)->exec();
return common::createChanges($oldHost, $hostInfo);
}
@@ -224,7 +226,7 @@ class zahostModel extends model
->page($pager)
->fetchAll('name');
}
foreach($downloadedImageList as $image)
{
if($image->status == 'notDownloaded')
+1 -1
View File
@@ -69,7 +69,7 @@
<td class="status-<?php echo $host->status;?>"><?php echo zget($lang->host->statusList, $host->status);?></td>
<td><?php echo helper::isZeroDate($host->heartbeat) ? '' : $host->heartbeat;?></td>
<td class='c-actions'>
<?php $disabled = !empty($nodeList[$host->hostID]) ? '' : 'disabled';?>
<?php $disabled = !empty($nodeList[$host->hostID]) ? 'disabled' : '';?>
<?php $title = !empty($nodeList[$host->hostID]) ? $lang->zahost->delete : $lang->zahost->undeletedNotice;?>
<?php common::printIcon('zahost', 'edit', "hostID={$host->hostID}", $host, 'list');?>
<?php echo html::a($this->createLink('zahost', 'delete', "hostID={$host->id}"), '<i class="icon-trash"></i>', 'hiddenwin', "title='$title' class='btn $disabled'");;?>
+2 -2
View File
@@ -31,11 +31,11 @@
</tr>
<tr>
<th><?php echo $lang->zahost->name;?></th>
<td><?php echo html::input('name', $host->name, "class='form-control' disabled");?></td>
<td><?php echo html::input('name', $host->name, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->zahost->IP;?></th>
<td><?php echo html::input('extranet', $host->extranet, "class='form-control' disabled");?></td>
<td><?php echo html::input('extranet', $host->extranet, "class='form-control' readonly");?></td>
</tr>
<tr>
<th><?php echo $lang->zahost->cpuCores;?></th>