com web/qa: QA REPORT change default behaviour not to show XFAIL QA REPORT hide CIQA on not -dev versions: reports/index.php
reports/reportsfunctions.php

From: Date: Sun, 08 Apr 2012 14:18:39 +0000
Subject: com web/qa: QA REPORT change default behaviour not to show XFAIL QA REPORT hide CIQA on not -dev versions: reports/index.php
reports/reportsfunctions.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66227@lists.php.net to get a copy of this message
Commit: 9ebc1790cf3eaee93dd5f43d6c247956b5c1e7f3 Author: Olivier Doucet <odoucet@php.net> Sun, 8 Apr 2012 16:18:39 +0200 Parents: 7321ecf579caac33b254f23992b128b03d3f806e Branches: master Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=9ebc1790cf3eaee93dd5f43d6c247956b5c1e7f3 Log: QA REPORT change default behaviour not to show XFAIL QA REPORT hide CIQA on not -dev versions Changed paths: M reports/index.php M reports/reportsfunctions.php Diff: diff --git a/reports/index.php b/reports/index.php index cb5adc9..e8d09fc 100644 --- a/reports/index.php +++ b/reports/index.php @@ -51,7 +51,7 @@ if (isset($_GET['version'])) { $failedTestsArray = array(); // Do we add expected failed ? - if (!isset($_GET['noexpect']) || $_GET['noexpect'] == 0) { + if (isset($_GET['expect']) & $_GET['expect'] == 1) { $query = 'SELECT \'xfail\' as xfail, test_name,COUNT(expectedfail.id) as cpt,\'-\' as variations, datetime(date) as date FROM expectedfail,reports WHERE expectedfail.id_report = reports.id GROUP BY test_name ORDER BY cpt DESC LIMIT ' . $limit; @@ -147,17 +147,17 @@ foreach ($reportsPerVersion as $version => $line) { <!-- function changeExpect() { - var check = document.getElementById('noexpect').checked; + var check = document.getElementById('expect').checked; if (check == true) { - document.location.href = '?version=<?php echo $getVersion; ?>'; + document.location.href = '?version=<?php echo $getVersion; ?>&expect=1'; } else { - document.location.href = '?version=<?php echo $getVersion; ?>&noexpect=1'; + document.location.href = '?version=<?php echo $getVersion; ?>'; } } // -> </script> -<input type="checkbox" id="noexpect" onClick="javascript:changeExpect()" -<?php if (!isset($_GET['noexpect'])) echo ' checked'; ?> /><small>Show XFAIL</small><br /> +<input type="checkbox" id="expect" onClick="javascript:changeExpect()" +<?php if (isset($_GET['expect']) && $_GET['expect'] == '1') echo ' checked'; ?> /><small>Show XFAIL</small><br /> <table id="testList" class="sortable" style="margin-top:10px; width: 800px; border-collapse: collapse"> <thead> @@ -166,7 +166,11 @@ function changeExpect() <th>Count</th> <th>Variations</th> <th>Last report date</th> - <th>CIQA status</th> + <?php + if (substr($getVersion, -4) == '-dev') { + echo '<th>CIQA status</th>'; + } + ?> <th>&nbsp;</th> </tr> </thead> @@ -186,26 +190,28 @@ function changeExpect() echo '<td align="right" sorttable_customkey="'.strtotime($line['date']).'">'; echo format_readable_date(strtotime($line['date'])); echo '</td>'; - echo '<td style="'; - $textCI = ''; - if (!array_key_exists('success', $line)) { - // probably xfail - echo 'background-color: grey'; - } elseif ($line['success'] === null) { - // no success. Check fail ? - if (array_key_exists('failedci', $line)) { - echo 'background-color: #c00000'; - $textCI = 'FAIL'; - } else { + if (substr($getVersion, -4) == '-dev') { + echo '<td style="'; + $textCI = ''; + if (!array_key_exists('success', $line)) { + // probably xfail echo 'background-color: grey'; - } - } else { - // success - echo "background-color: #00c000"; - $textCI = 'SUCCESS'; + } elseif ($line['success'] === null) { + // no success. Check fail ? + if (isset($line['failedci'])) { + echo 'background-color: #c00000'; + $textCI = 'FAIL'; + } else { + echo 'background-color: grey'; + } + } else { + // success + echo "background-color: #00c000"; + $textCI = 'PASS'; + } + + echo '" align="center">'.$textCI.'</td>'; } - - echo '" align="center">'.$textCI.'</td>'; echo '<td>'; if (!isset($line['xfail'])) { echo '<a href="viewreports.php?version='.$getVersion.'&amp;test='.urlencode($line['test_name']).'"> diff --git a/reports/reportsfunctions.php b/reports/reportsfunctions.php index 0290729..86051dc 100644 --- a/reports/reportsfunctions.php +++ b/reports/reportsfunctions.php @@ -200,7 +200,7 @@ function format_readable_date($date) { if ($lastReport < 3600) { $tmpValue = round($lastReport/60); $return = $tmpValue.' '; - $return ..= ($tmpValue == 1) ? 'minute' : 'minutes'; + $return .= ($tmpValue <= 1) ? 'minute' : 'minutes'; } elseif ($lastReport < 3600*24) { $tmpValue = round($lastReport/3600); $return = $tmpValue.' ';

« previous php.qa (#66227) next »