miner.php add version numbers to the summary page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/miner.php b/miner.php
index 3372d39..a1204e7 100644
--- a/miner.php
+++ b/miner.php
@@ -739,7 +739,7 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
echo $tableend.$tablebegin;
- $dthead = array('' => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1);
+ $dthead = array('' => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1, 'API' => 1, 'CGMiner' => 1);
showhead('', null, $dthead);
foreach ($anss as $rig => $ans)
@@ -748,23 +748,20 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
foreach ($ans as $item => $row)
{
- if ($item != 'STATUS')
+ if ($item != 'STATUS' && $item != 'VERSION')
continue;
foreach ($dthead as $name => $x)
{
- if ($name == '')
+ if ($item == 'STATUS' && $name == '')
echo "<td align=right><input type=button value='Rig $rig' onclick='pr(\"?rig=$rig\",null)'></td>";
else
{
if (isset($row[$name]))
- list($showvalue, $class) = fmt('STATUS', $name, $row[$name], $when, null);
- else
{
- $class = '';
- $showvalue = ' ';
+ list($showvalue, $class) = fmt('STATUS', $name, $row[$name], $when, null);
+ echo "<td$class align=right>$showvalue</td>";
}
- echo "<td$class align=right>$showvalue</td>";
}
}
}
@@ -774,6 +771,8 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
echo $tableend;
echo '<tr><td><br><br></td></tr>';
echo $tablebegin;
+
+ return;
}
$total = array();
@@ -985,8 +984,9 @@ function display()
process(array($preprocess => $preprocess), $rig);
echo $tablebegin;
+ doforeach('version', 'rig summary', array(), array(), true);
$sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH');
- doforeach('summary', 'summary information', $sum, array(), true);
+ doforeach('summary', 'summary information', $sum, array(), false);
echo $tableend;
echo '<tr><td><br><br></td></tr>';
echo $tablebegin;