Allow the user to limit or show all of the testing results for a particular version
This commit is contained in:
@@ -524,7 +524,10 @@ else if($_REQUEST['versionId'])
|
|||||||
$oTest = new TestData($_REQUEST['iTestingId']);
|
$oTest = new TestData($_REQUEST['iTestingId']);
|
||||||
$iCurrentTest = $oTest->ShowTestResult($oTest->iTestingId,$oVersion->iVersionId);
|
$iCurrentTest = $oTest->ShowTestResult($oTest->iTestingId,$oVersion->iVersionId);
|
||||||
if($iCurrentTest)
|
if($iCurrentTest)
|
||||||
$oTest->ShowVersionsTestingTable($oVersion->iVersionId,$iCurrentTest,$_SERVER['PHP_SELF']."?versionId=".$oVersion->iVersionId."&iTestingId=");
|
$oTest->ShowVersionsTestingTable($oVersion->iVersionId,
|
||||||
|
$iCurrentTest,
|
||||||
|
$_SERVER['PHP_SELF']."?versionId=".$oVersion->iVersionId."&iTestingId=",
|
||||||
|
5);
|
||||||
echo '<form method=post name=message action=testResults.php?sub=view&iVersionId='.$oVersion->iVersionId.'>';
|
echo '<form method=post name=message action=testResults.php?sub=view&iVersionId='.$oVersion->iVersionId.'>';
|
||||||
echo '<input type=submit value="Add Testing Data" class="button" />';
|
echo '<input type=submit value="Add Testing Data" class="button" />';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|||||||
@@ -347,13 +347,25 @@ class testData{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show the Test results for a application version
|
// Show the Test results for a application version
|
||||||
function ShowVersionsTestingTable($iVersionId, $iCurrentTest, $link)
|
function ShowVersionsTestingTable($iVersionId, $iCurrentTest, $link, $iDisplayLimit)
|
||||||
{
|
{
|
||||||
$hResult = query_appdb("SELECT *
|
$showAll = $_REQUEST['showAll'];
|
||||||
|
|
||||||
|
$sQuery = "SELECT *
|
||||||
FROM testResults
|
FROM testResults
|
||||||
WHERE versionId = '".$iVersionId."'
|
WHERE versionId = '".$iVersionId."'
|
||||||
ORDER BY testedDate DESC;");
|
ORDER BY testedDate DESC";
|
||||||
if(!$hResult || mysql_num_rows($hResult) == 0)
|
|
||||||
|
if(!$showAll)
|
||||||
|
$sQuery.=" LIMIT 0,".$iDisplayLimit;
|
||||||
|
|
||||||
|
$hResult = query_appdb($sQuery);
|
||||||
|
if(!$hResult)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$rowsUsed = mysql_num_rows($hResult);
|
||||||
|
|
||||||
|
if($rowsUsed == 0)
|
||||||
return;
|
return;
|
||||||
echo '<p><span class="title">Testing Results</span><br />',"\n";
|
echo '<p><span class="title">Testing Results</span><br />',"\n";
|
||||||
echo '<table width="100%" border="1" class="historyTable">',"\n";
|
echo '<table width="100%" border="1" class="historyTable">',"\n";
|
||||||
@@ -376,10 +388,20 @@ class testData{
|
|||||||
$oDistribution = new distribution($oTest->iDistributionId);
|
$oDistribution = new distribution($oTest->iDistributionId);
|
||||||
$bgcolor = $oTest->sTestedRating;
|
$bgcolor = $oTest->sTestedRating;
|
||||||
echo '<tr class='.$bgcolor.'>',"\n";
|
echo '<tr class='.$bgcolor.'>',"\n";
|
||||||
|
|
||||||
if ($oTest->iTestingId == $iCurrentTest)
|
if ($oTest->iTestingId == $iCurrentTest)
|
||||||
|
{
|
||||||
echo ' <td align="center" class="color2"><b>Current</b></td>',"\n";
|
echo ' <td align="center" class="color2"><b>Current</b></td>',"\n";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
echo ' <td align="center" class="color2">[<a href="'.$link.$oTest->iTestingId;
|
||||||
|
|
||||||
|
if(is_string($showAll))
|
||||||
|
echo '&showAll='.$showAll.'">Show</a>]</td>',"\n";
|
||||||
else
|
else
|
||||||
echo ' <td align="center" class="color2">[<a href="'.$link.$oTest->iTestingId.'">Show</a>]</td>',"\n";
|
echo '">Show</a>]</td>',"\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo ' <td>',"\n";
|
echo ' <td>',"\n";
|
||||||
echo '<a href="'.BASE.'distributionView.php?iDistributionId='.$oTest->iDistributionId.'">',"\n";
|
echo '<a href="'.BASE.'distributionView.php?iDistributionId='.$oTest->iDistributionId.'">',"\n";
|
||||||
echo $oDistribution->sName.'</a>',"\n";
|
echo $oDistribution->sName.'</a>',"\n";
|
||||||
@@ -394,8 +416,18 @@ class testData{
|
|||||||
|
|
||||||
echo '</table>',"\n";
|
echo '</table>',"\n";
|
||||||
|
|
||||||
|
echo '<form method=get action="'.$PHP_SELF.'">';
|
||||||
|
echo '<input name="versionId" type=hidden value="',$iVersionId,'" />';
|
||||||
|
if($rowsUsed >= $iDisplayLimit && !is_string($showAll))
|
||||||
|
echo '<input class="button" name="showAll" type=submit value="Show All Tests" />';
|
||||||
|
|
||||||
|
if(is_string($showAll))
|
||||||
|
{
|
||||||
|
echo '<input class="button" name="hideAll" type=submit value="Limit to '.$iDisplayLimit.' Tests" />';
|
||||||
}
|
}
|
||||||
|
echo '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
// show the fields for editing
|
// show the fields for editing
|
||||||
function OutputEditor($sDistribution, $bNewDist=false)
|
function OutputEditor($sDistribution, $bNewDist=false)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user