* [task#125049, doing, 1h] Fix kvm node bug.
This commit is contained in:
@@ -12,7 +12,7 @@ $config->zanode->dtable->fieldList['name']['link'] = array('module' => 'zanode',
|
||||
|
||||
$config->zanode->dtable->fieldList['type']['name'] = 'hostType';
|
||||
$config->zanode->dtable->fieldList['type']['title'] = $lang->zahost->type;
|
||||
$config->zanode->dtable->fieldList['type']['map'] = array('physics' => $this->lang->zanode->typeList['physics'], 'physical' => $this->lang->zanode->typeList['node']);
|
||||
$config->zanode->dtable->fieldList['type']['map'] = array('physics' => $this->lang->zanode->typeList['physics'], '' => $this->lang->zanode->typeList['node']);
|
||||
$config->zanode->dtable->fieldList['type']['sortType'] = true;
|
||||
|
||||
$config->zanode->dtable->fieldList['extranet']['name'] = 'extranet';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function checkServiceStatus(){
|
||||
window.checkServiceStatus = function(){
|
||||
toggleLoading('#serviceContent', true);
|
||||
$.get($.createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response)
|
||||
{
|
||||
@@ -7,6 +7,9 @@ function checkServiceStatus(){
|
||||
|
||||
for (var key in resultData.data)
|
||||
{
|
||||
console.log(key)
|
||||
console.log(resultData.data[key])
|
||||
console.log(nodeStatus)
|
||||
if(key == "ZTF")
|
||||
{
|
||||
if(resultData.data[key] == 'ready')
|
||||
@@ -50,7 +53,7 @@ function checkServiceStatus(){
|
||||
{
|
||||
if(resultData.data[key] && zanodeLang.statusList[nodeStatus] != zanodeLang.statusList[resultData.data[key]])
|
||||
{
|
||||
window.location.reload();
|
||||
loadCurrentPage();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -97,11 +100,13 @@ function checkServiceStatus(){
|
||||
$('.init-success').removeClass('hidden');
|
||||
$('.init-fail').addClass('hidden');
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
toggleLoading('#serviceContent', false);
|
||||
$(".service-status, .status-notice").removeClass('hidden')
|
||||
}, 500);
|
||||
});
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@ $lang->zanode->statusList['suspend'] = 'Suspend';
|
||||
$lang->zanode->statusList['offline'] = 'Offline';
|
||||
$lang->zanode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->zanode->statusList['shutoff'] = 'Shutoff';
|
||||
$lang->zanode->statusList['shutodown'] = 'shutdown';
|
||||
$lang->zanode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
$lang->zanode->statusList['wait'] = 'Initializing';
|
||||
$lang->zanode->statusList['online'] = 'Online';
|
||||
|
||||
@@ -137,7 +137,6 @@ $lang->zanode->statusList['suspend'] = 'Suspend';
|
||||
$lang->zanode->statusList['offline'] = 'Offline';
|
||||
$lang->zanode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->zanode->statusList['shutoff'] = 'Shutoff';
|
||||
$lang->zanode->statusList['shutodown'] = 'shutdown';
|
||||
$lang->zanode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
$lang->zanode->statusList['wait'] = 'Initializing';
|
||||
$lang->zanode->statusList['online'] = 'Online';
|
||||
|
||||
@@ -137,7 +137,6 @@ $lang->zanode->statusList['suspend'] = 'Suspend';
|
||||
$lang->zanode->statusList['offline'] = 'Offline';
|
||||
$lang->zanode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->zanode->statusList['shutoff'] = 'Shutoff';
|
||||
$lang->zanode->statusList['shutodown'] = 'shutdown';
|
||||
$lang->zanode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
$lang->zanode->statusList['wait'] = 'Initializing';
|
||||
$lang->zanode->statusList['online'] = 'Online';
|
||||
|
||||
@@ -130,17 +130,16 @@ $lang->zanode->publicList[0] = '不共享';
|
||||
$lang->zanode->publicList[1] = '共享';
|
||||
|
||||
$lang->zanode->statusList['created'] = '已创建';
|
||||
$lang->zanode->statusList['launch'] = '运行中';
|
||||
$lang->zanode->statusList['ready'] = '运行中';
|
||||
$lang->zanode->statusList['launch'] = '启动中';
|
||||
$lang->zanode->statusList['ready'] = '就绪';
|
||||
$lang->zanode->statusList['running'] = '运行中';
|
||||
$lang->zanode->statusList['suspend'] = '休眠';
|
||||
$lang->zanode->statusList['offline'] = '离线';
|
||||
$lang->zanode->statusList['destroy'] = '已销毁';
|
||||
$lang->zanode->statusList['shutoff'] = '已关机';
|
||||
$lang->zanode->statusList['shutodown'] = '已关机';
|
||||
$lang->zanode->statusList['destroy_fail'] = '销毁失败';
|
||||
$lang->zanode->statusList['wait'] = '初始化中';
|
||||
$lang->zanode->statusList['online'] = '运行中';
|
||||
$lang->zanode->statusList['online'] = '在线';
|
||||
$lang->zanode->statusList['restoring'] = '还原中';
|
||||
$lang->zanode->statusList['creating_snap'] = '创建快照中';
|
||||
$lang->zanode->statusList['creating_img'] = '导出镜像中';
|
||||
|
||||
@@ -19,6 +19,8 @@ jsVar('webRoot', getWebRoot());
|
||||
$account = strpos(strtolower($zanode->osName), "windows") !== false ? $config->zanode->defaultWinAccount : $config->zanode->defaultAccount;
|
||||
$ssh = $zanode->hostType == 'physics' ? ('ssh ' . $zanode->extranet) : ($zanode->ssh ? 'ssh ' . $account . '@' . $zanode->ip . ' -p ' . $zanode->ssh : '');
|
||||
|
||||
$snapshotUrl = helper::createLink('zanode', 'browseSnapshot', "nodeID={$zanode->id}");
|
||||
|
||||
$mainActions = array();
|
||||
$commonActions = array();
|
||||
foreach($config->zanode->view->operateList as $operate)
|
||||
@@ -337,6 +339,7 @@ detailBody
|
||||
(
|
||||
sectionList
|
||||
(
|
||||
setID('baseInfoContent'),
|
||||
section
|
||||
(
|
||||
set::title($lang->zanode->baseInfo),
|
||||
@@ -364,6 +367,7 @@ detailBody
|
||||
),
|
||||
sectionList
|
||||
(
|
||||
setID('serviceContent'),
|
||||
div
|
||||
(
|
||||
setClass('text-lg font-bold'),
|
||||
@@ -373,7 +377,7 @@ detailBody
|
||||
setClass('ghost btn'),
|
||||
icon('refresh', setClass('text-primary')),
|
||||
$lang->zanode->init->checkStatus,
|
||||
on::click('checkServiceStatus')
|
||||
on::click()->call('window.checkServiceStatus')
|
||||
)
|
||||
),
|
||||
$zanode->hostType != 'physics' ? div
|
||||
@@ -418,7 +422,7 @@ detailBody
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('status-notice hide'),
|
||||
setClass('status-notice'),
|
||||
span
|
||||
(
|
||||
setClass('init-success hidden'),
|
||||
@@ -478,7 +482,7 @@ detailBody
|
||||
!empty($snapshotList) ? div
|
||||
(
|
||||
setID('snapshotList'),
|
||||
h::js('loadTarget("' . createLink('zanode', 'browseSnapshot', "nodeID={$zanode->id}") . '", "#snapshotList")')
|
||||
on::init()->do("$('#snapshotList').load('{$snapshotUrl}');"),
|
||||
) : $lang->noData
|
||||
) : null,
|
||||
floatToolbar
|
||||
|
||||
Reference in New Issue
Block a user