* Fix bug for createimage.

This commit is contained in:
tanghucheng
2022-12-05 14:16:34 +08:00
parent 928048133f
commit 97746df372
6 changed files with 18 additions and 7 deletions
+2 -1
View File
@@ -51,8 +51,9 @@ $lang->zanode->empty = 'No zanode is found';
$lang->zanode->empty = 'No Execution Node';
$lang->zanode->createImaging = 'Creating';
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node. <a href="%s">Created</a>';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
+2 -1
View File
@@ -51,8 +51,9 @@ $lang->zanode->empty = 'No zanode is found';
$lang->zanode->empty = 'No Execution Node';
$lang->zanode->createImaging = 'Creating';
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node. <a href="%s">Created</a>';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
+2 -1
View File
@@ -51,8 +51,9 @@ $lang->zanode->empty = 'No zanode is found';
$lang->zanode->empty = 'No Execution Node';
$lang->zanode->createImaging = 'Creating';
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node. <a href="%s">Created</a>';
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
+2 -1
View File
@@ -51,8 +51,9 @@ $lang->zanode->empty = '暂时没有执行节点';
$lang->zanode->createImage = '创建镜像';
$lang->zanode->createImaging = '正在创建镜像';
$lang->zanode->createImageNotice = '系统将基于当前执行节点创建镜像,该过程需要关闭该执行节点,确定要继续么?';
$lang->zanode->createImageSuccess = '镜像创建成功,您可以使用此镜像创建执行节点。<a href="%s">去创建</a>';
$lang->zanode->createImageSuccess = '镜像创建成功,您可以使用此镜像创建执行节点。';
$lang->zanode->createImageFail = '镜像创建失败';
$lang->zanode->createImageButton = '去创建';
$lang->zanode->imageNameEmpty = '名称不能为空';
+1 -1
View File
@@ -125,7 +125,7 @@ class zanodemodel extends model
$image = $this->getImageByID($node->image);
$newImage = new stdClass();
$newImage->host = $node->host;
$newImage->host = $node->id;
$newImage->name = $data->name;
$newImage->status = 'created';
$newImage->osName = $node->osName;
+9 -2
View File
@@ -31,8 +31,8 @@
<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>
</div>
<?php $link = helper::createLink('zanode', 'create');?>
<h6 class='hide text-center success'><?php echo sprintf($lang->zanode->createImageSuccess, $link);?></h6>
<?php helper::createLink('zanode', 'create');?>
<h6 class='hide text-center success'><?php echo $lang->zanode->createImageSuccess . html::a(inLink('create'), $lang->zanode->createImageButton, "_parent");?></h6>
<h6 class='hide text-center fail'><?php echo $lang->zanode->createImageFail;?></h6>
<?php else:?>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
@@ -59,6 +59,13 @@
<script>
var setProgress = self.setInterval("getTaskProgress()",500);
$(function()
{
var href = $('.success').find('a').attr('href');
href = href.replace('?onlybody=yes', '');
$('.success').find('a').attr('href', href);
})
function getTaskProgress()
{
var url = createLink('zanode', 'ajaxGetTaskStatus', 'extranet=' + extranet + '&taskID=' + taskID + '&type=exportVm');