mail[Wesnoth-commits] r28544 - in /branches/resources/tests.wesnoth.org: htdocs/ htdocs/styles/ include/ smarty_workdir/templates/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on August 13, 2008 - 15:58:
Author: suokko
Date: Wed Aug 13 15:17:23 2008
New Revision: 28544

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28544&view=rev
Log:
* Added page to show information about build
* Made some improvements to css

Added:
    branches/resources/tests.wesnoth.org/htdocs/show_build.php   (with props)
    
branches/resources/tests.wesnoth.org/smarty_workdir/templates/show_build.tpl
      - copied, changed from r28524, 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl
Removed:
    branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl
Modified:
    branches/resources/tests.wesnoth.org/htdocs/index.php
    branches/resources/tests.wesnoth.org/htdocs/styles/unit_test.css
    branches/resources/tests.wesnoth.org/include/Build.php
    branches/resources/tests.wesnoth.org/include/TestResult.php
    
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_history.tpl
    
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_list.tpl
    branches/resources/tests.wesnoth.org/smarty_workdir/templates/footer.tpl
    branches/resources/tests.wesnoth.org/smarty_workdir/templates/header.tpl

Modified: branches/resources/tests.wesnoth.org/htdocs/index.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/htdocs/index.php?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/htdocs/index.php (original)
+++ branches/resources/tests.wesnoth.org/htdocs/index.php Wed Aug 13 15:17:23 
2008
@@ -27,7 +27,7 @@
 
 $smarty->assign($build->getStatistics());
 
-$smarty->display('index.tpl');
+$smarty->display('show_build.tpl');
 
 
 $footer->show();

Added: branches/resources/tests.wesnoth.org/htdocs/show_build.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/htdocs/show_build.php?rev=28544&view=auto
==============================================================================
--- branches/resources/tests.wesnoth.org/htdocs/show_build.php (added)
+++ branches/resources/tests.wesnoth.org/htdocs/show_build.php Wed Aug 13 
15:17:23 2008
@@ -1,0 +1,33 @@
+<?php
+/*
+   Copyright (C) 2008 by Pauli Nieminen <paniemin@xxxxxxxxx>
+   Part of the Battle for Wesnoth Project http://www.wesnoth.org/
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License version 2
+   or at your option any later version.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY.
+
+   See the COPYING file for more details.
+*/
+$root_dir = './';
+
+require_once($root_dir . '../include/settup.php');
+
+$header = new Header('build_history');
+
+$footer = new Footer('build_history');
+
+$header->show();
+
+$user_params = new ParameterValidator($_GET);
+
+$build = new Build();
+$build->fetchBuildById($user_params->getInt('build', 0));
+$smarty->assign($build->getStatistics());
+
+$smarty->display('show_build.tpl');
+
+$footer->show();
+?>

Propchange: branches/resources/tests.wesnoth.org/htdocs/show_build.php
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/resources/tests.wesnoth.org/htdocs/styles/unit_test.css
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/htdocs/styles/unit_test.css?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/htdocs/styles/unit_test.css 
(original)
+++ branches/resources/tests.wesnoth.org/htdocs/styles/unit_test.css Wed Aug 
13 15:17:23 2008
@@ -8,6 +8,19 @@
 .unit_test h3 {
        text-align:center;
 }
