Merge branch 'devops21_zenggang' into 'devops21'
zg:修复bug19411 See merge request easycorp/zentaopms!1755
This commit is contained in:
@@ -351,7 +351,19 @@ class sonarqube extends control
|
||||
$cacheFile = $this->sonarqube->getCacheFile($sonarqubeID, $projectKey);
|
||||
if(!$cacheFile or !file_exists($cacheFile) or (time() - filemtime($cacheFile)) / 60 > $this->config->sonarqube->cacheTime)
|
||||
{
|
||||
ini_set('memory_limit', '256M');
|
||||
|
||||
$sonarqubeIssueList = $this->sonarqube->apiGetIssues($sonarqubeID, $projectKey);
|
||||
foreach($sonarqubeIssueList as $key => $sonarqubeIssue)
|
||||
{
|
||||
if(!isset($sonarqubeIssue->line)) $sonarqubeIssue->line = '';
|
||||
if(!isset($sonarqubeIssue->effort)) $sonarqubeIssue->effort = '';
|
||||
$sonarqubeIssue->message = htmlspecialchars($sonarqubeIssue->message);
|
||||
$sonarqubeIssue->creationDate = date('Y-m-d H:i:s', strtotime($sonarqubeIssue->creationDate));
|
||||
|
||||
list($project, $file) = explode(':', $sonarqubeIssue->component);
|
||||
$sonarqubeIssue->file = $file;
|
||||
}
|
||||
|
||||
if($cacheFile)
|
||||
{
|
||||
@@ -368,16 +380,6 @@ class sonarqube extends control
|
||||
$sonarqubeIssueList = unserialize(file_get_contents($cacheFile));
|
||||
}
|
||||
|
||||
foreach($sonarqubeIssueList as $key => $sonarqubeIssue)
|
||||
{
|
||||
if(!isset($sonarqubeIssue->line)) $sonarqubeIssue->line = '';
|
||||
if(!isset($sonarqubeIssue->effort)) $sonarqubeIssue->effort = '';
|
||||
$sonarqubeIssue->message = htmlspecialchars($sonarqubeIssue->message);
|
||||
|
||||
list($project, $file) = explode(':', $sonarqubeIssue->component);
|
||||
$sonarqubeIssue->file = $file;
|
||||
}
|
||||
|
||||
/* Data search. */
|
||||
if($keyword)
|
||||
{
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
#mainMenu .pull-left {margin-right: 15px;}
|
||||
.c-message {width: 350px;}
|
||||
.c-file {width: 300px;}
|
||||
.c-effort {width: 155px;}
|
||||
.c-date {width: 130px;}
|
||||
#keyword {width: 240px;}
|
||||
|
||||
@@ -35,7 +35,7 @@ $lang->sonarqube->placeholder->name = '';
|
||||
$lang->sonarqube->placeholder->url = "请填写SonarQube Server首页的访问地址,如:https://sonarqube.zentao.net。";
|
||||
$lang->sonarqube->placeholder->account = "请填写具有Administrator权限的SonarQube用户信息";
|
||||
$lang->sonarqube->placeholder->projectName = '最多255个字符';
|
||||
$lang->sonarqube->placeholder->projectKey = "最多400个字符。 允许的字符为字母数字,'-','_','. '和':',至少有一个非数字";
|
||||
$lang->sonarqube->placeholder->projectKey = "最多400个字符。 允许的字符为字母、数字,'-','_','. '和':',至少有一个非数字";
|
||||
$lang->sonarqube->placeholder->searchIssue = "请输入问题名称或文件";
|
||||
|
||||
$lang->sonarqube->nameRepeatError = "服务器名称已存在!";
|
||||
@@ -69,7 +69,7 @@ $lang->sonarqube->qualitygateList['ERROR'] = 'Failed';
|
||||
$lang->sonarqube->apiErrorMap[1] = "/Malformed key for Project: '([\s\S]+)'. Allowed characters are alphanumeric, '-', '_', '\.' and ':', with at least one non-digit\./";
|
||||
$lang->sonarqube->apiErrorMap[2] = "/Could not create Project, key already exists: ([\s\S]+)/";
|
||||
|
||||
$lang->sonarqube->errorLang[1] = "项目标识的格式不正确。允许的字符为字母数字、'-'、''、'.'和“:”,至少有一个非数字。";
|
||||
$lang->sonarqube->errorLang[1] = "项目标识的格式不正确。允许的字符为字母、数字、'-'、''、'.'和“:”,至少有一个非数字。";
|
||||
$lang->sonarqube->errorLang[2] = "无法创建项目,项目标识已存在:%s";
|
||||
|
||||
$lang->sonarqube->issue = new stdclass();
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
<th><?php common::printOrderLink('status', $orderBy, $vars, $lang->sonarqube->issue->status);?></th>
|
||||
<th class='c-file text-left'><?php common::printOrderLink('file', $orderBy, $vars, $lang->sonarqube->issue->file);?></th>
|
||||
<th><?php common::printOrderLink('line', $orderBy, $vars, $lang->sonarqube->issue->line);?></th>
|
||||
<th><?php common::printOrderLink('effort', $orderBy, $vars, $lang->sonarqube->issue->effort);?></th>
|
||||
<th class='c-effort'><?php common::printOrderLink('effort', $orderBy, $vars, $lang->sonarqube->issue->effort);?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('creationDate', $orderBy, $vars, $lang->sonarqube->issue->creationDate);?></th>
|
||||
<th class='c-actions-2'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -60,6 +61,7 @@
|
||||
<td class='text' title='<?php echo $sonarqubeIssue->file;?>'><?php echo $sonarqubeIssue->file;?></td>
|
||||
<td class='text' title='<?php echo $sonarqubeIssue->line;?>'><?php echo $sonarqubeIssue->line;?></td>
|
||||
<td class='text' title='<?php echo $sonarqubeIssue->effort;?>'><?php echo $sonarqubeIssue->effort;?></td>
|
||||
<td class='text' title='<?php echo $sonarqubeIssue->creationDate;?>'><?php echo $sonarqubeIssue->creationDate;?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
$issueKey = $sonarqubeID . ':' . $sonarqubeIssue->key;
|
||||
|
||||
Reference in New Issue
Block a user