* Fix issue.
This commit is contained in:
@@ -27,8 +27,8 @@ function updateProgress() {
|
||||
$('.image-download-' + imageID).addClass('disabled');
|
||||
$('.image-cancel-' + imageID).removeClass('disabled');
|
||||
}
|
||||
else if (statusList[imageID].statusCode == 'completed')
|
||||
{
|
||||
else if (statusList[imageID].statusCode == 'completed')
|
||||
{
|
||||
$('.image-path-' + imageID).text(statusList[imageID].path);
|
||||
$('.image-path-' + imageID).attr('title', statusList[imageID].path);
|
||||
$('.image-download-' + imageID).addClass('disabled');
|
||||
@@ -45,7 +45,7 @@ function updateProgress() {
|
||||
$('.image-progress-' + imageID).text('');
|
||||
}
|
||||
$('.image-status-' + imageID).text(statusList[imageID].status);
|
||||
if(statusList[imageID].progress != '')
|
||||
if(statusList[imageID].progress != '' && statusList[imageID].statusCode != 'completed')
|
||||
{
|
||||
$('.image-progress-' + imageID).text(statusList[imageID].progress);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<td><?php echo $image->osName;?></td>
|
||||
<td class='image-status-<?php echo zget($image, 'id', 0);?>'><?php echo zget($lang->zahost->image->statusList, $image->status, '');?></td>
|
||||
<td title="<?php echo $path;?>" class='image-path-<?php echo zget($image, 'id', 0);?>'><?php echo $path?></td>
|
||||
<td class="image-progress-<?php echo zget($image, 'id', 0);?>"><?php echo $image->status == 'completed' ? '100%' : '';?></td>
|
||||
<td class="image-progress-<?php echo zget($image, 'id', 0);?>"></td>
|
||||
<td class='c-actions'>
|
||||
<?php if(common::hasPriv('zahost', 'downloadImage')) echo html::a($this->createLink('zahost', 'downloadImage', "hostID={$hostID}&imageID={$image->id}"), '<i class="icon-download"></i>', 'hiddenwin', zget($image, 'downloadMisc', ''));?>
|
||||
<?php if(common::hasPriv('zahost', 'cancelDownload')) echo html::a($this->createLink('zahost', 'cancelDownload', "id={$image->id}"), '<i class="icon-ban-circle"></i>', 'hiddenwin', zget($image, 'cancelMisc', ''));?>
|
||||
|
||||
@@ -327,18 +327,18 @@ class zanodemodel extends model
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
|
||||
$hostIDList = array_column($list, 'parent');
|
||||
$hosts = $this->dao->select('id,status,heartbeat')->from(TABLE_ZAHOST)
|
||||
->where('id')->in(array_unique($hostIDList))
|
||||
->fetchAll('id');
|
||||
|
||||
|
||||
foreach($list as $l)
|
||||
{
|
||||
$host = zget($hosts, $l->parent);
|
||||
if($l->status == 'running' || $l->status == 'ready')
|
||||
{
|
||||
if(empty($host))
|
||||
if(empty($host))
|
||||
{
|
||||
$l->status = self::STATUS_SHUTOFF;
|
||||
continue;
|
||||
@@ -548,7 +548,7 @@ class zanodemodel extends model
|
||||
->where('mac')->eq($mac)
|
||||
->andWhere("type")->eq('node')
|
||||
->fetch();
|
||||
|
||||
|
||||
$host = $this->loadModel("zahost")->getByID($node->parent);
|
||||
if($node->status == 'running' || $node->status == 'ready')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user