Browse Source

miner.php define custom sum fields as a simple array

nfactor-troky
Kano 13 years ago
parent
commit
1a983e670f
  1. 15
      miner.php

15
miner.php

@ -79,9 +79,9 @@ $mobilepage = array(
'DEVS' => array('ID', 'Name', 'GPU', 'Status', 'MHS av', 'Accepted', 'Rejected', 'Utility'), 'DEVS' => array('ID', 'Name', 'GPU', 'Status', 'MHS av', 'Accepted', 'Rejected', 'Utility'),
'POOL' => array('POOL', 'Status', 'Accepted', 'Rejected', 'Last Share Time')); 'POOL' => array('POOL', 'Status', 'Accepted', 'Rejected', 'Last Share Time'));
$mobilesum = array( $mobilesum = array(
'SUMMARY' => array('MHS av' => 1, 'Found Blocks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Utility' => 1), 'SUMMARY' => array('MHS av', 'Found Blocks', 'Accepted', 'Rejected', 'Utility'),
'DEVS' => array('MHS av' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Utility' => 1), 'DEVS' => array('MHS av', 'Accepted', 'Rejected', 'Utility'),
'POOL' => array('Accepted' => 1, 'Rejected' => 1)); 'POOL' => array('Accepted', 'Rejected'));
# #
# customsummarypages is an array of these Custom Summary Pages # customsummarypages is an array of these Custom Summary Pages
$customsummarypages = array('Mobile' => array($mobilepage, $mobilesum)); $customsummarypages = array('Mobile' => array($mobilepage, $mobilesum));
@ -1358,6 +1358,15 @@ function showcustompage($pagename)
if ($sum === null) if ($sum === null)
$sum = array(); $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) if (count($page) <= 1)
{ {
echo "<tr><td colspan=100>Invalid custom summary page '$pagename' no content </td></tr>"; echo "<tr><td colspan=100>Invalid custom summary page '$pagename' no content </td></tr>";

Loading…
Cancel
Save