summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-11 19:23:33 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-11 19:23:33 +0000
commitf3f7f00c56335a2434770ad7653e56c4882f62ab (patch)
tree9a1a62caf4bf823b01afd364ee6785adb47f7b8f
parentbacc45cb73a18c32c4b35fd4346b3ea83513c2b3 (diff)
downloadpkgsubmit-f3f7f00c56335a2434770ad7653e56c4882f62ab.tar
pkgsubmit-f3f7f00c56335a2434770ad7653e56c4882f62ab.tar.gz
pkgsubmit-f3f7f00c56335a2434770ad7653e56c4882f62ab.tar.bz2
pkgsubmit-f3f7f00c56335a2434770ad7653e56c4882f62ab.tar.xz
pkgsubmit-f3f7f00c56335a2434770ad7653e56c4882f62ab.zip
reorganize page grid
-rw-r--r--conf.php2
-rw-r--r--lib.php8
-rw-r--r--style.css12
-rw-r--r--test_index.php78
4 files changed, 54 insertions, 46 deletions
diff --git a/conf.php b/conf.php
index 5d0b487..20f13ce 100644
--- a/conf.php
+++ b/conf.php
@@ -31,7 +31,7 @@ $max_modified = 2;
$g_nodes_count = 2;
/** html > body > h1 title */
-$title = '<a href="http://mageia.org/">Mageia</a> build system status';
+$title = 'Build system status';
/** Should crawlers index this page or not? meta[robots] tag.*/
$robots = 'index,nofollow,nosnippet,noarchive';
diff --git a/lib.php b/lib.php
index 819c3bb..3cda4b9 100644
--- a/lib.php
+++ b/lib.php
@@ -417,7 +417,7 @@ function draw_status_chart() {
var options = {
'title':'Packages status',
- 'width':500,
+ 'width':600,
'height':200,
'colors': ['white', 'yellow', 'blue', 'green', 'orange', 'red'],
'backgroundColor': '#f8f8f8'
@@ -447,7 +447,7 @@ function draw_packagers_chart() {
var options = {
'title':'Packagers',
- 'width':500,
+ 'width':600,
'height':200,
'backgroundColor': '#f8f8f8',
'sliceVisibilityThreshold': 2/90
@@ -510,7 +510,7 @@ function draw_buildtime_chart() {
var options = {
title: 'How long are most of the builds?',
hAxis: {title: 'Duration'},
- 'width':500,
+ 'width':600,
'height':200,
'backgroundColor': '#f8f8f8'
};
@@ -539,7 +539,7 @@ function draw_buildschedule_chart() {
var options = {
title: 'When do builds happen? (UTC - working on a local time fix)',
hAxis: {title: 'Hours'},
- 'width':500,
+ 'width':600,
'height':200,
'curveType': 'function',
'backgroundColor': '#f8f8f8'
diff --git a/style.css b/style.css
index 50dbbac..be9d17b 100644
--- a/style.css
+++ b/style.css
@@ -9,15 +9,15 @@ html, body, table {
}
body { font-size: 80%; }
+hr { display: none; }
article {
- position: absolute;
- top: 128px;
}
+footer { margin: 0; padding: 0.4em 1em; background: #e0e0e0; color: #888; font-size: 80%; }
+footer a { color: #555; text-decoration: none; }
.clear { clear: both; }
table {
border-spacing: 0;
- float: left;
}
tr { padding: 0; margin: 0; }
th { padding: 0.2em 0.5em; margin: 0; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; text-align: left; font-size: 85%; color: #999; }
@@ -58,13 +58,10 @@ a.package { color: #202020; text-decoration: none; }
.number, .percent { text-align: right; }
-#stats { float: right; border-left: 1px solid #f0f0f0; margin: 0; padding: 0; }
#score { margin-bottom: 2em; font-family: Helvetica, Verdana, Arial, sans-serif; }
#score-box { width: 100px; height: 100px; background: #faa; }
#score-meter { width: 100px; background: #afa; }
-.figures { display: table; margin: 0; padding: 0; }
-.figures li { display: table-cell; margin: 0; padding: 0 2em; border-right: 1px solid #a0a0a0; background: #f0f0f0; border-bottom: 1px solid #a0a0a0; vertical-align: top; }
.figure { font-size: 160%; font-weight: bold; }
.action-btn {
text-decoration: none;
@@ -76,7 +73,8 @@ a.package { color: #202020; text-decoration: none; }
font-size: 80%;
}
-.builds { list-style: none; padding: 0; margin: 0 0 0 2em; }
+#stats, .figures, .builds { list-style: none; padding: 0; margin: 0 0 2em 2em; float: left; text-align: left; }
+
.builds table { width: 720px; }
#submitted-packages { width: 720px; }
diff --git a/test_index.php b/test_index.php
index fb0f0a1..d7fbe0f 100644
--- a/test_index.php
+++ b/test_index.php
@@ -81,22 +81,8 @@ publish_stats_headers(
<link rel="stylesheet" href="style.css">
</head>
<body class="contribute">
- <header id="mgnavt">
- <h1><?php echo $title ?></h1>
- </header>
- <article>
<?php
-$bannerfile = dirname(__FILE__) . '/banner.html';
-if (file_exists($bannerfile)) {
- echo file_get_contents($bannerfile);
-}
-
-if (!is_null($g_user) || isset($_GET['package'])) {
- echo '<a href="/">&laquo;&nbsp;Back to full list</a>';
-}
-
-echo '<ul class="figures">';
$figures_list = array();
if (!isset($_GET['package'])) {
@@ -109,44 +95,64 @@ if (!isset($_GET['package'])) {
|| $unmaintained_count > 0
) {
if ($missing_deps_count > 0) {
- $figures_list[] = sprintf('<span class="figure">%d</span> <a rel="nofollow" href="%s">broken dependencies</a>',
+ $figures_list[] = sprintf('<strong>%d</strong> <a rel="nofollow" href="%s">broken <abbr title="dependencies">deps.</abbr></a>',
$missing_deps_count,
'http://check.mageia.org/cauldron/dependencies.html'
);
}
if ($unmaintained_count > 0) {
- $figures_list[] = sprintf('<span class="figure">%d</span> <a rel="nofollow" href="%s">unmaintained package%s</a>',
+ $figures_list[] = sprintf('<strong>%d</strong> <a rel="nofollow" href="%s">unmaintained</a>',
$unmaintained_count,
- 'data/unmaintained.txt',
- plural($unmaintained_count)
+ 'data/unmaintained.txt'
);
}
if (count($figures_list) > 0)
$figures_list[count($figures_list)-1] .= sprintf(' <a href="%s" class="action-btn" title="%s">%s</a>',
'https://wiki.mageia.org/en/Importing_packages',
- 'YES you can!', 'you can help!');
+ 'YES you can help!', 'pick one');
}
preg_match_all('/<span class="bz_result_count">(\d+)/', file_get_contents("https://bugs.mageia.org/buglist.cgi?quicksearch=%40qa-bugs+-kw%3Avali"), $matches);
$qa_bugs = $matches[1][0];
if ($qa_bugs > 0) {
- $figures_list[] = sprintf('<span class="figure">%d</span> <a rel="nofollow" href="%s">package update%s to validate</a>
+ $figures_list[] = sprintf('<strong>%d</strong> <a rel="nofollow" href="%s">update%s to validate</a>
<a href="%s" class="action-btn" title="%s">%s</a>',
$qa_bugs,
'https://bugs.mageia.org/buglist.cgi?quicksearch=%40qa-bugs+-kw%3Avali',
plural($qa_bugs),
'https://wiki.mageia.org/en/QA_process_for_validating_updates',
- 'YES you can!', 'you can help!'
+ 'YES you can help!', 'see how'
);
}
+ $html_figures = null;
if (count($figures_list) > 0) {
- echo array_reduce($figures_list, function ($res, $e) { return $res . '<li><p>' . $e . '</p></li>'; }, '');
+ $html_figures = 'Packages: ' . implode(', ', $figures_list) . '.';
+ }
+
+?>
+ <header id="mgnavt">
+ <h1><?php echo $title ?></h1>
+ <ul>
+ <li><a href="#stats">Stats</a></li>
+ <li><?php echo $html_figures; ?></li>
+ </ul>
+ </header>
+ <article>
+<?php
+
+ $bannerfile = dirname(__FILE__) . '/banner.html';
+ if (file_exists($bannerfile)) {
+ echo file_get_contents($bannerfile);
}
- echo '</ul><ul class="builds">';
+ if (!is_null($g_user) || isset($_GET['package'])) {
+ echo '<a href="/">&laquo;&nbsp;Back to full list</a>';
+ }
+
+ echo '<ul class="builds">';
$buildtime_stats = array();
// Builds in progress
@@ -273,10 +279,13 @@ if ($total > 0) {
'<tbody>', $s, '</tbody>',
'</table>';
+ echo '</li></ul>';
+
// Stats
- $s = '<div id="stats">
- <div id="status-chart"></div>
- <div id="packagers-chart"></div>';
+ $s = '<ul id="stats">
+ <li><p><span class="figure">Stats</span></p></li>
+ <li id="status-chart"></li>
+ <li id="packagers-chart"></li>';
$total_buildtime = round($buildtime_total / 60, 1);
$avail_capacity = 24 * $max_modified * $g_nodes_count;
@@ -294,12 +303,11 @@ if ($total > 0) {
$build_count
);
- $s .= '<br /><br />
- <div id="buildtime-chart"></div>
- <div id="buildschedule-chart"></div>
- </div>';
+ $s .= '<li id="buildtime-chart"></li>
+ <li id="buildschedule-chart"></li>
+ </ul>';
- echo $s, '</li></ul>';
+ echo $s;
uksort($buildtime_stats, "timesort");
echo '<script>',
@@ -321,11 +329,13 @@ else
</ul>
<script src="js/jquery.js"></script>
<script src="js/pkgsubmit.js"></script>
- <script src="//nav.mageia.org/js"></script>
+ <script src="//nav.mageia.org/js/"></script>
<div class="clear"></div>
<hr />
- <p>Generated at <?php echo $date_gen; ?>.
- Code for this page is in <a rel="nofollow" href="http://svnweb.mageia.org/soft/build_system/web/">http://svnweb.mageia.org/soft/build_system/web/</a>.</p>
+ <footer>
+ <p>Generated at <?php echo $date_gen; ?>.
+ Code for this page is in <a rel="nofollow" href="http://svnweb.mageia.org/soft/build_system/web/">http://svnweb.mageia.org/soft/build_system/web/</a>.</p>
+ </footer>
</article>
</body>
</html>