Browse Source

miner.php add version numbers to the summary page

nfactor-troky
Kano 13 years ago
parent
commit
f91491637d
  1. 18
      miner.php

18
miner.php

@ -739,7 +739,7 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
echo $tableend.$tablebegin; 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); showhead('', null, $dthead);
foreach ($anss as $rig => $ans) foreach ($anss as $rig => $ans)
@ -748,23 +748,20 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
foreach ($ans as $item => $row) foreach ($ans as $item => $row)
{ {
if ($item != 'STATUS') if ($item != 'STATUS' && $item != 'VERSION')
continue; continue;
foreach ($dthead as $name => $x) 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>"; echo "<td align=right><input type=button value='Rig $rig' onclick='pr(\"?rig=$rig\",null)'></td>";
else else
{ {
if (isset($row[$name])) if (isset($row[$name]))
list($showvalue, $class) = fmt('STATUS', $name, $row[$name], $when, null);
else
{ {
$class = ''; list($showvalue, $class) = fmt('STATUS', $name, $row[$name], $when, null);
$showvalue = '&nbsp;'; 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 $tableend;
echo '<tr><td><br><br></td></tr>'; echo '<tr><td><br><br></td></tr>';
echo $tablebegin; echo $tablebegin;
return;
} }
$total = array(); $total = array();
@ -985,8 +984,9 @@ function display()
process(array($preprocess => $preprocess), $rig); process(array($preprocess => $preprocess), $rig);
echo $tablebegin; 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'); $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 $tableend;
echo '<tr><td><br><br></td></tr>'; echo '<tr><td><br><br></td></tr>';
echo $tablebegin; echo $tablebegin;

Loading…
Cancel
Save