From 752d8eccf0616fd8d38454674bbedc500a6ebce6 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 5 May 2011 15:15:59 +0000 Subject: Display build nodes as tooltip --- index.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index b563ee5..8ddf7c7 100644 --- a/index.php +++ b/index.php @@ -169,8 +169,11 @@ foreach ($matches as $val) { } else if ($ext == '.youri') { $pkgs[$key]['status']['youri'] = 1; } else if ($ext == '.lock') { - // parse build bot from $data - $pkgs[$key]['status']['build'] = 1; + preg_match("!.*\.iurt\.(.*)\.\d+\.\d+!", $data, $buildhost); + if ($pkgs[$key]['status']['build']) + array_push($pkgs[$key]['status']['build'], $buildhost[1]); + else + $pkgs[$key]['status']['build'] = array($buildhost[1]); } else if ($ext == '.done') { // beware! this block is called twice for a given $key @@ -328,11 +331,18 @@ if ($total > 0) { } elseif ($p['type'] == 'rejected') { $typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri'; } + $typestr = $p['type']; + if ($p['status']['build']) { + $typealt = 'Building on'; + foreach ($p['status']['build'] as $h) + $typealt .= " $h"; + $typestr = "$typestr"; + } $s .= ''; $s .= ($typelink != '') ? - sprintf('%s', $typelink, $p['type']) : - $p['type']; + sprintf('%s', $typelink, $typestr) : + $typestr; $s .= ''; if ($p['type'] == 'uploaded') { -- cgit v1.2.1