tazwok view web/index.php @ rev 247
Webserver: add summary
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Feb 12 04:01:24 2011 +0100 (2011-02-12) |
parents | d30774579470 |
children | 093de6dde7f8 |
line source
3 <?php
4 $version=$_GET["version"];
5 if (file_exists("conf-$version.php")) {
6 include("conf-$version.php");
7 }
8 else {
9 if (file_exists("conf.php")) {
10 include("conf.php");
11 }
12 }
13 ?>
14 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
15 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
16 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
17 <head>
18 <title>SliTaz Build Bot</title>
19 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
20 <meta name="description" content="Tazbb web interface" />
21 <meta name="robots" content="index nofollow" />
22 <link rel="shortcut icon" href="web/favicon.ico" />
23 <link rel="stylesheet" type="text/css" href="web/slitaz.css" />
24 </head>
25 <body>
27 <!-- Header -->
28 <div id="header">
29 <!-- Access -->
30 <div id="access">
31 <?php
32 $versions_list = fopen('repositories.list', 'r');
33 if($versions_list)
34 {
35 $otherversion = '';
36 while(!feof($versions_list))
37 {
38 $otherversion = fgets($versions_list);
39 echo "<a href=\"?version=$otherversion\">$otherversion</a>";
40 }
41 fclose($versions_list);
42 }
43 ?>
44 </div>
45 <a href="http://bb.slitaz.org/"><img id="logo"
46 src="web/logo.png"
47 title="bb.slitaz.org" alt="bb.slitaz.org" /></a>
48 <p id="titre">#!/Build/Bot/<?php echo $version; ?></p>
49 </div>
51 <!-- Content -->
52 <div id="content-full">
54 <!-- Block begin -->
55 <div class="block">
56 <!-- Nav block begin -->
57 <div id="block_nav">
58 <h3><img src="pics/website/development.png" alt="" />Developers</h3>
59 <ul>
60 <li><a href="http://www.slitaz.org/en/devel/">Website/devel</a></li>
61 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
62 <li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
63 <li><a href="http://people.slitaz.org/">People Stuff</a></li>
64 <li><a href="http://scn.slitaz.org/">Community Network</a></li>
65 </ul>
66 <!-- Nav block end -->
67 </div>
68 <!-- Top block begin -->
69 <div id="block_top">
70 <h1>Build Bot</h1>
71 <p>
72 Tazwok-experimental is a <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
73 Build Bot, it automatically cooks and tests packages commited in
74 the wok. SliTaz <a href="http://pkgs.slitaz.org/">packages</a> are
75 cooked on the project main server: code name
76 <a href="http://tank.slitaz.org">Tank</a>. This web interface gives
77 the current status of the build bot and the last report
78 about any packages modified by the SliTaz contributors in
79 the Mercurial repositories, aka
80 <a href="http://hg.slitaz.org/">Hg repos</a>.
81 </p>
82 <!-- Top block end -->
83 </div>
84 <!-- Block end -->
85 </div>
87 <h2>Cooklog</h2>
89 <p>
90 <form action="log.php" method="get">
91 <input type="hidden" name="version" value="<?php
92 echo "$version";
93 ?>
94 " />
95 Show pkg log:<br />
96 <input type="text" name="package" />
97 <!-- <input type="submit" value="Show" /> -->
98 </form><br />
99 Note:<br />
100 Flavors/Iso build log are named iso-?flavor <br />
101 Temporary toolchain log are named tmp-toolchain-?package <br />
102 </p>
104 <h2>Summary</h2>
105 <pre class="package">
106 <?php
107 // Check curent status (update in real time) and display summary.
108 if (file_exists($lockfile)) {
109 echo "Status : Chroot is mounted\n";
110 }
111 else {
112 echo "Status : Chroot is not mounted\n";
113 }
114 include("$db_dir/summary");
115 ?>
116 </pre>
117 <p>
118 Packages in the wok: <?php
119 system("cd $wok && ls -1 | wc -l"); ?><br />
120 Commited packages: <?php
121 system("wc -l $packages/commit | cut -f 1 -d ' '"); ?><br />
122 Packages to cook: <?php
123 system("wc -l $packages/cooklist | cut -f 1 -d ' '"); ?><br />
124 Broken packages: <?php
125 system("wc -l $packages/broken | cut -f 1 -d ' '"); ?><br />
126 Blocked packages: <?php
127 system("wc -l $packages/blocked | cut -f 1 -d ' '"); ?>
128 </p>
130 <h3>Commit</h3>
131 <pre class="package">
132 <?php
133 include("$db_dir/commit");
134 ?>
135 </pre>
137 <h3>Cooklist</h3>
138 <pre class="package">
139 <?php
140 include("$db_dir/cooklist");
141 ?>
142 </pre>
144 <h3>Broken</h3>
145 <pre class="package">
146 <?php
147 include("$db_dir/broken");
148 ?>
149 </pre>
151 <h3>Blocked</h3>
152 <pre class="package">
153 <?php
154 include("$db_dir/blocked");
155 ?>
156 </pre>
158 <h3>Last cooked packages</h3>
159 <pre class="package">
160 <?php
161 system("cd $incoming && ls -1t *.tazpkg | head -20 | \
162 while read file; do echo -n \$(stat -c '%y' $incoming/\$file | \
163 cut -d. -f1); echo ' '\$file; done"); ?>
164 </pre>
166 <h3>Last removed packages</h3>
167 <pre class="package">
168 <?php
169 include("$db_dir/removed");
170 ?>
171 </pre>
173 <h3>Last cooked flavors</h3>
174 <pre class="package">
175 <?php
176 system("cd $packages && ls -1t *.flavor | head -20 | \
177 while read file; do echo -n \$(stat -c '%y' $packages/\$file | \
178 cut -d. -f1); echo ' '\$file; done"); ?>
179 </pre>
181 <!-- End of content -->
182 </div>
184 <!-- Footer -->
185 <div id="footer">
186 <div class="right_box">
187 <h4>SliTaz Network</h4>
188 <ul>
189 <li><a href="http://www.slitaz.org/">Main Website</a></li>
190 <li><a href="http://doc.slitaz.org/">Documentation</a></li>
191 <li><a href="http://forum.slitaz.org/">Support Forum</a></li>
192 <li><a href="http://scn.slitaz.org/">Community Network</a></li>
193 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
194 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
195 </ul>
196 </div>
197 <h4>SliTaz Website</h4>
198 <ul>
199 <li><a href="#header">Top of the page</a></li>
200 <li>Copyright © <span class="year"></span>
201 <a href="http://www.slitaz.org/">SliTaz</a></li>
202 <li><a href="http://www.slitaz.org/en/about/">About the project</a></li>
203 <li><a href="http://www.slitaz.org/netmap.php">Network Map</a></li>
204 <li>Page modified the <?php echo (date( "d M Y", getlastmod())); ?></li>
205 <li><a href="http://validator.w3.org/check?uri=referer"><img
206 src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
207 title="Code validé XHTML 1.0"
208 style="width: 80px; height: 15px; vertical-align: middle;" /></a></li>
209 </ul>
210 </div>
212 </body>
213 </html>