1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

miner.php define custom sum fields as a simple array

This commit is contained in:
Kano 2012-07-05 08:58:22 +10:00
parent 4003291f75
commit 1a983e670f

View File

@ -79,9 +79,9 @@ $mobilepage = array(
'DEVS' => array('ID', 'Name', 'GPU', 'Status', 'MHS av', 'Accepted', 'Rejected', 'Utility'),
'POOL' => array('POOL', 'Status', 'Accepted', 'Rejected', 'Last Share Time'));
$mobilesum = array(
'SUMMARY' => array('MHS av' => 1, 'Found Blocks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Utility' => 1),
'DEVS' => array('MHS av' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Utility' => 1),
'POOL' => array('Accepted' => 1, 'Rejected' => 1));
'SUMMARY' => array('MHS av', 'Found Blocks', 'Accepted', 'Rejected', 'Utility'),
'DEVS' => array('MHS av', 'Accepted', 'Rejected', 'Utility'),
'POOL' => array('Accepted', 'Rejected'));
#
# customsummarypages is an array of these Custom Summary Pages
$customsummarypages = array('Mobile' => array($mobilepage, $mobilesum));
@ -1358,6 +1358,15 @@ function showcustompage($pagename)
if ($sum === null)
$sum = array();
// convert them to searchable via isset()
foreach ($sum as $section => $fields)
{
$newfields = array();
foreach ($fields as $field)
$newfields[$field] = 1;
$sum[$section] = $newfields;
}
if (count($page) <= 1)
{
echo "<tr><td colspan=100>Invalid custom summary page '$pagename' no content </td></tr>";