aboutsummaryrefslogtreecommitdiffstats
path: root/Report/Box/ignore_05_CauldronISOBuild.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-05-04 13:26:54 +0000
committerRomain d'Alverny <rda@mageia.org>2011-05-04 13:26:54 +0000
commitd08c07b68d0e88d863f597fe5e9ed72d84229ab7 (patch)
tree30b86dbcb4af35e87f2a76c637a214583022a0db /Report/Box/ignore_05_CauldronISOBuild.php
parent25cbfbccf63d176683a3da50913679cab311e21c (diff)
downloaddashboard-d08c07b68d0e88d863f597fe5e9ed72d84229ab7.tar
dashboard-d08c07b68d0e88d863f597fe5e9ed72d84229ab7.tar.gz
dashboard-d08c07b68d0e88d863f597fe5e9ed72d84229ab7.tar.bz2
dashboard-d08c07b68d0e88d863f597fe5e9ed72d84229ab7.tar.xz
dashboard-d08c07b68d0e88d863f597fe5e9ed72d84229ab7.zip
initial import
Diffstat (limited to 'Report/Box/ignore_05_CauldronISOBuild.php')
-rw-r--r--Report/Box/ignore_05_CauldronISOBuild.php177
1 files changed, 177 insertions, 0 deletions
diff --git a/Report/Box/ignore_05_CauldronISOBuild.php b/Report/Box/ignore_05_CauldronISOBuild.php
new file mode 100644
index 0000000..254dcfb
--- /dev/null
+++ b/Report/Box/ignore_05_CauldronISOBuild.php
@@ -0,0 +1,177 @@
+<?php
+/**
+ * Cauldron ISO build service reporting box.
+ *
+ * Not working yet, mostly a mockup so far.
+ *
+ * PHP version 5
+ *
+ * @category Dashboard
+ * @package Buildsystem
+ * @author Romain d'Alverny <rda@mageia.org>
+ * @license MIT License, see LICENSE.txt
+ * @link http://svnweb.mageia.org/svn/soft/dashboard/
+*/
+
+/**
+*/
+class Report_Box_CauldronISOBuild extends Report_Box
+{
+ /**
+ */
+ var $title = "Cauldron ISO Build/QA/Pub";
+
+ /**
+ */
+ function _get_var_definitions() {
+ return array(
+ );
+ }
+
+ /**
+ */
+ function _get_links()
+ {
+ return 'View <a href="http://bcd.mageia.org/">bcd site</a>';
+ }
+
+ function render()
+ {
+ $obj = array(
+ array(
+ 'ts' => gmdate('c'),
+ 'type' => 'info',
+ 'value' => 'Built packages tree is not ready &ndash; no build planned.'
+ ),
+ array(
+ 'ts' => gmdate('c') - 5,
+ 'type' => 'info',
+ 'value' => 'Next build 1a1 should start in about 12 hours (at 2011-03-15 20:23:33), with a <a href="">new context</a>.'
+ ),
+ array(
+ 'ts' => gmdate('c') - 10,
+ 'type' => 'report',
+ 'build' => '1a0',
+ 'contextDiffLink' => '',
+ 'started_at' => '2011-03-14 23:03:15',
+ 'products' => array(
+ array(
+ 'name' => 'DVD i586',
+ 'build' => array(true, 'url'),
+ 'tests' => array(false, 'url'),
+ 'iso' => 'cauldron-2-dvd-i586-1a0-qafail.iso'
+ ),
+ array(
+ 'name' => 'DVD x86_64',
+ 'build' => array(true, 'url'),
+ 'tests' => array(true, 'url'),
+ 'iso' => 'cauldron-2-dvd-i586-1a0-qapass.iso'
+ ),
+ array(
+ 'name' => 'CD dual',
+ 'build' => array(false, 'url'),
+ 'tests' => null,
+ 'iso' => null
+ ),
+ array(
+ 'name' => 'netinstall',
+ 'build' => 'pending'
+ )
+ )
+ )
+ );
+ $values = array();
+ foreach ($obj as $item)
+ {
+ if ($item['type'] == 'info') {
+ $values[] = array(
+ 't' => sprintf('<p>%s</p>', $item['value']),
+ 'c' => null
+ );
+ }
+ elseif ($item['type'] == 'report') {
+ $lis = '';
+ foreach ($item['products'] as $p) {
+ $st = $item['build'][0] ? 'ok' : 'failed';
+ $lis .= <<<T
+<li>{$p['name']},
+ <span class="{$st}">build {$st}</span> (<a href="">log</a>),
+ <span class="{$st}">tests {$st}</span> (<a href="">log</a>),
+ <a href="">{$p['iso']}</a></li>
+T;
+ }
+ $text = <<<T
+<h4>Build {$item['build']}
+ <span style="font-weight: normal;">(<a href="">context diff w/ build {$item['prev_build']}</a>)</span>
+ &ndash; {$item['ts']}</h4>
+<ul>{$lis}</ul>
+T;
+ $values[] = array(
+ 't' => $text,
+ 'c' => null
+ );
+ }
+ }
+
+ return array(
+ 'title' => $this->title,
+ 'status' => 0,
+ 'values' => $values,
+ 'links' => $links
+ );
+ }
+/*
+ <li>DVD i586,
+ <span class="ok">build ok</span> (<a href="">log</a>),
+ <span class="failed">tests failed</span> (<a href="">log</a>),
+ <a href="">cauldron-2-dvd-i586-1a0-qafail.iso</a></li>
+ <li>DVD x86_64,
+ <span class="ok">build ok</span> (<a href="">log</a>),
+ <span class="ok">tests ok</span> (<a href="">log</a>),
+ <a href="">cauldron-2-dvd-i586-1a0-ok.iso</a></li>
+ <li>CD dual,
+ <span class="failed">build failed</span> (<a href="">log</a>)</li>
+ <li>building netinstall image...</li>
+ </ul>
+ <li><h4>Build 199
+ <span style="font-weight: normal;">(<a href="">context diff w/ build 198</a>)</span>
+ &ndash; 2011-03-12 23:03:15</h4>
+ <table border="1" class="isobuild">
+ <tbody>
+ <tr>
+ <th>Item</th>
+ <th>Build</th>
+ <th>Tests</th>
+ <th>Download</th>
+ </tr>
+ <tr>
+ <td>DVD i586</td>
+ <td><span class="ok">OK</span> (<a href="">log</a>)</td>
+ <td><span class="ok">OK</span> (<a href="">log</a>)</td>
+ <td><a href="">cauldron-2-1a0-dvd-i586-ok.iso</a></td>
+ </tr>
+ <tr>
+ <td>DVD x86_64</td>
+ <td><span class="ok">OK</span> (<a href="">log</a>)</td>
+ <td><span class="failed">FAILED</span> (<a href="">log</a>)</td>
+ <td><a href="">cauldron-2-1a0-dvd-x86_64-qafail.iso</a></td>
+ </tr>
+ <tr>
+ <td>CD dual</td>
+ <td><span class="failed">FAILED</span> (<a href="">log</a>)</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>netinstall</td>
+ <td><span class="ok">OK</span> (<a href="">log</a>)</td>
+ <td><span class="ok">OK</span> (<a href="">log</a>)</td>
+ <td><a href="">cauldron-2-1a0-netinstall-ok.iso</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </li>
+ </ul>
+*/
+}