* Finish task #81388.
This commit is contained in:
@@ -395,6 +395,7 @@ class testcase extends control
|
||||
$this->loadModel('story');
|
||||
if(!empty($_POST))
|
||||
{
|
||||
if(!empty($_FILES['scriptFile'])) unset($_FILES['scriptFile']);
|
||||
$response['result'] = 'success';
|
||||
|
||||
setcookie('lastCaseModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
@@ -875,6 +876,8 @@ class testcase extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
if(!empty($_FILES['scriptFile'])) unset($_FILES['scriptFile']);
|
||||
|
||||
$changes = array();
|
||||
if($comment == false or $comment == 'false')
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#story_chosen .chosen-results > li.no-results {cursor: pointer;}
|
||||
#story_chosen .chosen-results > li.no-results:hover {color: #1a4f85; background-color: #ddd;}
|
||||
#story_chosen .chosen-results > li.no-results > span {font-weight: bold;}
|
||||
#type_chosen {display: table-cell;}
|
||||
|
||||
.row .col-sm-10 {width: 89%;}
|
||||
.row .col-sm-2 {padding-left: 0px; width: 11%;}
|
||||
@@ -42,4 +43,4 @@
|
||||
.pri-selector > .dropdown-menu {padding: 10px;}
|
||||
.stageBox {padding-left: 15px !important;}
|
||||
|
||||
#refresh {margin-left: 7px;}
|
||||
#refresh {margin-left: 7px;}
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
[lang^=en] .detail > table > tbody th, [lang^=fr] .detail > table > tbody th {width: 100px !important;}
|
||||
[lang^=de] .detail > table > tbody th {width: 125px !important;}
|
||||
.linkCaseTitle, .linkBugTitle {white-space: nowrap;}
|
||||
#type_chosen{display: table-cell;}
|
||||
|
||||
@@ -50,6 +50,16 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_POST['auto']))
|
||||
{
|
||||
$_POST['auto'] = 'auto';
|
||||
if($_POST['script']) $_POST['script'] = htmlentities($_POST['script']);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($_POST['script']);
|
||||
}
|
||||
|
||||
$now = helper::now();
|
||||
$status = $this->getStatus('create');
|
||||
$case = fixer::input('post')
|
||||
@@ -61,7 +71,7 @@ class testcaseModel extends model
|
||||
->setIF($this->app->tab == 'project', 'project', $this->session->project)
|
||||
->setIF($this->app->tab == 'execution', 'execution', $this->session->execution)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview,scriptFile,scriptName')
|
||||
->setDefault('story', 0)
|
||||
->cleanInt('story,product,branch,module')
|
||||
->join('stage', ',')
|
||||
@@ -81,6 +91,8 @@ class testcaseModel extends model
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
$caseID = $this->dao->lastInsertID();
|
||||
$this->config->dangers = '';
|
||||
$this->loadModel('file')->saveUpload('testcase', $caseID, 'autoscript', 'script', 'scriptName');
|
||||
$this->loadModel('file')->saveUpload('testcase', $caseID);
|
||||
$parentStepID = 0;
|
||||
$this->loadModel('score')->create('testcase', 'create', $caseID);
|
||||
@@ -830,6 +842,17 @@ class testcaseModel extends model
|
||||
|
||||
$version = $stepChanged ? $oldCase->version + 1 : $oldCase->version;
|
||||
|
||||
if(!empty($_POST['auto']))
|
||||
{
|
||||
$_POST['auto'] = 'auto';
|
||||
if($_POST['script']) $_POST['script'] = htmlentities($_POST['script']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST['auto'] = 'no';
|
||||
$_POST['script'] = '';
|
||||
}
|
||||
|
||||
$case = fixer::input('post')
|
||||
->add('id', $caseID)
|
||||
->add('version', $version)
|
||||
@@ -845,7 +868,7 @@ class testcaseModel extends model
|
||||
->setForce('status', $status)
|
||||
->cleanInt('story,product,branch,module')
|
||||
->stripTags($this->config->testcase->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('comment,steps,expects,files,labels,linkBug,stepType')
|
||||
->remove('comment,steps,expects,files,labels,linkBug,stepType,scriptFile,scriptName')
|
||||
->get();
|
||||
|
||||
$requiredFields = $this->config->testcase->edit->requiredFields;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<th class='w-100px'><?php echo $lang->testcase->product;?></th>
|
||||
<td class='required'><?php echo html::select('product', $products, '', "class='form-control picker-select' onchange='loadProduct(this.value)'");?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
$this->loadModel('file');
|
||||
$filesName = 'scriptFile';
|
||||
$labelsName = 'scriptName';
|
||||
$maxUploadSize = strtoupper(ini_get('upload_max_filesize'));
|
||||
$dangerFiles = 'zip';
|
||||
|
||||
js::set('scriptDangerExtensions', ',' . $dangerFiles . ',');
|
||||
js::set('maxUploadSize', $maxUploadSize);
|
||||
?>
|
||||
<div class="file-input-list" data-append-way="before" data-filedName="<?php echo $filesName;?>" data-provide="fileInputList" data-each-file-max-size="<?php echo $maxUploadSize; ?>" data-file-size-error="<?php echo sprintf($lang->file->errorFileSize, $maxUploadSize); ?>">
|
||||
<div class="file-input">
|
||||
<div class="file-input-edit input-group">
|
||||
<div class="input-group-cell"><i class="icon icon-paper-clip text-muted"></i></div>
|
||||
<input type="text" name="<?php echo $labelsName;?>[]" class="form-control file-editbox" placeholder="<?php echo $lang->file->title;?>">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-success file-name-confirm"><i class="icon icon-check"></i></button>
|
||||
<button type="button" class="btn btn-gray file-name-cancel"><i class="icon icon-close"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-input-normal input-group">
|
||||
<div class="input-group-cell"><i class="icon icon-paper-clip text-muted"></i></div>
|
||||
<div class="input-group-cell">
|
||||
<span class="file-title"></span>
|
||||
<small class="file-size muted"></small>
|
||||
</div>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="fileAction btn btn-link file-input-rename" title="<?php echo $lang->file->edit;?>"><i class='icon icon-pencil-alt'></i></button>
|
||||
<button type="button" class="fileAction btn btn-link file-input-delete" onclick="changeHidden()" title="<?php echo $lang->delete;?>"><i class='icon icon-trash'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" name="<?php echo $filesName;?>[]" onchange="checkDangerExtensions(this)" />
|
||||
</div>
|
||||
<button type="button" class="btn btn-link file-input-btn"><i class="icon icon-plus"></i> <?php echo $lang->file->addFile;?></button> <small class="muted"><?php echo sprintf($lang->file->maxUploadSize, $maxUploadSize);?></small>
|
||||
<input type="file" id="file-input-multiple" />
|
||||
<input type='hidden' name='script' id='scriptContent' value=''>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var totalSize = 0;
|
||||
maxUploadSize = unitConversion(maxUploadSize);
|
||||
|
||||
/**
|
||||
* Conversion unit to byte.
|
||||
*
|
||||
* @param string $maxUploadSize
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
function unitConversion(maxUploadSize)
|
||||
{
|
||||
var sizeOfString = maxUploadSize;
|
||||
if(sizeOfString.indexOf('K') != -1) maxUploadSize = parseFloat(maxUploadSize) * 1024;
|
||||
if(sizeOfString.indexOf('M') != -1) maxUploadSize = parseFloat(maxUploadSize) * 1024 * 1024;
|
||||
if(sizeOfString.indexOf('G') != -1) maxUploadSize = parseFloat(maxUploadSize) * 1024 * 1024 * 1024;
|
||||
return parseFloat(maxUploadSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check danger extension and file size.
|
||||
*
|
||||
* @param object $file
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkDangerExtensions(file)
|
||||
{
|
||||
var fileName = $(file).val();
|
||||
var index = fileName.lastIndexOf(".");
|
||||
var fileSize = $(file)[0].files[0].size;
|
||||
|
||||
totalSize += fileSize;
|
||||
|
||||
if(index >= 0)
|
||||
{
|
||||
extension = fileName.substr(index + 1);
|
||||
if(scriptDangerExtensions.lastIndexOf(',' + extension + ',') >= 0)
|
||||
{
|
||||
alert(<?php echo json_encode($this->lang->file->dangerFile);?>);
|
||||
$(file).val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(fileSize == 0)
|
||||
{
|
||||
alert(<?php echo json_encode($this->lang->file->fileContentEmpty);?>);
|
||||
$(file).val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(totalSize >= maxUploadSize)
|
||||
{
|
||||
alert(<?php echo json_encode(sprintf($lang->file->errorFileSize, $maxUploadSize));?>);
|
||||
totalSize -= fileSize;
|
||||
$(file).val('');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$('.autoScript .file-input-btn').addClass('hidden');
|
||||
$('.autoScript .muted').addClass('hide');
|
||||
|
||||
/* read file. */
|
||||
var reader = new FileReader();
|
||||
reader.readAsText($(file)[0].files[0], "UTF-8");
|
||||
reader.onload = function(evt){
|
||||
var fileString = evt.target.result;
|
||||
$('#scriptContent').val(fileString);
|
||||
}
|
||||
}
|
||||
|
||||
function changeHidden(){
|
||||
$('.autoScript .file-input-btn').removeClass('hidden');
|
||||
$('.autoScript .muted').removeClass('hide');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#file-input-multiple {display: none;}
|
||||
.file-input .file-editbox {max-width: 40%;}
|
||||
.file-input-list .input-group-btn {float: left}
|
||||
.fileAction {color: #0c64eb !important;}
|
||||
.backgroundColor {background: #eff5ff;}
|
||||
</style>
|
||||
@@ -194,7 +194,7 @@
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php if(!empty($productID)): ?>
|
||||
<div class='btn-group'>
|
||||
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe'", true, true)?>
|
||||
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
|
||||
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->zanode->automationTips;?>"></icon>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
|
||||
@@ -70,7 +70,12 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->type;?></th>
|
||||
<?php unset($lang->testcase->typeList['unit']);?>
|
||||
<td><?php echo html::select('type', $lang->testcase->typeList, $type, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php echo html::select('type', $lang->testcase->typeList, $type, "class='form-control chosen'");?>
|
||||
<div class="input-group-addon">
|
||||
<?php echo html::checkbox('auto', array('auto' => $lang->testcase->showAutoCase), '', "id='autocase' title='{$lang->testcase->showAutoCase}'");?>
|
||||
</div>
|
||||
</td>
|
||||
<?php if(strpos(",$showFields,", 'stage') !== false):?>
|
||||
<?php $hiddenStage = strpos(",$showFields,", 'stage') !== false ? '' : 'hidden';?>
|
||||
<td class="<?php echo $hiddenStage?> stageBox">
|
||||
@@ -81,6 +86,10 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr class='autoScript hide'>
|
||||
<th><?php echo $lang->testcase->autoScript;?></th>
|
||||
<td colspan='2'><?php include './buildscriptform.php';?></td>
|
||||
</tr>
|
||||
<?php $hiddenStory = strpos(",$showFields,", ',story,') !== false ? '' : 'hidden';?>
|
||||
<tr class="<?php echo $hiddenStory?> storyBox">
|
||||
<th><?php echo $lang->testcase->lblStory;?></th>
|
||||
@@ -148,16 +157,10 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
<?php if(!$this->testcase->forceNotReview()):?>
|
||||
<span class="input-group-addon"><?php echo html::checkbox('forceNotReview', $lang->testcase->forceNotReview, '', "id='forceNotReview0'");?></span>
|
||||
<?php endif;?>
|
||||
<div class="input-group-addon">
|
||||
<?php echo html::checkbox('auto', $lang->testcase->showAutoCase, '', "id='autocase' title='{$lang->testcase->showAutoCase}'");?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->autoScript;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.9&filesName=script');?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->precondition;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('precondition', $precondition, " rows='2' class='form-control'");?></td>
|
||||
@@ -274,4 +277,15 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('caseModule', $lang->testcase->module)?>
|
||||
<script>
|
||||
$(":checkbox[name^='auto']").on('click', function(){
|
||||
if($(this).attr('checked'))
|
||||
{
|
||||
$('.autoScript').removeClass('hide')
|
||||
}else
|
||||
{
|
||||
$('.autoScript').addClass('hide')
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -214,7 +214,16 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->type;?></th>
|
||||
<?php if($case->type != 'unit') unset($lang->testcase->typeList['unit']);?>
|
||||
<td><?php echo html::select('type', (array)$lang->testcase->typeList, $case->type, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php echo html::select('type', (array)$lang->testcase->typeList, $case->type, "class='form-control chosen'");?>
|
||||
<div class="input-group-addon">
|
||||
<?php echo html::checkbox('auto', array('auto' => $lang->testcase->showAutoCase), $case->auto, "id='autocase' title='{$lang->testcase->showAutoCase}'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='autoScript hide'>
|
||||
<th><?php echo $lang->testcase->autoScript;?></th>
|
||||
<td><?php include './buildscriptform.php';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stage;?></th>
|
||||
@@ -316,6 +325,24 @@ $(function()
|
||||
{
|
||||
$('#subNavbar [data-id=testcase]').addClass('active');
|
||||
$('#navbar [data-id=testcase]').addClass('active');
|
||||
checkScript();
|
||||
})
|
||||
|
||||
function checkScript()
|
||||
{
|
||||
var autoScript = $(":checkbox[name^='auto']");
|
||||
if(autoScript.attr('checked'))
|
||||
{
|
||||
$('.autoScript').removeClass('hide')
|
||||
}else
|
||||
{
|
||||
$('.autoScript').addClass('hide')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(":checkbox[name^='auto']").on('click', function(){
|
||||
checkScript();
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -24,7 +24,7 @@ js::import($jsRoot . 'misc/highlight/highlight.pack.js');
|
||||
</div>
|
||||
<div class="main-col repoCode main">
|
||||
<div class="content panel">
|
||||
<pre class="cpp"><?php echo trim(htmlSpecialString($case->script, defined('ENT_SUBSTITUTE') ? ENT_QUOTES | ENT_SUBSTITUTE : ENT_QUOTES));?></pre>
|
||||
<pre class="cpp"><?php echo $case->script;?></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<td class='w-120px'> #<?php echo $result->id?></td>
|
||||
<td class='w-180px'><?php echo $result->date;?></td>
|
||||
<?php if($result->node > 0):?>
|
||||
<td><?php echo sprintf($lang->testtask->runNode, zget($users, $result->lastRunner), $result->nodeName, !empty($result->ZTFResult) ? $lang->testtask->runCase : "<span class='span-warning'>{$lang->testtask->running}</span>") . " <span class=\"label label-badge\">{$lang->testtask->auto}</span>";?></td>
|
||||
<td><?php echo sprintf($lang->testtask->runNode, zget($users, $result->lastRunner), $result->nodeName, $lang->testtask->runCase) . " <span class=\"label label-badge\">{$lang->testtask->auto}</span>";?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo zget($users, $result->lastRunner) . ' ' . $lang->testtask->runCase;?></td>
|
||||
<?php endif;?>
|
||||
@@ -55,6 +55,9 @@
|
||||
<?php if($result->node == 0 || !empty($result->ZTFResult)):?>
|
||||
<strong class='result-testcase <?php echo $result->caseResult;?>'><?php echo $lang->testcase->resultList[$result->caseResult];?></strong>
|
||||
<?php endif;?>
|
||||
<?php if($result->node > 0 and empty($result->ZTFResult)):?>
|
||||
<strong class='span-warning'><?php echo $lang->testtask->running;?></strong>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='w-60px'><?php if(!empty($result->files)) echo html::a("#caseResult{$result->id}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?></td>
|
||||
<td class='w-50px text-center'><i class='collapse-handle icon-angle-down text-muted'></i></td>
|
||||
|
||||
@@ -12,7 +12,7 @@ $config->zahost->imageListUrl = 'https://pkg.qucheng.com/zenagent/list.json';
|
||||
|
||||
$config->zahost->cpuCoreList = [1 => 1, 2 => 2, 4 => 4, 6 => 6, 8 => 8, 10 => 10, 12 => 12, 16 => 16, 24 => 24, 32 => 32, 64 => 64];
|
||||
|
||||
$config->zahost->initBash = 'curl -sSL https://pkg.qucheng.com/zenagent/zagent.sh | bash /dev/stdin -k%s -z%s';
|
||||
$config->zahost->initBash = 'curl -sSL https://pkg.qucheng.com/zenagent/zagent.sh | bash /dev/stdin -k %s -z %s';
|
||||
|
||||
global $lang;
|
||||
$config->zahost->search['module'] = 'zahost';
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
.zahost-init{padding:15px;background: #f4f5f7;margin:10px 0;}
|
||||
.fail{color:red;}
|
||||
.dot-symbol{padding-right:10px;}
|
||||
#statusContainer{margin:10px 0;}
|
||||
#statusContainer{margin:0px 0px 10px 0px;}
|
||||
#checkServiceStatus{background-color:unset;}
|
||||
.service-check{margin-top: 0px;}
|
||||
|
||||
@@ -6,13 +6,18 @@ function ajaxGetServiceStatus()
|
||||
var resultData = JSON.parse(response);
|
||||
let html = "";
|
||||
let isSuccess = true
|
||||
var service = '';
|
||||
|
||||
for (let key in resultData.data) {
|
||||
if(key == 'kvm') service = 'KVM';
|
||||
if(key == 'nginx') service = 'Nginx';
|
||||
if(key == 'novnc') service = 'noVNC';
|
||||
if(key == 'websockify') service = 'Websockify';
|
||||
if(resultData.data[key] == 'ready'){
|
||||
html += "<div class='text-success'><span class='dot-symbol'>● </span><span>" + key + ' ' + zahostLang.init[resultData.data[key]] + "</span></div>"
|
||||
html += "<div class='text-success'><span class='dot-symbol'>● </span><span>" + service + ' ' + zahostLang.init[resultData.data[key]] + "</span></div>"
|
||||
}else{
|
||||
isSuccess = false
|
||||
html += "<div class='text-danger'><span class='dot-symbol'>● </span><span>" + key + ' ' + zahostLang.init[resultData.data[key]] + "</span></div>"
|
||||
html += "<div class='text-danger'><span class='dot-symbol'>● </span><span>" + service + ' ' + zahostLang.init[resultData.data[key]] + "</span></div>"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ $lang->zahost->softwareList['kvm'] = 'KVM';
|
||||
$lang->zahost->unitList['GB'] = 'GB';
|
||||
$lang->zahost->unitList['TB'] = 'TB';
|
||||
|
||||
$lang->zahost->cpuUnit = 'CORE';
|
||||
|
||||
$lang->zahost->zaHostType = 'Type';
|
||||
$lang->zahost->zaHostTypeList['physical'] = 'Physical';
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ $lang->zahost->softwareList['kvm'] = 'KVM';
|
||||
$lang->zahost->unitList['GB'] = 'GB';
|
||||
$lang->zahost->unitList['TB'] = 'TB';
|
||||
|
||||
$lang->zahost->cpuUnit = 'CORE';
|
||||
|
||||
$lang->zahost->zaHostType = 'Type';
|
||||
$lang->zahost->zaHostTypeList['physical'] = 'Physical';
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ $lang->zahost->softwareList['kvm'] = 'KVM';
|
||||
$lang->zahost->unitList['GB'] = 'GB';
|
||||
$lang->zahost->unitList['TB'] = 'TB';
|
||||
|
||||
$lang->zahost->cpuUnit = 'CORE';
|
||||
|
||||
$lang->zahost->zaHostType = 'Type';
|
||||
$lang->zahost->zaHostTypeList['physical'] = 'Physical';
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ $lang->zahost->softwareList['kvm'] = 'KVM';
|
||||
$lang->zahost->unitList['GB'] = 'GB';
|
||||
$lang->zahost->unitList['TB'] = 'TB';
|
||||
|
||||
$lang->zahost->cpuUnit = '核';
|
||||
|
||||
$lang->zahost->zaHostType = '主机类型';
|
||||
$lang->zahost->zaHostTypeList['physical'] = '实体主机';
|
||||
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->zaHostType;?>:</div>
|
||||
<div class="col-7"><?php echo $lang->zahost->zaHostTypeList[$zahost->hostType];?></div>
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->cpuCores;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->cpuCores . $lang->zahost->cpuUnit;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->cpuCores;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->cpuCores;?></div>
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->zaHostType;?>:</div>
|
||||
<div class="col-7"><?php echo $lang->zahost->zaHostTypeList[$zahost->hostType];?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,14 +64,14 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->diskSize;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->diskSize;?></div>
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->memory;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->memory . $lang->zahost->unitList['GB'];;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->memory;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->memory;?></div>
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->vsoft;?>:</div>
|
||||
<div class="col-7"><?php echo zget($lang->zahost->softwareList, $zahost->vsoft);?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,8 +84,8 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="main-row">
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->vsoft;?>:</div>
|
||||
<div class="col-7"><?php echo zget($lang->zahost->softwareList, $zahost->vsoft);?></div>
|
||||
<div class="col-4 text-right"><?php echo $lang->zahost->diskSize;?>:</div>
|
||||
<div class="col-7"><?php echo $zahost->diskSize . $lang->zahost->unitList['GB'];?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@@ -103,12 +103,7 @@
|
||||
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span><?php echo $lang->zahost->init->checkStatus;?></span></button>
|
||||
</div>
|
||||
<div class="detail-content article-content">
|
||||
<div class="main-row zanode-mt-8">
|
||||
<div>在宿主机上安装必要服务后进行检测:</div>
|
||||
<div class="zahost-init">
|
||||
<textarea style="display:none;" id="initBash"><?php echo $initBash; ?></textarea>
|
||||
<?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>
|
||||
<div class="main-row">
|
||||
<div id="statusContainer">
|
||||
<div class="text-kvm"><span class="dot-symbol fail"> ●</span><span>KVM</span></div>
|
||||
<div class="text-kvm"><span class="dot-symbol fail"> ●</span><span>Nginx</span></div>
|
||||
|
||||
@@ -95,11 +95,11 @@
|
||||
|
||||
if($node->status == "shutoff")
|
||||
{
|
||||
common::printLink('zanode', 'start', "zanodeID={$node->id}", "<i class='icon icon-magic'></i> ", '', "class='btn '");
|
||||
common::printLink('zanode', 'start', "zanodeID={$node->id}", "<i class='icon icon-magic'></i> ", '', "class='btn ' title='{$lang->zanode->boot}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printLink('zanode', 'close', "zanodeID={$node->id}", "<i class='icon icon-off'></i> ", '', "class='btn '");
|
||||
common::printLink('zanode', 'close', "zanodeID={$node->id}", "<i class='icon icon-off'></i> ", '', "class='btn ' title='{$lang->zanode->shutdown}'");
|
||||
}
|
||||
|
||||
common::printLink('zanode', 'reboot', "zanodeID={$node->id}", "<i class='icon icon-restart'></i> ", '', $rebootAttr);
|
||||
|
||||
Reference in New Issue
Block a user