summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf.php2
-rw-r--r--test_index.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/conf.php b/conf.php
index 0a14fd2..5d0b487 100644
--- a/conf.php
+++ b/conf.php
@@ -28,7 +28,7 @@ $upload_dir = '/var/lib/schedbot/uploads';
$max_modified = 2;
/** How many nodes are available. */
-$nodes_count = 2;
+$g_nodes_count = 2;
/** html > body > h1 title */
$title = '<a href="http://mageia.org/">Mageia</a> build system status';
diff --git a/test_index.php b/test_index.php
index 8f8d347..32f909e 100644
--- a/test_index.php
+++ b/test_index.php
@@ -268,9 +268,9 @@ if ($total > 0) {
<div id="status-chart"></div>
<div id="packagers-chart"></div>';
- $total_buildtime = round($buildtime_total / 60, 2);
- $avail_capacity = $max_modified * $g_nodes_count;
- $capacity_used = round($total_buildtime / $avail_capacity * 100, 2);
+ $total_buildtime = round($buildtime_total / 60, 1);
+ $avail_capacity = 24 * $max_modified * $g_nodes_count;
+ $capacity_used = round($total_buildtime / $avail_capacity * 100, 1);
$s .= sprintf(
'<table style="width: 70%%; margin: 2em 0 2em 80px;">
<tr><td>Total time</td><td>%s hours (%s%% of capacity with %d nodes)</td></tr>
@@ -279,7 +279,7 @@ if ($total > 0) {
</table>',
$total_buildtime,
$capacity_used,
- $nodes_count,
+ $g_nodes_count,
$buildtime_avg,
$build_count
);