* fix bug and merge from master.

This commit is contained in:
wangyidong
2021-06-07 14:13:01 +08:00
parent 8d75769726
commit 08de61a26c
3 changed files with 27 additions and 29 deletions
+15 -15
View File
@@ -12,8 +12,8 @@
class svn extends control
{
/**
* Sync svn.
*
* Sync svn.
*
* @access public
* @return void
*/
@@ -24,9 +24,9 @@ class svn extends control
/**
* Diff a file.
*
* @param string $url
* @param int $revision
*
* @param string $url
* @param int $revision
* @access public
* @return void
*/
@@ -40,11 +40,11 @@ class svn extends control
$svnRepos = $this->loadModel('repo')->getListBySCM('Subversion', 'haspriv');
foreach($svnRepos as $repo)
{
if(strpos(strtolower($url), strtolower($repo->path)) === 0)
if(strpos(strtolower($url), strtolower($repo->path)) === 0)
{
$entry = $this->repo->encodePath(str_ireplace($repo->path, '', $url));
$oldRevision = $revision - 1;
$this->locate($this->repo->createLink('diff', "repoID=$repo->id&entry=$entry&oldRevision=$oldRevision&revision=$revision", 'html', true));
$this->locate($this->repo->createLink('diff', "repoID=$repo->id&objectID=0&entry=$entry&oldRevision=$oldRevision&revision=$revision", 'html', true));
}
}
}
@@ -58,9 +58,9 @@ class svn extends control
/**
* Cat a file.
*
* @param string $url
* @param int $revision
*
* @param string $url
* @param int $revision
* @access public
* @return void
*/
@@ -77,7 +77,7 @@ class svn extends control
if(strpos(strtolower($url), strtolower($repo->path)) === 0)
{
$entry = $this->repo->encodePath(str_ireplace(strtolower($repo->path), '', $url));
$this->locate($this->repo->createLink('view', "repoID=$repo->id&entry=$entry&revision=$revision", 'html', true));
$this->locate($this->repo->createLink('view', "repoID=$repo->id&objectID=0&entry=$entry&revision=$revision", 'html', true));
}
}
}
@@ -86,12 +86,12 @@ class svn extends control
$this->view->revision = $revision;
$this->view->code = $this->svn->cat($url, $revision);
$this->display();
$this->display();
}
/**
* Sync from the syncer by api.
*
*
* @access public
* @return void
*/
@@ -131,7 +131,7 @@ class svn extends control
/**
* Ajax save log.
*
*
* @access public
* @return void
*/
@@ -187,7 +187,7 @@ class svn extends control
/**
* Ajax get repos.
*
*
* @access public
* @return void
*/
+9 -4
View File
@@ -310,8 +310,13 @@ class testreport extends control
$this->view->cases = $cases;
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $begin, $end);
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $begin, $end);
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $begin, $end);
$caseList = array();
foreach($cases as $taskID => $casesList)
{
foreach($casesList as $caseID => $case) $caseList[$caseID] = $case;
}
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, array_keys($caseList), $begin, $end);
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, array_keys($caseList), $begin, $end);
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
@@ -439,8 +444,8 @@ class testreport extends control
$this->view->cases = $cases;
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $begin, $end);
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $begin, $end);
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $begin, $end);
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $report->cases, $begin, $end);
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $report->cases, $begin, $end);
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
+3 -10
View File
@@ -62,16 +62,8 @@ function updateFile(link)
$('#resultBox li span.' + response.type + '-num').html(num + response.count);
updateFileFinish = true;
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
<?php
$condition = array();
foreach($needProcess as $processKey => $value) $condition[] = $processKey . 'Finish == true';
$condition = join(' && ', $condition);
?>
if(<?php echo $condition?>)
{
$.get('<?php echo inlink('afterExec', "fromVersion=$fromVersion&processed=yes")?>');
$('a#tohome').closest('.message').show();
}
$.get('<?php echo inlink('afterExec', "fromVersion=$fromVersion&processed=yes")?>');
$('a#tohome').closest('.message').show();
}
else
{
@@ -92,6 +84,7 @@ function updateFile(link)
$(function()
{
$('.col-md-6:first').append("<div class='alert alert-info'><p><?php echo $lang->upgrade->needBuild4Add;?></p></div>");
$.get('<?php echo inlink('afterExec', "fromVersion=$fromVersion&processed=yes")?>');
})
</script>
<?php endif;?>