wok-next view tazbb/stuff/web/index.php @ rev 5823

tazbb: add stable support for log.php
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 15 17:53:08 2010 +0200 (2010-07-15)
parents ea926ba90106
children 8e71b2f70bb0
line source
1 <?php
2 $version='cooking';
3 $notversion='stable';
4 $wok='wok';
5 if (isset($_GET['stable'])) {
6 $version='stable';
7 $notversion='cooking';
8 $wok='wok-stable';
9 }
10 include("conf.php");
11 ?>
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
13 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
15 <head>
16 <title>SliTaz Build Bot</title>
17 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
18 <meta name="description" content="Tazbb web interface" />
19 <meta name="robots" content="index nofollow" />
20 <link rel="shortcut icon" href="favicon.ico" />
21 <link rel="stylesheet" type="text/css" href="slitaz.css" />
22 </head>
24 <body bgcolor="#ffffff">
25 <!-- Header -->
26 <div id="header">
27 <a name="top"></a></a><?php if ($version == 'stable') { ?>
28 <!-- Access -->
29 <div id="access">
30 <a href="/<?php if ($version != 'stable')
31 echo "?stable"; ?>" title="Slitaz <?php
32 echo $notversion ?> packages"><?php echo $notversion ?></a>
33 </div>
34 <?php } ?>
35 <a href="http://bb.slitaz.org/"><img id="logo"
36 src="pics/website/logo.png" title="bb.slitaz.org" alt="bb.slitaz.org"
37 style="border: 0px solid ; width: 200px; height: 74px;" /></a>
38 <p id="titre">#!/bb/packages<?php if ($version == 'stable') echo '/stable'; ?></p>
39 </div>
41 <!-- Navigation menu -->
42 <div id="nav">
44 <div class="nav_box">
45 <h4>SliTaz Network</h4>
46 <ul>
47 <li><a href="http://www.slitaz.org/">Main Website</a></li>
48 <li><a href="http://doc.slitaz.org/">Documentation</a></li>
49 <li><a href="http://forum.slitaz.org/">Community Forum</a></li>
50 <li><a href="http://labs.slitaz.org/">SliTaz Labs</a></li>
51 <li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
52 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
53 <li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
54 </ul>
55 </div>
57 <div class="nav_box">
58 <h4>SliTaz Developers</h4>
59 <ul>
60 <li><a href="http://hg.slitaz.org/">Hg Repositories</a></li>
61 <li><a href="http://tank.slitaz.org/">Tank Server</a></li>
62 <li><a href="http://people.slitaz.org/">People Stuff</a></li>
63 <li><a href="http://labs.slitaz.org/wiki/distro">Distro Wiki</a></li>
65 </ul>
66 </div>
68 <!-- End navigation menu -->
69 </div>
71 <!-- Content top. -->
72 <div id="content_top">
73 <div class="top_left"></div>
74 <div class="top_right"></div>
75 </div>
77 <!-- Content -->
78 <div id="content">
80 <h1><font color="#3E1220">Build Bot</font></h1>
81 <h2><font color="#DF8F06">/usr/bin/tazbb</font></h2>
83 <p>
84 Tazbb is a <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a> Build Bot,
85 it automatically cooks and tests packages commited in the wok. SliTaz
86 <a href="http://pkgs.slitaz.org/">packages</a> are cooked on the project
87 main server: code name <a href="http://tank.slitaz.org">Tank</a>. This
88 web interface gives the current status of the build bot and the last report
89 about any packages modified by the SliTaz contributors in the Mercurial
90 repositories, aka <a href="http://hg.slitaz.org/">Hg repos</a>.
91 </p>
93 <p>
94 <form action="log.php" method="get">
95 <?php
96 if ($version == 'stable')
97 echo '<input type="hidden" name="stable" value="1" />';
98 ?> Show cooklog: <input type="text" name="package" />
99 <!-- <input type="submit" value="Show" /> -->
100 </form>
101 </p>
103 <h3>Summary</h3>
104 <pre class="package">
105 <?php
107 // Check curent status (update in real time) and display summary.
109 if (file_exists($lockfile)) {
110 echo "Status : Running ";
111 include("$db_dir/running");
112 }
113 else {
114 echo "Status : Not currently running\n";
115 }
116 include("$db_dir/summary");
118 ?>
119 </pre>
121 <h3>Report</h3>
122 <pre class="package">
123 <?php
124 include("$db_dir/report");
125 ?>
126 </pre>
128 <h3>Cooklist</h3>
129 <pre class="package">
130 <?php
131 include("$db_dir/cooklist");
132 ?>
133 </pre>
135 <h3>Unbuilt</h3>
136 <pre class="package">
137 <?php
138 include("$db_dir/unbuilt");
139 ?>
140 </pre>
142 <h3>Blocked</h3>
143 <pre class="package">
144 <?php
145 include("$db_dir/blocked.urls");
146 ?>
147 </pre>
149 <h3>Corrupted</h3>
150 <pre class="package">
151 <?php
152 include("$db_dir/corrupted");
153 ?>
154 </pre>
156 <h3>Last cooked packages</h3>
157 <pre class="package">
158 <?php
159 system("cd $packages && ls -1t *.tazpkg | head -20 | \
160 while read file; do echo -n \$(stat -c '%y' $packages/\$file | \
161 cut -d. -f1); echo ' '\$file; done"); ?>
162 </pre>
164 <h3>Last removed packages</h3>
165 <pre class="package">
166 <?php
167 include("$db_dir/removed");
168 ?>
169 </pre>
171 <h3>Last cooked flavors</h3>
172 <pre class="package">
173 <?php
174 system("cd $packages && ls -1t *.flavor | head -20 | \
175 while read file; do echo -n \$(stat -c '%y' $packages/\$file | \
176 cut -d. -f1); echo ' '\$file; done"); ?>
177 </pre>
179 <!-- End of content with round corner -->
180 </div>
182 <!-- Start of footer and copy notice -->
183 <div id="copy">
184 <p>
185 Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
186 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
187 </p>
188 <!-- End of copy -->
189 </div>
191 <!-- Bottom and logo's -->
192 <div id="bottom">
193 <p>
194 <a href="http://validator.w3.org/check?uri=referer"><img
195 src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
196 title="Code validé XHTML 1.0"
197 style="width: 80px; height: 15px;" /></a>
198 </p>
199 </div>
201 </body>
202 </html>