diff --git a/miner.php b/miner.php index 3372d391..a1204e70 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 ""; 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 "$showvalue"; } - echo "$showvalue"; } } } @@ -774,6 +771,8 @@ function doforeach($cmd, $des, $sum, $head, $datetime) echo $tableend; echo '

'; 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 '

'; echo $tablebegin;