-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
admin: details of stratums instances per algo #228
base: next
Are you sure you want to change the base?
Changes from 27 commits
900e5fa
bc7fa41
815c955
cdd72bf
7f7d533
e0e7c14
8509aae
b3a5761
a3a3ba8
762fbdb
2d4348e
885b448
461f788
ac42aab
5511d71
95aa7fc
f022346
5c5abe5
73ac94f
5d464ff
0af4987
682a293
e2ad0b5
18104f2
e451b12
a4a3ac9
2f591bc
25bb472
0169fa3
19e7933
594dda0
4ab3c35
eb56e26
7f6bf1f
d4bbbb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
$mining = getdbosql('db_mining'); | ||
|
||
$algo_selected = user()->getState('yaamp-algo'); | ||
|
||
$showrental = (bool) YAAMP_RENTAL; | ||
|
||
echo <<<END | ||
|
@@ -127,8 +129,16 @@ function cmp($a, $b) | |
$ts = $isup ? datetoa2($stratum->started) : ''; | ||
|
||
echo '<tr class="ssrow">'; | ||
echo '<td style="background-color: '.$algo_color.'"><b>'; | ||
echo CHtml::link($algo, '/site/gomining?algo='.$algo); | ||
|
||
$stratum_instances = dboscalar("SELECT COUNT(*) FROM stratums WHERE algo='$algo'"); | ||
$stratum_urls = dbolist("SELECT url FROM stratums WHERE algo='$algo'"); // AND NOT(url = NULL)"); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation spaces to fix (please keep tabs) |
||
$urls = $stratum_instances." Stratums TCP Server:"; | ||
foreach ($stratum_urls as $stra) { | ||
$urls = $urls . "\n" . $stra['url']; | ||
} | ||
echo '<td style="background-color: '.$algo_color.'"><b title="'.$urls.'">'; | ||
echo CHtml::link($algo, '/site/Gostratums?algo='.$algo); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cap should be removed here.. like "gomining"... the actionGostratum cap is only a way to make action functions more readable. |
||
echo '</b></td>'; | ||
echo '<td align="left" style="font-size: .8em;" data="'.$ts.'">'.$isup.' '.$time.'</td>'; | ||
echo '<td align="right" style="font-size: .8em;">'.(empty($coins) ? '-' : $coins).'</td>'; | ||
|
@@ -176,6 +186,35 @@ function cmp($a, $b) | |
echo '<td align="right" style="font-size: .8em; '.$style.'">'.$btcmhday1.'</td>'; | ||
|
||
echo '</tr>'; | ||
|
||
if ($algo_selected == $algo) { | ||
echo "<tr>"; | ||
echo "<td colspan='13'>"; | ||
echo "<table>"; | ||
echo "<thead>"; | ||
echo "<tr>"; | ||
echo "<th data-sorter='numeric' align='left">PID</th>"; | ||
echo "<th data-sorter='numeric' align='left">Time</th>"; | ||
echo "<th data-sorter='numeric' align='left">Started</th>"; | ||
echo "<th data-sorter='numeric' align='left">Workers</th>"; | ||
echo "<th data-sorter='numeric' align='left">Port</th>"; | ||
echo "<th data-sorter='numeric' align='left">Symbol</th>"; | ||
echo "<th data-sorter='numeric' align='left">url</th>"; | ||
echo "<th data-sorter='numeric' align='left">fds</th>"; | ||
echo "</tr>"; | ||
$stratums_details_list = dbolist("SELECT * FROM stratums WHERE algo:=algo='$algo_selected'"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. algo:=algo='...' ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to " to ' on th align |
||
foreach ($stratums_details_list as $stratums_details) { | ||
echo "<tr>"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, you need to fill data="$time" in the time td... and use the datetoa2() function for the content |
||
echo "<td>".$stratums_details['pid']."</td><td>".$stratums_details['time']."</td><td>"; | ||
echo $stratums_details['started']."</td><td>".$stratums_details['workers']."</td><td>"; | ||
echo $stratums_details['port']."</td><td>".$stratums_details['symbol']."</td><td>"; | ||
echo $stratums_details['url']."</td><td>".$stratums_details['fds']."</td><td>"; | ||
echo "</tr>"; | ||
} | ||
echo "</table>"; | ||
echo "</td>"; | ||
echo "</tr>"; | ||
} | ||
} | ||
|
||
echo '</tbody>'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to prevent "all" if its for the admin