SVN: toys/stbr: index.php queue.php

vip vip at pld-linux.org
Wed May 16 19:39:32 CEST 2007


Author: vip
Date: Wed May 16 19:39:31 2007
New Revision: 8564

Modified:
   toys/stbr/index.php
   toys/stbr/queue.php
Log:
- add status from builder
- temporary db-cache is disabled


Modified: toys/stbr/index.php
==============================================================================
--- toys/stbr/index.php	(original)
+++ toys/stbr/index.php	Wed May 16 19:39:31 2007
@@ -57,6 +57,8 @@
 <td width="250px">means you requested an upgrade</td></tr>
 <tr><td width="150px"><font color='red'>th-test:</font></td>
 <td width="250px">means you reqested an test-build</td></tr>
+<tr><td colspan="2">
+To see builder status info, mouseover the filled requests</td></tr>
 </tbody>
 </table>
 <br/>
@@ -112,12 +114,16 @@
 
 while($q = sqlite_fetch_array($inner))
 {
+	$filled = $queue->is_filled(array('spec' => $q['aspec'], 'date' => $p['date']));
+
+	/* temporal disable
 	if(empty($q['queue_requester']) && empty($q['queue_date']))
 	{
 		$filled = $queue->is_filled(array('spec' => $q['aspec'], 'date' => $p['date']));
 		if(count($filled))
 		{
 			$filled['date'] = date("d.m.Y H:i:s", $filled['date']);
+
 			$insert = "INSERT INTO status VALUES (";
 			$insert .= "'{$p['date']}','{$q['aspec']}', '{$filled['requester']}','{$filled['date']}', '{$filled['flags']}'";
 			$insert .= ");";
@@ -133,15 +139,35 @@
 	{
 		$filled = $q['queue_requester'] . '/' .$q['queue_date'] . '/' . $q['queue_flags'];
 	}
+	*/
 
 	$q['who'] = $q['arecipient'];
 	$q['arecipient'] = strrev($q['arecipient']);
+
+	$title = '';
+
+	if(count($filled))
+	{
+		$filled['date'] = date("d.m.Y H:i:s", $filled['date']);
+		$info = $filled['requester'] . '/' . $filled['date'] . '/' . $filled['flags'];
+		foreach($filled['builder'] as $key => $value)
+		{
+			$title .= "$value @ $key\n";
+		}
+//		$title = rtrim($title, ',');
+	}
+	else
+	{
+		$info = "not filled";
+	}
 ?>
-<tr>
+<tr title='<?=$title?>'>
 <td width="100px"><a href="http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/<?=$q['aspec']?>"><?=$q['aspec']?></a></td>
 <td width="80px"><script>vm("<?=$q['arecipient']?>","<?=$q['who']?>");</script></td>
 <td width="100px"><?=$q['builder']?></td>
-<td width="100px"><?=$filled?></td>
+<td width="100px">
+<?=$info?>
+</td>
 </tr>
 <?
 }

Modified: toys/stbr/queue.php
==============================================================================
--- toys/stbr/queue.php	(original)
+++ toys/stbr/queue.php	Wed May 16 19:39:31 2007
@@ -54,7 +54,19 @@
 				continue;
 	
 			if($spec['date'] < $queue_date)
-				$result = array('date' => $queue_date, 'requester' => $queue_requster, 'flags' => $queue_flags);
+			{
+				$builder = array();
+
+				foreach($group->batch->builder as $b)
+				{
+					$builder[(string)$b] = (string)$b->Attributes()->status;
+				}
+				$result = array('date' => $queue_date,
+						'requester' => $queue_requster,
+						'flags' => $queue_flags,
+						'builder' => $builder
+					);
+			}
 		}
 	
 		return $result;


More information about the pld-cvs-commit mailing list