From 383a2e236b241688a7100ae1ea18e4c775263c4d Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 27 Nov 2019 10:05:25 +0800 Subject: [PATCH] * Finish task #6579. --- module/bug/control.php | 2 +- module/caselib/control.php | 2 +- module/common/view/datatable.fix.html.php | 49 ++++++++++++++++++----- module/datatable/control.php | 5 ++- module/datatable/lang/en.php | 5 ++- module/datatable/lang/zh-cn.php | 5 ++- module/product/control.php | 2 +- module/project/control.php | 2 +- module/project/lang/en.php | 1 - module/project/lang/zh-cn.php | 4 -- module/project/view/task.html.php | 35 ---------------- module/testcase/control.php | 2 +- module/testreport/control.php | 18 ++++++--- module/testtask/control.php | 2 +- 14 files changed, 67 insertions(+), 67 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index bd0ae63cb9..af3c4632dc 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -166,7 +166,7 @@ class bug extends control $this->view->plans = $this->loadModel('productplan')->getPairs($productID); $this->view->stories = $storyList; $this->view->tasks = $taskList; - $this->view->setShowModule = true; + $this->view->setModule = true; $this->display(); } diff --git a/module/caselib/control.php b/module/caselib/control.php index effa982673..afa9302736 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -222,7 +222,7 @@ class caselib extends control $this->view->moduleID = $moduleID; $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; $this->view->param = $param; - $this->view->setShowModule = true; + $this->view->setModule = true; $this->display(); } diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index f0a271f871..3e8b90b882 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -5,8 +5,8 @@ diff --git a/module/testcase/control.php b/module/testcase/control.php index e20b4d44ee..a0ee0b9990 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -136,7 +136,7 @@ class testcase extends control $this->view->branches = $this->loadModel('branch')->getPairs($productID); $this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID); $this->view->suiteID = $suiteID; - $this->view->setShowModule = true; + $this->view->setModule = true; $this->display(); } diff --git a/module/testreport/control.php b/module/testreport/control.php index 2b8de61ed3..1ef45ea903 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -256,8 +256,10 @@ class testreport extends control $this->view->cases = $cases; $this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $begin, $end); - $this->view->datas['testTaskPerRunResult'] = $this->testreport->getPerCaseResult4Report($tasks, $cases, $begin, $end); - $this->view->datas['testTaskPerRunner'] = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $begin, $end); + $perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $begin, $end); + $perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $begin, $end); + $this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult); + $this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner); $this->view->legacyBugs = $bugInfo['legacyBugs']; unset($bugInfo['legacyBugs']); @@ -366,8 +368,10 @@ class testreport extends control $this->view->cases = $cases; $this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $report->begin, $report->end); - $this->view->datas['testTaskPerRunResult'] = $this->testreport->getPerCaseResult4Report($tasks, $cases, $report->begin, $report->end); - $this->view->datas['testTaskPerRunner'] = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $report->begin, $report->end); + $perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $report->begin, $report->end); + $perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $report->begin, $report->end); + $this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult); + $this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner); $this->view->legacyBugs = $bugInfo['legacyBugs']; unset($bugInfo['legacyBugs']); @@ -447,8 +451,10 @@ class testreport extends control $this->view->storySummary = $this->product->summary($stories); $this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $report->begin, $report->end); - $this->view->datas['testTaskPerRunResult'] = $this->testreport->getPerCaseResult4Report($tasks, $cases, $report->begin, $report->end); - $this->view->datas['testTaskPerRunner'] = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $report->begin, $report->end); + $perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $report->begin, $report->end); + $perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $report->begin, $report->end); + $this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult); + $this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner); $this->view->legacyBugs = $bugInfo['legacyBugs']; unset($bugInfo['legacyBugs']); diff --git a/module/testtask/control.php b/module/testtask/control.php index ee91c0b34c..937d9a7a3d 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -324,7 +324,7 @@ class testtask extends control $this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden'; $this->view->pager = $pager; $this->view->branches = $this->loadModel('branch')->getPairs($productID); - $this->view->setShowModule = false; + $this->view->setModule = false; $this->display(); }