Skip to content

Commit

Permalink
phoromatic: Fix "yesterday's results" and work on cleaning up some da…
Browse files Browse the repository at this point in the history
…te formatting
  • Loading branch information
michaellarabel committed May 19, 2014
1 parent bf30584 commit f09a3c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGE-LOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
PHORONIX TEST SUITE CHANGE-LOG

Phoronix Test Suite (Git)

- Cleaning up more of the Phoromatic UI

Phoronix Test Suite 5.2 Milestone 2
18 May 2014

Expand Down
4 changes: 2 additions & 2 deletions pts-core/phoromatic/pages/phoromatic_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function render_page_process($PATH)
$main .= '</ul></div>';

// YESTERDAY'S RESULTS
if($test_result_row && substr($test_result_row['UploadTime'], 0, 10) != date('Y-m-d', (time() - 60 * 60 * 24)))
if($test_result_row && substr($test_result_row['UploadTime'], 0, 10) == date('Y-m-d', (time() - 60 * 60 * 24)))
{
$main .= '<div style="float: left; width: 50%;"><ul><li><h1>Yesterday\'s Test Results</h1></li>';

Expand Down Expand Up @@ -132,7 +132,7 @@ public static function render_page_process($PATH)
{
break;
}
$main .= '<a href="?results/' . $test_result_row['UploadID'] . '"><li>' . $test_result_row['Title'] . '<br /><em>' . phoromatic_system_id_to_name($test_result_row['SystemID']) . ' - ' . $test_result_row['UploadTime'] . '</em></li></a>';
$main .= '<a href="?results/' . $test_result_row['UploadID'] . '"><li>' . $test_result_row['Title'] . '<br /><em>' . phoromatic_system_id_to_name($test_result_row['SystemID']) . ' - ' . phoromatic_user_friendly_timedate($test_result_row['UploadTime']) . '</em></li></a>';
}
while($test_result_row = $test_result_result->fetchArray());
$main .= '</ul></div>';
Expand Down
4 changes: 4 additions & 0 deletions pts-core/phoromatic/phoromatic_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

function phoromatic_user_friendly_timedate($time)
{
return date('j F H:i', strtotime($time));
}
function phoromatic_webui_header($left_items, $right)
{
$ret = '<div id="pts_phoromatic_top_header">
Expand Down

0 comments on commit f09a3c4

Please sign in to comment.