summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-10 14:59:17 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-10 14:59:17 +0000
commit72ee5d17e6bdff1878cda461f949524546ba7c4a (patch)
tree8ddb019736a45f56b6460e6b1c286e609cd3d888
parent4515ec1070d6e7842658c61a70997f08f78b18b4 (diff)
downloadpkgsubmit-72ee5d17e6bdff1878cda461f949524546ba7c4a.tar
pkgsubmit-72ee5d17e6bdff1878cda461f949524546ba7c4a.tar.gz
pkgsubmit-72ee5d17e6bdff1878cda461f949524546ba7c4a.tar.bz2
pkgsubmit-72ee5d17e6bdff1878cda461f949524546ba7c4a.tar.xz
pkgsubmit-72ee5d17e6bdff1878cda461f949524546ba7c4a.zip
whole status box is actionable
-rw-r--r--style.css18
-rw-r--r--test_index.php14
2 files changed, 20 insertions, 12 deletions
diff --git a/style.css b/style.css
index 5003568..f35f4ee 100644
--- a/style.css
+++ b/style.css
@@ -33,13 +33,15 @@ tr.todo { background: white; }
tr.building { background: #ffff99; }
tr.partial { background: #bbbbff; }
-td.status-box { width: 1em; height: 1em; }
-tr.uploaded td.status-box { background: green; }
-tr.failure td.status-box { background: red; }
-tr.rejected td.status-box { background: orange; }
-tr.todo td.status-box { background: white; }
-tr.building td.status-box { background: yellow; }
-tr.partial td.status-box { background: blue; }
+.status-box { display: inline-block; width: 12px; height: 12px; }
+tr.uploaded .status-box { background: green; }
+tr.failure .status-box { background: red; }
+tr.rejected .status-box { background: orange; }
+tr.todo .status-box { background: white; }
+tr.building .status-box { background: yellow; }
+tr.partial .status-box { background: blue; }
+
+.status-link { text-decoration: none; display: block; margin: 0; padding: 0; }
tr .media,
tr .timeinfo,
@@ -49,6 +51,8 @@ td .media,
td .timeinfo,
td .revision a { color: #777777; text-decoration: none; }
+a.package { color: #202020; text-decoration: none; }
+
.number, .percent { text-align: right; }
#stats { float: right; border-left: 1px solid #f0f0f0; }
diff --git a/test_index.php b/test_index.php
index a4a36fb..14338d5 100644
--- a/test_index.php
+++ b/test_index.php
@@ -244,17 +244,21 @@ if ($total > 0) {
}
$s .= '<td>';
- $s .= ($typelink != '') ?
- sprintf('<a rel="nofollow" href="%s" class="status-link">%s</a>', $typelink, $typestr) :
- $typestr;
+ $show_time = '';
if ($p['type'] == 'uploaded') {
$tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead?
- $s .= '<span class="timeinfo">' . $tdiff . '</span>';
+ $show_time = '<span class="timeinfo">' . $tdiff . '</span>';
$tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60;
@$buildtime_stats[timediff(0, $tdiff)] += 1;
}
+ $s .= ($typelink != '')
+ ? sprintf('<a rel="nofollow" href="%s" class="status-link"><span class="status-box"></span> %s %s</a>',
+ $typelink, $typestr, $show_time)
+ : sprintf('<span class="status-box"></span> %s %s',
+ $typestr, $show_time);
+
$s .= '</td></tr>';
}
echo sprintf('<li><p><span class="figure">%d</span> packages submitted in the past %d&nbsp;hours:</p>', $total, $max_modified * 24);
@@ -265,7 +269,7 @@ if ($total > 0) {
<th>Package</th>
<th>Who <span class="timeinfo">when</span></th>
<th>Target <span class="media">media</span></th>
- <th colspan="2">Status</th>
+ <th>Status <span class="timeinfo">build time</span></th>
</tr></thead>',
'<tbody>', $s, '</tbody>',
'</table>';