+
+.unit_test a {
+       color: #225599;
+       font-weight: bold;
+       text-decoration: none;
+}
+
+.unit_test a:hover {
+       text-decoration: underline;
+       font-weight: bold;
+       color: #225599;
+}
+
 
 table.build {
        margin: auto;
@@ -20,6 +33,7 @@
 
 td.time {
        font-weight: bold;
+       color: #104060;
 }
 
 .build .passed {
@@ -28,6 +42,10 @@
 
 .build .failed, .aborted {
        color: #FF0000;
+}
+
+.build .notstarted {
+       color: #FF7F00;
 }
 
 div.autohide {
@@ -57,7 +75,7 @@
 }
 
 .test_error .Warning {
-       color: #FF4000;
+       color: #FF7F00;
 }
 
 .test_error .Exception {
@@ -88,18 +106,6 @@
        font-size: 0.8em;
 }
 
-.paginate a {
-       color: #225599;
-       font-weight: bold;
-       text-decoration: none;
-}
-
-.paginate a:hoover {
-       text-decoration: underline;
-       font-weight: bold;
-       color: #225599;
-}
-
 .paginate .active {
        color: #104060;
 }

Modified: branches/resources/tests.wesnoth.org/include/Build.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/include/Build.php?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/include/Build.php (original)
+++ branches/resources/tests.wesnoth.org/include/Build.php Wed Aug 13 
15:17:23 2008
@@ -89,6 +89,11 @@
                $this->fetch('ORDER BY id DESC');
        }
 
+       public function fetchBuildById($id)
+       {
+               $this->fetch('WHERE id=?', array($id));
+       }
+
        private static function fetchVisibleBuilds($page, $builds_per_page)
        {
                return self::multiFetch('ORDER BY id DESC LIMIT ?,?', 
@@ -240,7 +245,7 @@
        {
                if (is_null($this->result))
                {
-                       $this->result = new 
TestResult($this->getLastWorkingId());
+                       $this->result = new TestResult($this->id);
                }
        }
 

Modified: branches/resources/tests.wesnoth.org/include/TestResult.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/include/TestResult.php?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/include/TestResult.php (original)
+++ branches/resources/tests.wesnoth.org/include/TestResult.php Wed Aug 13 
15:17:23 2008
@@ -72,13 +72,13 @@
                $this->id = -1;
                $this->build_id = -1;
                $this->name = '';
-               $this->result = '';
-               $this->assertions_passed = -1;
-               $this->assertions_failed = -1;
-               $this->test_cases_passed = -1;
-               $this->test_cases_failed = -1;
-               $this->test_cases_skipped = -1;
-               $this->test_cases_aborted = -1;
+               $this->result = 'notstarted';
+               $this->assertions_passed = 0;
+               $this->assertions_failed = 0;
+               $this->test_cases_passed = 0;
+               $this->test_cases_failed = 0;
+               $this->test_cases_skipped = 0;
+               $this->test_cases_aborted = 0;
 
        }
 

Modified: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_history.tpl
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_history.tpl?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_history.tpl
 (original)
+++ 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_history.tpl
 Wed Aug 13 15:17:23 2008
@@ -1,3 +1,4 @@
+{strip}
 <h3>Build history</h3>
 <table class="build_history">
 <tr><td>
@@ -6,3 +7,4 @@
 {include file='paginate.tpl'}
 </td></tr>
 </table>
+{/strip}

Modified: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_list.tpl
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_list.tpl?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_list.tpl 
(original)
+++ 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/build_list.tpl 
Wed Aug 13 15:17:23 2008
@@ -1,3 +1,4 @@
+{strip}
 <table class="build" border="1">
 <tr>
 <th>Time</th>
@@ -7,11 +8,19 @@
 </tr>
 {foreach from=$builds item=build}
 <tr>
-<td class="time">{$build.time|date_format:"%H:%M %b %e, %Y"}</td>
+<td class="time">
+{if $hide_build_link != true}
+       <a href="show_build.php?build={$build.id}">
+{/if}
+{$build.time|date_format:"%H:%M %b %e, %Y"}
+{if $hide_build_link != true}
+       </a>
+{/if}
+</td>
 <td class="revision {$build.style}">r{$build.svn_rev}</td>
 <td class="message {$build.style}">{$build.result|autohide:20:true}</td>
 <td class="testresult 
{$build.result_style}">{$build.result_passed}/{$build.result_passed+$build.result_failed}</td>
 </tr>
 {/foreach}
 </table>
-
+{/strip}

Modified: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/footer.tpl
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/footer.tpl?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/smarty_workdir/templates/footer.tpl 
(original)
+++ branches/resources/tests.wesnoth.org/smarty_workdir/templates/footer.tpl 
Wed Aug 13 15:17:23 2008
@@ -1,5 +1,5 @@
-  <div id="content">
-  </div> <!-- content -->
+{strip}
+  </div> <!-- main -->
 
 <div class="visualClear"></div>
 
@@ -12,8 +12,6 @@
  </div>
 </div>
 
-</div> <!-- main -->
-
 </div> <!-- global -->
 
 <script type="text/javascript">
@@ -25,4 +23,4 @@
 
 </body>
 </html>
-
+{/strip}

Modified: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/header.tpl
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/header.tpl?rev=28544&r1=28543&r2=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/smarty_workdir/templates/header.tpl 
(original)
+++ branches/resources/tests.wesnoth.org/smarty_workdir/templates/header.tpl 
Wed Aug 13 15:17:23 2008
@@ -1,11 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
-
-<!--
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
--->
+{strip}
 
 <head>
   <meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
@@ -51,7 +47,8 @@
 <table class="menu">
 <tr><td><a href="index.php">Status</a></td></tr>
 <tr><td><a href="build_history.php">Build history</a></td></tr>
-<tr><td><a href="index.php">Test Graphs</a></td></tr>
+<!--<tr><td><a href="index.php">Test Graphs</a></td></tr>-->
 </table>
 </div>
 <div id="main" class="unit_test">
+{/strip}

Removed: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl?rev=28543&view=auto
==============================================================================
--- branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl 
(original)
+++ branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl 
(removed)
@@ -1,26 +1,0 @@
-<h3>The status from the latest build</h3>
-{include file='build_list.tpl'}
-<br/>
-{if count($errors) eq 0}
-<h3>All unit test passed! Congratulations!</h3>
-{else}
-<h3>Current list of errors in unit tests</h3>
-<table class="test_error" border="1">
-<tr>
-<th>Type</th>
-<th>First broken</th>
-<th>File</th>
-<th>Line</th>
-<th>Message</th>
-</tr>
-{foreach from=$errors item=err}
-<tr>
-<td class="{$err.error_type}">{$err.error_type}</td>
-<td class="{$err.error_type}">r{$err.start_version} - 
r{$err.end_version}</td>
-<td class="{$err.error_type}">{$err.file|autohide:25:false:true}</td>
-<td class="{$err.error_type}">{$err.line}</td>
-<td class="{$err.error_type}">{$err.error_msg|autohide:40:true}</td>
-</tr>
-{/foreach}
-{/if}
-</table>

Copied: 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/show_build.tpl 
(from r28524, 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl)
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/templates/show_build.tpl?p2=branches/resources/tests.wesnoth.org/smarty_workdir/templates/show_build.tpl&p1=branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl&r1=28524&r2=28544&rev=28544&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/smarty_workdir/templates/index.tpl 
(original)
+++ 
branches/resources/tests.wesnoth.org/smarty_workdir/templates/show_build.tpl 
Wed Aug 13 15:17:23 2008
@@ -1,5 +1,5 @@
-<h3>The status from the latest build</h3>
-{include file='build_list.tpl'}
+<h3>Build report</h3>
+{include file='build_list.tpl' hide_build_link=true}
 <br/>
 {if count($errors) eq 0}
 <h3>All unit test passed! Congratulations!</h3>




Related Messages


Powered by MHonArc, Updated Wed Aug 13 16:01:40 2008