Merge remote-tracking branch 'origin/master' into zenops_46
This commit is contained in:
@@ -3204,7 +3204,7 @@ EOD;
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST')
|
||||
public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST', $timeout = 30)
|
||||
{
|
||||
global $lang, $app;
|
||||
if(!extension_loaded('curl'))
|
||||
@@ -3226,8 +3226,8 @@ EOD;
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
|
||||
curl_setopt($curl, CURLOPT_USERAGENT, 'Sae T OAuth2 v0.1');
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
curl_setopt($curl, CURLOPT_ENCODING, "");
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
|
||||
@@ -279,18 +279,18 @@ if($isCustomExport)
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->file->extension;?></th>
|
||||
<td><?php echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value) class="form-control"');?></td>
|
||||
<td><?php echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value) class="form-control chosen"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->file->encoding;?></th>
|
||||
<td><?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "class='form-control'" : "class='form-control'");?></td>
|
||||
<td><?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php $hide = isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'kanban') !== false ? 'style="display:none"' : '';?>
|
||||
<tr <?php echo $hide;?>>
|
||||
<th><?php echo $lang->file->exportRange;?></th>
|
||||
<td>
|
||||
<?php if(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'calendar') !== false) unset($lang->exportTypeList['selected']);?>
|
||||
<?php echo html::select('exportType', $lang->exportTypeList, 'all', "class='form-control'");?>
|
||||
<?php echo html::select('exportType', $lang->exportTypeList, 'all', "class='form-control chosen'");?>
|
||||
</td>
|
||||
<td class='checkbox part hidden'>
|
||||
<?php echo html::checkbox('part', array( 1 => $lang->file->batchExport), '', "onclick='setPart(this);'");?>
|
||||
|
||||
@@ -83,10 +83,11 @@ function createTab(filename, filepath)
|
||||
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
|
||||
var tabID = Base64.encode(filepath).replaceAll('=', '-');
|
||||
return {
|
||||
title: filename,
|
||||
id: tabID,
|
||||
type: 'iframe',
|
||||
url: createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath))))
|
||||
id: tabID,
|
||||
url: createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))),
|
||||
type: 'iframe',
|
||||
title: filename,
|
||||
forbidClose: isonlybody
|
||||
};
|
||||
}
|
||||
|
||||
@@ -105,6 +106,7 @@ $(document).ready(function()
|
||||
$('.btn-left').click(function() {arrowTabs('fileTabs', 1);});
|
||||
$('.btn-right').click(function() {arrowTabs('fileTabs', -2);});
|
||||
if(file) $('#fileTabs').tabs({tabs: [createTab(file['basename'], entry)]});
|
||||
if(isonlybody) $('#fileTabs .tab-nav-item .tab-nav-close').hide();
|
||||
|
||||
/**
|
||||
* Set pane height.
|
||||
|
||||
@@ -11,10 +11,11 @@ function createTab(filename, filepath)
|
||||
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
|
||||
var tabID = Base64.encode(filepath).replaceAll('=', '-');
|
||||
return {
|
||||
title: filename,
|
||||
id: tabID,
|
||||
type: 'iframe',
|
||||
url: createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath))))
|
||||
id: tabID,
|
||||
url: createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))),
|
||||
type: 'iframe',
|
||||
title: filename,
|
||||
forbidClose: isonlybody
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,6 +24,7 @@ $(function()
|
||||
$('.btn-left').click(function() {arrowTabs('fileTabs', 1);});
|
||||
$('.btn-right').click(function() {arrowTabs('fileTabs', -2);});
|
||||
$('#fileTabs').tabs({tabs: [createTab(file['basename'], entry)]});
|
||||
if(isonlybody) $('#fileTabs .tab-nav-item .tab-nav-close').hide();
|
||||
|
||||
/**
|
||||
* Set pane height.
|
||||
|
||||
@@ -10,6 +10,7 @@ js::set('diffs', $diffs);
|
||||
js::set('file', $file);
|
||||
js::set('entry', $entry);
|
||||
js::set('openedFiles', array($entry));
|
||||
js::set('isonlybody', isonlybody());
|
||||
js::set('urlParams', "repoID=$repoID&objectID=$objectID&entry=%s&oldRevision=$oldRevision&newRevision=$newRevision&showBug=$showBug&encoding=$encoding");
|
||||
?>
|
||||
<?php if(!isonlybody()):?>
|
||||
|
||||
+24
-20
@@ -98,26 +98,30 @@ class tutorialModel extends model
|
||||
{
|
||||
$product = $this->getProduct();
|
||||
$product->stories = array();
|
||||
$product->stories[0] = '';
|
||||
$product->stories[1] = 'draft';
|
||||
$product->stories[2] = 'reviewing';
|
||||
$product->stories[3] = 'active';
|
||||
$product->stories[4] = 'closed';
|
||||
$product->stories[5] = 'changing';
|
||||
$product->stories[''] = 0;
|
||||
$product->stories['draft'] = 0;
|
||||
$product->stories['reviewing'] = 0;
|
||||
$product->stories['active'] = 0;
|
||||
$product->stories['closed'] = 0;
|
||||
$product->stories['changing'] = 0;
|
||||
$product->requirements = $product->stories;
|
||||
$product->plans = 0;
|
||||
$product->releases = 0;
|
||||
$product->bugs = 0;
|
||||
$product->unResolved = 0;
|
||||
$product->closedBugs = 0;
|
||||
$product->fixedBugs = 0;
|
||||
$product->assignToNull = 0;
|
||||
$product->stories[0] = '';
|
||||
$product->stories[1] = 'draft';
|
||||
$product->stories[2] = 'reviewing';
|
||||
$product->stories[3] = 'active';
|
||||
$product->stories[4] = 'closed';
|
||||
$product->stories[5] = 'changing';
|
||||
$product->stories[6] = 'finishClosed';
|
||||
$product->stories[7] = 'unclosed';
|
||||
$product->stories[''] = 0;
|
||||
$product->stories['draft'] = 0;
|
||||
$product->stories['reviewing'] = 0;
|
||||
$product->stories['active'] = 0;
|
||||
$product->stories['closed'] = 0;
|
||||
$product->stories['changing'] = 0;
|
||||
$product->stories['finishClosed'] = 0;
|
||||
$product->stories['unclosed'] = 0;
|
||||
$product->requirements = $product->stories;
|
||||
$product->plans = 0;
|
||||
$product->releases = 0;
|
||||
$product->bugs = 0;
|
||||
$product->unResolved = 0;
|
||||
$product->closedBugs = 0;
|
||||
$product->fixedBugs = 0;
|
||||
$product->assignToNull = 0;
|
||||
|
||||
$productStat[$product->program][$product->line]['products'][$product->id] = $product;
|
||||
return $productStat;
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<tbody>
|
||||
<?php foreach($nodeList as $node):?>
|
||||
<tr>
|
||||
<td title="<?php echo $node->name;?>"><?php echo html::a($this->createLink('zanode', 'view', "id=$node->id"), $node->name, '', "");?></td>
|
||||
<td title="<?php echo $node->name;?>"><?php echo html::a($this->createLink('zanode', 'view', "id=$node->id"), $node->name, '_target', "");?></td>
|
||||
<td><?php echo zget($config->zanode->os->cpuCores, $node->cpuCores);?></td>
|
||||
<td><?php echo $node->memory . $this->lang->zahost->unitList['GB'];?></td>
|
||||
<td><?php echo $node->diskSize . $this->lang->zahost->unitList['GB'];?></td>
|
||||
|
||||
@@ -29,7 +29,7 @@ function checkServiceStatus(){
|
||||
if(resultData.data[key] == 'ready' || resultData.data[key] == 'not_available')
|
||||
{
|
||||
$('.ztf-status').text(zanodeLang.init[resultData.data[key]])
|
||||
$('.ztf-install').text(zanodeLang.reinstall);
|
||||
$('.ztf-install').text('');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -695,7 +695,7 @@ class zanodemodel extends model
|
||||
*/
|
||||
public function getServiceStatus($node)
|
||||
{
|
||||
$result = json_decode(commonModel::http("http://{$node->ip}:{$node->zap}/api/v1/service/check", json_encode(array("services" => "all")), array(), array("Authorization:$node->tokenSN")));
|
||||
$result = json_decode(commonModel::http("http://{$node->ip}:{$node->zap}/api/v1/service/check", json_encode(array("services" => "all")), array(), array("Authorization:$node->tokenSN"), 'data', 'POST', 2));
|
||||
if(empty($result->data->ztfStatus) || $result->code != 'success')
|
||||
{
|
||||
$result = new stdclass;
|
||||
|
||||
@@ -137,7 +137,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
|
||||
</span>
|
||||
</div>
|
||||
<div class="status-notice">
|
||||
<span class='init-success hide'><?php echo sprintf($lang->zanode->init->initSuccessNoticeTitle, "<a href='https://www.zentao.net/book/zentaopms/971.html'>{$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-success hide'><?php echo sprintf($lang->zanode->init->initSuccessNoticeTitle, "<a href='https://www.zentao.net/book/zentaopms/configure-environment-974.html'>{$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>
|
||||
|
||||
Reference in New Issue
Block a user