* Fix bug

This commit is contained in:
zhaoke
2022-11-14 08:55:33 +00:00
parent 223c86c6fd
commit bc1421d7b5
9 changed files with 24 additions and 10 deletions
+7 -1
View File
@@ -17,12 +17,18 @@ $(function()
$(document).on("change", '#imageID', function()
{
var imageID = $('#imageID').val();
var link = createLink('executionnode', 'ajaxGetImage', 'imageID=' + imageID);
var link = createLink('executionnode', 'ajaxGetImage', 'imageID=' + imageID);
$.get(link, function(data)
{
data = JSON.parse(data);
console.log(data);
$('#os').val(data.os);
if(data.memory != 0){
$('#memory').val(data.memory);
}
if(data.memory != 0){
$('#disk').val(data.disk);
}
});
});
+1 -1
View File
@@ -8,7 +8,7 @@ $(function()
{
var resultData = JSON.parse(response);
var options = '';
if(resultData.result == 'success')
if(resultData.result == 'success' && typeof resultData.data == 'object')
{
resultData.data.forEach(function(item)
{
+5 -1
View File
@@ -16,8 +16,12 @@ $('#checkServiceStatus').click(function(){
if(isSuccess){
html += '<h4>' + zahostLang.initHost.initSuccessNotice + '</h4>'
$('#jumpToImageList').removeAttr('disabled');
$('#jumpToImageList').attr('href', createLink('zahost', 'browseImage', 'hostID=' + hostID));
}else{
html += '<h4><div><span class="dot-symbol">' + zahostLang.initHost.initFailNotice + '</span></div><a href="https://github.com/easysoft/zenagent/" target="_blank">https://github.com/easysoft/zenagent/</a></h4>'
html += '<h4 style="margin-top:20px;">' + zahostLang.initHost.initFailNoticeTitle + '</h4>';
html += '<div><span class="dot-symbol">' + zahostLang.initHost.initFailNoticeDesc + '<a href="https://github.com/easysoft/zenagent/" target="_blank">https://github.com/easysoft/zenagent/</a></span></div>'
$('#jumpToImageList').attr('disabled', 'disabled')
}
$('#statusContainer').html(html)
});
+2 -1
View File
@@ -46,7 +46,8 @@ $lang->zahost->initHost->not_available = "Installed, Not Started";
$lang->zahost->initHost->ready = "Ready";
$lang->zahost->initHost->next = "Next";
$lang->zahost->initHost->initSuccessNotice = "The initialization was successful, click Next to complete the next steps.";
$lang->zahost->initHost->initFailNotice = "Initialization failed, check the init script execution log and try the following two solutions:<br/>1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
$lang->zahost->initHost->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->serviceStatus = [
"kvm" => 'not_install',
"novnc" => 'not_install',
+2 -1
View File
@@ -46,7 +46,8 @@ $lang->zahost->initHost->not_available = "Installed, Not Started";
$lang->zahost->initHost->ready = "Ready";
$lang->zahost->initHost->next = "Next";
$lang->zahost->initHost->initSuccessNotice = "The initialization was successful, click Next to complete the next steps.";
$lang->zahost->initHost->initFailNotice = "Initialization failed, check the init script execution log and try the following two solutions:<br/>1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
$lang->zahost->initHost->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->serviceStatus = [
"kvm" => 'not_install',
"novnc" => 'not_install',
+2 -1
View File
@@ -46,7 +46,8 @@ $lang->zahost->initHost->not_available = "Installed, Not Started";
$lang->zahost->initHost->ready = "Ready";
$lang->zahost->initHost->next = "Next";
$lang->zahost->initHost->initSuccessNotice = "The initialization was successful, click Next to complete the next steps.";
$lang->zahost->initHost->initFailNotice = "Initialization failed, check the init script execution log and try the following two solutions:<br/>1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
$lang->zahost->initHost->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->serviceStatus = [
"kvm" => 'not_install',
"novnc" => 'not_install',
+2 -1
View File
@@ -46,7 +46,8 @@ $lang->zahost->initHost->not_available = "Installed, Not Started";
$lang->zahost->initHost->ready = "Ready";
$lang->zahost->initHost->next = "Next";
$lang->zahost->initHost->initSuccessNotice = "The initialization was successful, click Next to complete the next steps.";
$lang->zahost->initHost->initFailNotice = "Initialization failed, check the init script execution log and try the following two solutions:<br/>1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
$lang->zahost->initHost->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
$lang->zahost->initHost->serviceStatus = [
"kvm" => 'not_install',
"novnc" => 'not_install',
+2 -1
View File
@@ -48,7 +48,8 @@ $lang->zahost->initHost->ready = "已就绪";
$lang->zahost->initHost->next = "下一步";
$lang->zahost->initHost->initSuccessNotice = "初始化成功,请点击下一步完成后续操作。";
$lang->zahost->initHost->initFailNotice = "初始化失败,请查看初始化脚本执行日志并尝试以下两种解决方案:<br/>1. 重新执行脚本 <br/>2. 查看初始化常见问题";
$lang->zahost->initHost->initFailNoticeTitle = "初始化失败,请查看初始化脚本执行日志并尝试以下两种解决方案:";
$lang->zahost->initHost->initFailNoticeDesc = "1. 重新执行脚本 <br/>2. 查看初始化常见问题";
$lang->zahost->initHost->serviceStatus = [
"kvm" => 'not_install',
"novnc" => 'not_install',
+1 -2
View File
@@ -32,8 +32,7 @@
<div class="text-center host-action">
<button type='button' id='checkServiceStatus' class='btn btn-info margin-top-18'><?php echo $lang->zahost->initHost->checkStatus; ?></button>
<!-- <a href="" class='btn btn-primary margin-top-18'><?php echo $lang->zahost->initHost->next; ?></a> -->
<?php echo html::a($this->createLink('zahost', 'browseImage', "hostID={$hostID}"), $lang->zahost->initHost->next, '', "title='{$lang->zahost->initHost->next}' class='btn btn-primary margin-top-18'");?>
<?php echo html::a($this->createLink('zahost', 'browseImage', "hostID={$hostID}"), $lang->zahost->initHost->next, '', "title='{$lang->zahost->initHost->next}' class='btn btn-primary margin-top-18' disabled='disabled' id='jumpToImageList'");?>
</div>
</div>
</div>