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