Merge branch 'zenops_46_tanghucheng' into zenops_46
This commit is contained in:
@@ -1237,6 +1237,8 @@ $lang->resource->zanode->reboot = 'reboot';
|
||||
$lang->resource->zanode->suspend = 'suspend';
|
||||
$lang->resource->zanode->resume = 'resume';
|
||||
$lang->resource->zanode->getVNC = 'getVNC';
|
||||
$lang->resource->zanode->start = 'boot';
|
||||
$lang->resource->zanode->close = 'shutdown';
|
||||
|
||||
$lang->zanode->methodOrder[5] = 'browse';
|
||||
$lang->zanode->methodOrder[10] = 'create';
|
||||
@@ -1245,6 +1247,8 @@ $lang->zanode->methodOrder[20] = 'reboot';
|
||||
$lang->zanode->methodOrder[35] = 'suspend';
|
||||
$lang->zanode->methodOrder[30] = 'resume';
|
||||
$lang->zanode->methodOrder[35] = 'getVNC';
|
||||
$lang->zanode->methodOrder[40] = 'start';
|
||||
$lang->zanode->methodOrder[45] = 'close';
|
||||
|
||||
$lang->resource->repo = new stdclass();
|
||||
$lang->resource->repo->browse = 'browseAction';
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
#statusContainer{margin:0px 0px 10px 0px;}
|
||||
#checkServiceStatus{background-color:unset;}
|
||||
.service-check{margin-top: 0px;}
|
||||
.checkStatus{color: #313c52;}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<div class="detail zahost-detail">
|
||||
<div class="detail-title">
|
||||
<?php echo $lang->zahost->init->statusTitle;?>
|
||||
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span><?php echo $lang->zahost->init->checkStatus;?></span></button>
|
||||
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span class='checkStatus'><?php echo $lang->zahost->init->checkStatus;?></span></button>
|
||||
</div>
|
||||
<div class="detail-content article-content">
|
||||
<div class="main-row">
|
||||
@@ -116,6 +116,7 @@
|
||||
<div class='hide init-success'><?php echo sprintf($lang->zahost->init->initSuccessNotice, $imageLink, $createNode);?></div>
|
||||
<div class='hide init-fail'>
|
||||
<?php echo $lang->zahost->init->initFailNotice;?>
|
||||
<textarea style="display:none;" id="initBash"><?php echo $initBash; ?></textarea>
|
||||
<div class="zahost-init">
|
||||
<?php echo "$initBash <button type='button' class='btn btn-info btn-mini btn-init-copy'><i class='icon-common-copy icon-copy' title='" . $lang->zahost->copy . "'></i></button>"; ?>
|
||||
</div>
|
||||
|
||||
@@ -399,6 +399,11 @@ class zanode extends control
|
||||
{
|
||||
$node = $this->zanode->getNodeById($hostID);
|
||||
$serviceStatus = $this->zanode->getServiceStatus($node);
|
||||
if ($node->status != 'running' && $node->status != 'wait')
|
||||
{
|
||||
$serviceStatus['ZenAgent'] = "unknown";
|
||||
$serviceStatus['ZTF'] = "unknown";
|
||||
}
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => '', 'data' => $serviceStatus));
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
.zanode-status-text i{color:#18a6fd}
|
||||
.status-notice{margin-top: 8px;margin-left: 18px;line-height: 28px;}
|
||||
.status-notice a{color: #2463c7;}
|
||||
.service-status a{color: #2463c7;}
|
||||
.service-status{margin-top: 10px;}
|
||||
.vnc-detail{min-height: 60vh;}
|
||||
.vnc-mask{width: 100%;height:100%;background-color: rgba(0,0,0,0);position: absolute;}
|
||||
.vnc-mask{width: 100%;height:100%;background-color: rgba(0,0,0,0);position: absolute;}
|
||||
#checkServiceStatus{background-color:unset;}
|
||||
.checkStatus{color: #313c52;}
|
||||
+126
-2
@@ -1,7 +1,131 @@
|
||||
var ifm = document.getElementById("vncIframe");
|
||||
ifm.height=$('.vnc-detail').css('height')
|
||||
$('.vnc-mask').click(function(){
|
||||
window.open(vncLink)
|
||||
window.open(createLink('zanode', 'getVNC', "id=" + nodeID))
|
||||
})
|
||||
$('.vnc-mask').css('width', $('.vnc-detail').css('width'));
|
||||
$('.vnc-mask').css('height', $('.vnc-detail').css('height'));
|
||||
$('.vnc-mask').css('height', $('.vnc-detail').css('height'));
|
||||
|
||||
|
||||
$('#checkServiceStatus').click(function(){
|
||||
$.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response)
|
||||
{
|
||||
var resultData = JSON.parse(response);
|
||||
var isSuccess = true
|
||||
|
||||
for (var key in resultData.data)
|
||||
{
|
||||
if(key == "ZTF")
|
||||
{
|
||||
if(resultData.data[key] == 'ready')
|
||||
{
|
||||
$('.dot-ztf').removeClass("text-danger")
|
||||
$('.dot-ztf').addClass("text-success")
|
||||
}
|
||||
else{
|
||||
$('.dot-ztf').removeClass("text-success")
|
||||
$('.dot-ztf').addClass("text-danger")
|
||||
}
|
||||
|
||||
if(resultData.data[key] == 'ready' || resultData.data[key] == 'not_available')
|
||||
{
|
||||
$('.ztf-status').text(zanodeLang.init[resultData.data[key]])
|
||||
$('.ztf-install').text(zanodeLang.reinstall);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(resultData.data[key] == 'unknown')
|
||||
{
|
||||
$('.ztf-status').text(zanodeLang.init.unknown)
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.ztf-status').text(zanodeLang.initializing)
|
||||
}
|
||||
$('.ztf-install').text(zanodeLang.install);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(resultData.data[key] == 'ready')
|
||||
{
|
||||
$('.dot-zenagent').removeClass("text-danger")
|
||||
$('.dot-zenagent').addClass("text-success")
|
||||
}
|
||||
else{
|
||||
$('.dot-zenagent').removeClass("text-success")
|
||||
$('.dot-zenagent').addClass("text-danger")
|
||||
}
|
||||
$('.zenagent-status').text(zanodeLang.init[resultData.data[key]])
|
||||
if(resultData.data[key] == 'ready')
|
||||
{
|
||||
$('.node-init-install').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(resultData.data[key] == 'unknown')
|
||||
{
|
||||
$('.ztf-zenagent').text(zanodeLang.init.unknown)
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.zenagent-status').text(zanodeLang.initializing)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(resultData.data[key] !== 'ready')
|
||||
{
|
||||
isSuccess = false
|
||||
}
|
||||
};
|
||||
|
||||
if(!isSuccess)
|
||||
{
|
||||
// $('.init-fail').show();
|
||||
$('.init-success').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.init-success').show();
|
||||
// $('.init-fail').hide();
|
||||
}
|
||||
});
|
||||
return
|
||||
})
|
||||
|
||||
$('.node-init-install').on('click', function(){
|
||||
$(this).addClass('load-indicator loading');
|
||||
var link = $(this).data('href')
|
||||
$.get(link, function(response)
|
||||
{
|
||||
$(this).removeClass('load-indicator');
|
||||
$(this).removeClass('loading');
|
||||
$('#checkServiceStatus').trigger("click")
|
||||
})
|
||||
})
|
||||
|
||||
$('.btn-init-copy').live('click', function()
|
||||
{
|
||||
var copyText = $('#initBash');
|
||||
copyText.show();
|
||||
copyText .select();
|
||||
document.execCommand("Copy");
|
||||
copyText.hide();
|
||||
$('.btn-init-copy').tooltip({
|
||||
trigger: 'click',
|
||||
placement: 'bottom',
|
||||
title: zanodeLang.copied,
|
||||
tipClass: 'tooltip-success'
|
||||
});
|
||||
|
||||
$(this).tooltip('show');
|
||||
var that = this;
|
||||
setTimeout(function()
|
||||
{
|
||||
$(that).tooltip('hide')
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
$(function(){
|
||||
$('#checkServiceStatus').trigger("click")
|
||||
})
|
||||
@@ -22,7 +22,7 @@ $lang->zanode->start = 'Start After Created';
|
||||
$lang->zanode->hostName = 'Host Name';
|
||||
$lang->zanode->host = $lang->zanode->hostName;
|
||||
$lang->zanode->extranet = 'IP/Domain';
|
||||
$lang->zanode->sshAddress = 'SSH Address';
|
||||
$lang->zanode->sshAddress = 'SSH Command';
|
||||
$lang->zanode->osArch = 'Arch';
|
||||
$lang->zanode->cpuCores = 'CPU';
|
||||
$lang->zanode->defaultUser = 'Default Account Name';
|
||||
@@ -48,9 +48,11 @@ $lang->zanode->scriptPath = "Script path";
|
||||
$lang->zanode->shell = "Shell";
|
||||
$lang->zanode->automation = "Automation";
|
||||
$lang->zanode->install = "Install";
|
||||
$lang->zanode->reinstall = "Reinstall";
|
||||
$lang->zanode->copy = 'Click to copy';
|
||||
$lang->zanode->copied = 'Copy successful';
|
||||
$lang->zanode->manual = 'Manual';
|
||||
$lang->zanode->initializing = 'Initializing';
|
||||
|
||||
$lang->automation = new stdClass();
|
||||
$lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
@@ -99,6 +101,7 @@ $lang->zanode->init = new stdclass;
|
||||
$lang->zanode->init->statusTitle = "Service Status";
|
||||
$lang->zanode->init->checkStatus = "Check Service Status";
|
||||
$lang->zanode->init->not_install = "Not installed";
|
||||
$lang->zanode->init->unknown = "Unknown";
|
||||
$lang->zanode->init->not_available = "Installed, Not Started";
|
||||
$lang->zanode->init->ready = "Ready";
|
||||
$lang->zanode->init->next = "Next";
|
||||
|
||||
@@ -22,7 +22,7 @@ $lang->zanode->start = 'Start After Created';
|
||||
$lang->zanode->hostName = 'Host Name';
|
||||
$lang->zanode->host = $lang->zanode->hostName;
|
||||
$lang->zanode->extranet = 'IP/Domain';
|
||||
$lang->zanode->sshAddress = 'SSH Address';
|
||||
$lang->zanode->sshAddress = 'SSH Command';
|
||||
$lang->zanode->osArch = 'Arch';
|
||||
$lang->zanode->cpuCores = 'CPU';
|
||||
$lang->zanode->defaultUser = 'Default Account Name';
|
||||
@@ -48,9 +48,11 @@ $lang->zanode->scriptPath = "Script path";
|
||||
$lang->zanode->shell = "Shell";
|
||||
$lang->zanode->automation = "Automation";
|
||||
$lang->zanode->install = "Install";
|
||||
$lang->zanode->reinstall = "Reinstall";
|
||||
$lang->zanode->copy = 'Click to copy';
|
||||
$lang->zanode->copied = 'Copy successful';
|
||||
$lang->zanode->manual = 'Manual';
|
||||
$lang->zanode->initializing = 'Initializing';
|
||||
|
||||
$lang->automation = new stdClass();
|
||||
$lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
@@ -99,6 +101,7 @@ $lang->zanode->init = new stdClass();
|
||||
$lang->zanode->init->statusTitle = "Service Status";
|
||||
$lang->zanode->init->checkStatus = "Check Service Status";
|
||||
$lang->zanode->init->not_install = "Not installed";
|
||||
$lang->zanode->init->unknown = "Unknown";
|
||||
$lang->zanode->init->not_available = "Installed, Not Started";
|
||||
$lang->zanode->init->ready = "Ready";
|
||||
$lang->zanode->init->next = "Next";
|
||||
|
||||
@@ -22,7 +22,7 @@ $lang->zanode->start = 'Start After Created';
|
||||
$lang->zanode->hostName = 'Host Name';
|
||||
$lang->zanode->host = $lang->zanode->hostName;
|
||||
$lang->zanode->extranet = 'IP/Domain';
|
||||
$lang->zanode->sshAddress = 'SSH Address';
|
||||
$lang->zanode->sshAddress = 'SSH Command';
|
||||
$lang->zanode->osArch = 'Arch';
|
||||
$lang->zanode->cpuCores = 'CPU';
|
||||
$lang->zanode->defaultUser = 'Default Account Name';
|
||||
@@ -48,9 +48,11 @@ $lang->zanode->scriptPath = "Script path";
|
||||
$lang->zanode->shell = "Shell";
|
||||
$lang->zanode->automation = "Automation";
|
||||
$lang->zanode->install = "Install";
|
||||
$lang->zanode->reinstall = "Reinstall";
|
||||
$lang->zanode->copy = 'Click to copy';
|
||||
$lang->zanode->copied = 'Copy successful';
|
||||
$lang->zanode->manual = 'Manual';
|
||||
$lang->zanode->initializing = 'Initializing';
|
||||
|
||||
$lang->automation = new stdClass();
|
||||
$lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
@@ -99,6 +101,7 @@ $lang->zanode->init = new stdclass;
|
||||
$lang->zanode->init->statusTitle = "Service Status";
|
||||
$lang->zanode->init->checkStatus = "Check Service Status";
|
||||
$lang->zanode->init->not_install = "Not installed";
|
||||
$lang->zanode->init->unknown = "Unknown";
|
||||
$lang->zanode->init->not_available = "Installed, Not Started";
|
||||
$lang->zanode->init->ready = "Ready";
|
||||
$lang->zanode->init->next = "Next";
|
||||
|
||||
@@ -10,7 +10,7 @@ $lang->zanode->destroy = '销毁执行节点';
|
||||
$lang->zanode->boot = '启动执行节点';
|
||||
$lang->zanode->reboot = '重启执行节点';
|
||||
$lang->zanode->shutdown = '关闭执行节点';
|
||||
$lang->zanode->resume = '启动执行节点';
|
||||
$lang->zanode->resume = '恢复执行节点';
|
||||
$lang->zanode->getVNC = '远程管理';
|
||||
$lang->zanode->all = '全部';
|
||||
$lang->zanode->byQuery = '搜索';
|
||||
@@ -22,7 +22,7 @@ $lang->zanode->start = '创建后自动开启';
|
||||
$lang->zanode->hostName = '所属宿主机';
|
||||
$lang->zanode->host = $lang->zanode->hostName;
|
||||
$lang->zanode->extranet = 'IP/域名';
|
||||
$lang->zanode->sshAddress = 'SSH地址';
|
||||
$lang->zanode->sshAddress = 'SSH命令';
|
||||
$lang->zanode->osArch = '架构';
|
||||
$lang->zanode->cpuCores = 'CPU';
|
||||
$lang->zanode->defaultUser = '默认用户';
|
||||
@@ -48,9 +48,11 @@ $lang->zanode->scriptPath = "脚本目录";
|
||||
$lang->zanode->shell = "shell命令";
|
||||
$lang->zanode->automation = "自动化设置";
|
||||
$lang->zanode->install = "安装";
|
||||
$lang->zanode->reinstall = "重装";
|
||||
$lang->zanode->copy = '复制';
|
||||
$lang->zanode->copied = '复制成功';
|
||||
$lang->zanode->manual = '手册';
|
||||
$lang->zanode->initializing = '初始化中';
|
||||
|
||||
$lang->automation = new stdClass();
|
||||
$lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
@@ -80,7 +82,7 @@ $lang->zanode->publicList[0] = '不共享';
|
||||
$lang->zanode->publicList[1] = '共享';
|
||||
|
||||
$lang->zanode->statusList['created'] = '已创建';
|
||||
$lang->zanode->statusList['launch'] = '启动中';
|
||||
$lang->zanode->statusList['launch'] = '运行中';
|
||||
$lang->zanode->statusList['ready'] = '运行中';
|
||||
$lang->zanode->statusList['running'] = '运行中';
|
||||
$lang->zanode->statusList['suspend'] = '暂停';
|
||||
@@ -99,6 +101,7 @@ $lang->zanode->init = new stdclass;
|
||||
$lang->zanode->init->statusTitle = "服务状态";
|
||||
$lang->zanode->init->checkStatus = "检测服务状态";
|
||||
$lang->zanode->init->not_install = "未安装";
|
||||
$lang->zanode->init->unknown = "未知";
|
||||
$lang->zanode->init->not_available = "已安装,未启动";
|
||||
$lang->zanode->init->ready = "已就绪";
|
||||
$lang->zanode->init->next = "下一步";
|
||||
|
||||
@@ -353,7 +353,7 @@ class zanodemodel extends model
|
||||
|
||||
if(time() - strtotime($l->heartbeat) > 60)
|
||||
{
|
||||
$l->status = self::STATUS_LAUNCH;
|
||||
$l->status = 'wait';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -420,7 +420,7 @@ class zanodemodel extends model
|
||||
}
|
||||
elseif(time() - strtotime($node->heartbeat) > 60)
|
||||
{
|
||||
$node->status = self::STATUS_LAUNCH;
|
||||
$node->status = 'wait';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -530,7 +530,7 @@ class zanodemodel extends model
|
||||
}
|
||||
elseif(time() - strtotime($node->heartbeat) > 60)
|
||||
{
|
||||
$node->status = self::STATUS_LAUNCH;
|
||||
$node->status = 'wait';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ class zanodemodel extends model
|
||||
}
|
||||
elseif(time() - strtotime($node->heartbeat) > 60)
|
||||
{
|
||||
$node->status = self::STATUS_LAUNCH;
|
||||
$node->status = 'wait';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,15 +75,15 @@
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$suspendAttr = "title='{$lang->zanode->suspend}' target='hiddenwin'";
|
||||
$suspendAttr .= $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'";
|
||||
$suspendAttr .= $node->status != 'running' && $node->status != 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'";
|
||||
|
||||
$resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'";
|
||||
$resumeAttr .= $node->status == 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'";
|
||||
$resumeAttr .= $node->status == 'running' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'";
|
||||
|
||||
$rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'";
|
||||
$rebootAttr .= $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'";
|
||||
$rebootAttr .= $node->status == 'shutoff' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'";
|
||||
|
||||
common::printLink('zanode', 'getVNC', "id={$node->id}", "<i class='icon icon-desktop'></i> ", '_blank', "title='{$lang->zanode->getVNC}' class='btn desktop " . (in_array($node->status ,array('running', 'launch')) ? '':'disabled') . "'", '');
|
||||
common::printLink('zanode', 'getVNC', "id={$node->id}", "<i class='icon icon-desktop'></i> ", '_blank', "title='{$lang->zanode->getVNC}' class='btn desktop " . (in_array($node->status ,array('running', 'launch', 'wait')) ? '':'disabled') . "'", '');
|
||||
if($node->status == "suspend")
|
||||
{
|
||||
common::printLink('zanode', 'resume', "zanodeID={$node->id}", "<i class='icon icon-back'></i> ", '', $resumeAttr);
|
||||
@@ -108,7 +108,7 @@
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
|
||||
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
common::printLink('zanode', 'createImage', "zanodeID={$node->id}", "<i class='icon icon-export'></i> ", '', "class='btn btn-action iframe createImage' title='{$lang->zanode->createImage}' data-width='50%'", '', true);
|
||||
common::printLink('zanode', 'createImage', "zanodeID={$node->id}", "<i class='icon icon-export'></i> ", '', "class='btn btn-action iframe createImage' title='{$lang->zanode->createImage}' data-width='55%'", '', true);
|
||||
common::printIcon('zanode', 'init', "hostID={$node->id}", $node, 'list', 'refresh', '', 'btn btn-action init', false, "data-placement='bottom'", $lang->zanode->init->title);
|
||||
common::printLink('zanode', 'delete', "zanodeID={$node->id}", "<i class='icon icon-trash'></i> ", '', "title='{$lang->zanode->destroy}' class='btn btn-action' target='hiddenwin'");
|
||||
echo "</ul>";
|
||||
|
||||
@@ -40,13 +40,14 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->zanode->imageName;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->zanode->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='6' class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='6' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<td colspan='3' class='text-center'>
|
||||
<?php echo html::submitButton('', "onclick='if(confirm(\"{$lang->zanode->createImageNotice}\")==false) return false;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
<?php js::set('confirmReboot', $lang->zanode->confirmReboot) ?>
|
||||
<?php js::set('confirmShutdown', $lang->zanode->confirmShutdown) ?>
|
||||
<?php js::set('actionSuccess', $lang->zanode->actionSuccess) ?>
|
||||
<?php js::set('nodeID', $zanode->id) ?>
|
||||
<?php js::set('zanodeLang', $lang->zanode); ?>
|
||||
<?php js::set('vncLink', "http://$url/novnc?port=6080&path=websockify/?token=$token&password=pass") ?>
|
||||
<?php $browseLink = $this->session->zanodeList ? $this->session->zanodeList : $this->createLink('zanode', 'browse', ""); ?>
|
||||
<?php
|
||||
@@ -53,7 +55,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-3 text-right"><?php echo $lang->zanode->sshAddress; ?>:</div>
|
||||
<div class="col-8"><?php echo $account . '@' . $zanode->ip; ?></div>
|
||||
<div class="col-8">ssh <?php echo $account . '@' . $zanode->ip . ' -p ' . $zanode->ssh; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@@ -79,7 +81,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-3 text-right"><?php echo $lang->zanode->memory; ?>:</div>
|
||||
<div class="col-8"><?php echo $zanode->memory; ?></div>
|
||||
<div class="col-8"><?php echo $zanode->memory; ?>GB</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +101,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-3 text-right"><?php echo $lang->zanode->diskSize; ?>:</div>
|
||||
<div class="col-8"><?php echo $zanode->diskSize; ?></div>
|
||||
<div class="col-8"><?php echo $zanode->diskSize; ?>GB</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
@@ -125,12 +127,35 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
<div class='divider'></div>
|
||||
<?php
|
||||
if (empty($zanode->deleted)) {
|
||||
if ($zanode->status == "running") {
|
||||
common::printLink('zanode', 'suspend', "id={$zanode->id}", "<i class='icon icon-pause'></i> " . $lang->zanode->suspend, '', "title='{$lang->zanode->suspend}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'");
|
||||
} elseif ($zanode->status == "suspend") {
|
||||
common::printLink('zanode', 'resume', "id={$zanode->id}", "<i class='icon icon-restart'></i> " . $lang->zanode->resume, '', "title='{$lang->zanode->resume}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'");
|
||||
$suspendAttr = "title='{$lang->zanode->suspend}' target='hiddenwin'";
|
||||
$suspendAttr .= $zanode->status != 'running' && $zanode->status != 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'";
|
||||
|
||||
$resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'";
|
||||
$resumeAttr .= $zanode->status == 'running' || $zanode->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'";
|
||||
|
||||
$rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'";
|
||||
$rebootAttr .= $zanode->status == 'shutoff' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'";
|
||||
|
||||
common::printLink('zanode', 'getVNC', "id={$zanode->id}", "<i class='icon icon-desktop'></i> " . $lang->zanode->getVNC, '_blank', "title='{$lang->zanode->getVNC}' class='btn desktop " . (in_array($zanode->status ,array('running', 'launch', 'wait')) ? '':'disabled') . "'", '');
|
||||
if($zanode->status == "suspend")
|
||||
{
|
||||
common::printLink('zanode', 'resume', "zanodeID={$zanode->id}", "<i class='icon icon-back'></i> " . $lang->zanode->resume, '', $resumeAttr);
|
||||
}
|
||||
common::printLink('zanode', 'getVNC', "id={$zanode->id}", "<i class='icon icon-desktop'></i> " . $lang->zanode->getVNC, '_blank', "title='{$lang->zanode->getVNC}' class='btn " . (common::hasPriv('zanode', 'getVNC') && in_array($zanode->status, array('running', 'launch')) ? '' : 'disabled') . "'");
|
||||
else
|
||||
{
|
||||
common::printLink('zanode', 'suspend', "zanodeID={$zanode->id}", "<i class='icon icon-pause'></i> " . $lang->zanode->suspend, '', $suspendAttr);
|
||||
}
|
||||
|
||||
if($zanode->status == "shutoff")
|
||||
{
|
||||
common::printLink('zanode', 'start', "zanodeID={$zanode->id}", "<i class='icon icon-magic'></i> " . $lang->zanode->boot, '', "class='btn '");
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printLink('zanode', 'close', "zanodeID={$zanode->id}", "<i class='icon icon-off'></i> " . $lang->zanode->shutdown, '', "class='btn '");
|
||||
}
|
||||
|
||||
common::printLink('zanode', 'reboot', "zanodeID={$zanode->id}", "<i class='icon icon-restart'></i> " . $lang->zanode->reboot, '', $rebootAttr);
|
||||
}
|
||||
?>
|
||||
<div class='divider'></div>
|
||||
@@ -139,38 +164,41 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 side-col">
|
||||
<div class="cell">
|
||||
<div class="detail zanode-detail">
|
||||
<div class="detail-title status-container">
|
||||
<?php echo $lang->zanode->init->statusTitle; ?>
|
||||
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span class='checkStatus'><?php echo $lang->zanode->init->checkStatus;?></span></button>
|
||||
</div>
|
||||
<div class="detail-content statusContainer">
|
||||
<div class="service-status">
|
||||
<span class='dot-symbol dot-zenagent text-danger'>●</span>
|
||||
<span> ZenAgent
|
||||
<span class="zenagent-status"><?php echo $lang->zanode->initializing; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="service-status">
|
||||
<span class='dot-symbol dot-ztf text-danger'>●</span>
|
||||
<span> ZTF
|
||||
<span class="ztf-status"><?php echo $lang->zanode->initializing; ?></span>
|
||||
<a class='node-init-install hide' target='hiddenwin' herf='javascript:;' data-href='<?php echo $this->createLink('zanode', 'ajaxInstallService', 'nodeID=' . $zanode->id . '&service=ztf');?>'><i class="icon icon-download icon-sm"></i><span class="ztf-install"><?php echo $lang->zanode->install ?></span></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status-notice">
|
||||
<span class='init-success hide'><?php echo sprintf($lang->zanode->init->initSuccessNoticeTitle, "<a href=''>{$lang->zanode->manual}</a>", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?></span>
|
||||
<span class='init-fail hide'><?php echo $lang->zanode->init->initFailNoticeTitle . '<br/>' . $lang->zanode->init->initFailNoticeDesc;?></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="detail zanode-detail">
|
||||
<div class="detail-title"><?php echo $lang->zanode->desc; ?></div>
|
||||
<div class="detail-content article-content"><?php echo !empty($zanode->desc) ? htmlspecialchars_decode($zanode->desc) : $lang->noData; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='cell'><?php include '../../common/view/action.html.php'; ?></div>
|
||||
<div class="cell">
|
||||
<div class="detail zanode-detail">
|
||||
<div class="detail-title">
|
||||
<?php echo $lang->zanode->init->statusTitle; ?>
|
||||
<span class="zanode-status-text"><i class="icon icon-restart"></i><?php echo $lang->zanode->init->checkStatus; ?></span>
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
<div class="service-status">
|
||||
<span class='dot-symbol text-success'>●</span>
|
||||
<span> ZenAgent:
|
||||
<span class="zenagent-staus">已就绪</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="service-status">
|
||||
<span class='dot-symbol text-success'>●</span>
|
||||
<span> ZTF:
|
||||
<span class="zenagent-staus">已就绪</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status-notice">
|
||||
<?php echo sprintf($lang->zanode->init->initSuccessNoticeTitle, "<a href=''>{$lang->zanode->manual}</a>", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="detail zanode-detail">
|
||||
<div class="detail-title"><?php echo $lang->zanode->desc; ?></div>
|
||||
<div class="detail-content article-content"><?php echo !empty($zanode->desc) ? htmlspecialchars_decode($zanode->desc) : $lang->noData; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='mainActions' class='main-actions'>
|
||||
<?php common::printPreAndNext($browseLink); ?>
|
||||
|
||||
Reference in New Issue
Block a user