This commit is contained in:
zhaoke
2023-01-12 02:59:08 +00:00
parent f665030cb1
commit ef650485ee
14 changed files with 39 additions and 8 deletions
+13 -3
View File
@@ -15,6 +15,7 @@
<?php if($task):?>
<?php js::set('taskID', $task->task);?>
<?php js::set('nodeID', $node->id);?>
<?php js::set('zanodeLang', $lang->zanode); ?>
<style>.body-modal #mainContent{width:90%}
</style>
<?php endif;?>
@@ -26,7 +27,7 @@
</h2>
</div>
<?php if($task):?>
<h5 class='text-center'><?php echo $lang->zanode->createImaging;?></h5>
<h5 class='text-center status-title'><?php echo $lang->zanode->pending;?></h5>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success rate" role="progressbar" aria-valuenow="<?php echo $task->rate;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $task->rate;?>%">
</div>
@@ -82,8 +83,17 @@ function getTaskProgress()
if(rate == 1 || status == 'completed') rate = 1;
if(status == 'inprogress' && rate >= 1) rate = 0.97;
if(status == 'pending')
{
$('.status-title').text(zanodeLang.pending)
}
else
{
$('.status-title').text(zanodeLang.createImaging)
}
$('.rate').css('width', rate*100 + '%');
if(rate == 1 || (status != 'inprogress' && status != 'created'))
if(rate == 1 || (status != 'inprogress' && status != 'created' && status != 'pending'))
{
updateStatus(data);
clearInterval(setProgress);
@@ -99,7 +109,7 @@ function updateStatus(data)
$.post(url, postData, function(result)
{
if(data.status == 'completed') $('.success').removeClass('hide');
else $('.fail').removeClass('hide');
else $('.status-title').text(zanodeLang.createImageFail)
}, 'json');
}
</script>