Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

v2.0.0.490-beta

  • Loading branch information...
Stoyvo committed Jan 31, 2015
2 parents 2b360da + a4e2694 commit ae9ca60fb376fb9992ba80a5ed6ee543409193b3
Showing with 50 additions and 17 deletions.
  1. +9 −1 CHANGELOG.md
  2. +12 −0 debug.php
  3. +16 −8 includes/classes/miners/cgminer.php
  4. +1 −1 includes/inc.php
  5. +2 −2 js/dashboard/Rig.js
  6. +8 −4 js/dashboard/RigCollection.js
  7. +2 −1 templates/panels/overview.php
@@ -1,4 +1,13 @@

[ v2.0.0.490-beta ]

HOTFIXES
========
- Fixed issue with rig overview not updating properly on first load
- Changed total hashrate to use avg speed

---

[ v2.0.0.489-beta ]

FEATURES
@@ -35,7 +44,6 @@
- [+COIN] ReddCoin
- [+COIN] XPY - PayCoin | Note: Using ZenCloud or PayBase address may display balance of 0


HOTFIXES
========
- Rewrote all Wallet handling + UI Updates
@@ -61,13 +61,22 @@ function runCMD($host, $port, $cmd) {
echo '<br /><hr /><br />';
if ($_POST['submit'] == 'one') {
$config = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"config"}'), true);
$debug = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"debug"}'), true);
$summary = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"summary"}'), true);
$dev = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"devs"}'), true);
$devdetails = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"devdetails"}'), true);
$stats = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"stats"}'), true);
$eStats = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"estats","parameter":1}'), true);
$pools = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"pools"}'), true);
$ascset = json_decode(runCMD($_POST['address'], $_POST['port'], '{"command":"ascset","parameter":"0, help"}'), true);
echo "<pre>config:";
print_r($config);
echo "</pre>";
echo "<pre>debug:";
print_r($debug);
echo "</pre>";
echo "<pre>SUMMARY:";
print_r($summary);
echo "</pre>";
@@ -78,6 +87,9 @@ function runCMD($host, $port, $cmd) {
echo "<pre>devdetails:";
print_r($devdetails);
echo "</pre>";
echo "<pre>stats:";
print_r($stats);
echo "</pre>";
echo "<pre>eStats:";
print_r($eStats);
echo "</pre>";
@@ -18,7 +18,8 @@ class Miners_Cgminer extends Miners_Abstract {
// Common Data
protected $_devStatus = array();
protected $_rigStatus = 'offline';
protected $_rigHashrate = 0;
protected $_rigHashrate_5s = 0;
protected $_rigHashrate_avg = 0;
protected $_activePool = array();
protected $_upTime;
@@ -41,7 +42,8 @@ public function overview() {
'name' => $this->_name,
'status' => $this->_rigStatus,
'algorithm' => $this->_settings['algorithm'],
'hashrate_5s' => $this->_rigHashrate,
'hashrate_avg' => $this->_rigHashrate_avg,
'hashrate_5s' => $this->_rigHashrate_5s,
'active_pool' => $this->_activePool,
'uptime' => $this->_upTime,
);
@@ -272,8 +274,6 @@ public function prioritizePools($poolPriority, $poolId) {
$this->cmd('{"command":"poolpriority","parameter":"'. implode(',', $priorityList) .'"}');
$this->fetchPools();
return;
}
@@ -390,7 +390,8 @@ private function getActivePool() {
private function getDevStatus() {
foreach ($this->_devs as $devKey => $dev) {
// Might as well get the hashrate
$this->_rigHashrate += ($dev['MHS 5s'] ? $dev['MHS 5s'] : $dev['MHS 20s']);
$this->_rigHashrate_5s += ($dev['MHS 5s'] ? $dev['MHS 5s'] : $dev['MHS 20s']);
$this->_rigHashrate_avg += ($dev['MHS av'] ? $dev['MHS av'] : $dev['MHS av']);
$status = array();
@@ -541,11 +542,18 @@ private function fetchData() {
//Misc data
$this->_upTime = formatTimeElapsed($this->_summary['Elapsed']);
if (empty($this->_rigHashrate)) {
if (empty($this->_rigHashrate_5s)) {
if (isset($this->_summary['MHS av'])) {
$this->_rigHashrate_5s = $this->_summary['MHS av'];
} else if (isset($this->_summary['GHS av'])) {
$this->_rigHashrate_5s = $this->_summary['GHS av']*1000;
}
}
if (empty($this->_rigHashrate_avg)) {
if (isset($this->_summary['MHS av'])) {
$this->_rigHashrate = $this->_summary['MHS av'];
$this->_rigHashrate_avg = $this->_summary['MHS av'];
} else if (isset($this->_summary['GHS av'])) {
$this->_rigHashrate = $this->_summary['GHS av']*1000;
$this->_rigHashrate_avg = $this->_summary['GHS av']*1000;
}
}
@@ -31,7 +31,7 @@
$settings = $cryptoGlance->getSettings();
//// Current Build:
define('CURRENT_VERSION', 'v2.0.0.489-beta');
define('CURRENT_VERSION', 'v2.0.0.490-beta');
// Misc function used throughout cryptoglance
@@ -82,6 +82,8 @@
this.panelStatus = overview.status.panel
this.$rigEl[0].className = 'panel panel-primary panel-rig ' + this.panelStatus
}

this.$rigSummaryBody.html(this._buildStatus(summary))

if (this.deviceCollection.length > 0) {
var deviceHtml = this.deviceCollection.update(devices)
@@ -93,8 +95,6 @@
this.$rigSummaryTableSummary.hide();
}

this.$rigSummaryBody.html(this._buildStatus(summary))

if (this.init) {
this.$rigNavEl.find('li:first-child').addClass('active')
}
@@ -38,12 +38,11 @@

/*========== Initial data call ==========*/
this._getData(function (data) {
_self._buildOverview(data)
// _self._buildOverview(data)

_self.apiData = { type: 'rigs', action: 'update' }

_self._update() // Populate all devices in the collection
_self._update() // Build out summary stats

/*========== Setup polling ==========*/
setInterval(function () {
@@ -77,6 +76,8 @@
rig.update(data)
overviewData[index] = data
_self._rigsResponded++
console.log(_self);
console.log('-----');
if (_self._rigsResponded === _self.collection.length) {
_self._ready = true
_self._buildOverview(overviewData)
@@ -111,14 +112,15 @@
if (res.overview) {
res = res.overview
}

_self.overviewTableData += _self._buildOverviewRow(res, index + 1)
_self.overallHashrate += parseFloat(res.hashrate_5s)
_self.overallHashrate += parseFloat(res.hashrate_avg)

if (typeof algorithms[res.algorithm] == 'undefined') {
var algorithm = res.algorithm;
algorithms[algorithm] = 0;
}
algorithms[res.algorithm] += parseFloat(res.hashrate_5s)
algorithms[res.algorithm] += parseFloat(res.hashrate_avg)
}

this.overviewTableData = ''
@@ -163,12 +165,14 @@
var icon = overview.status.icon || 'ban-circle'
var colour = overview.status.colour || 'grey'
var hashrate_5s = colour !== 'grey' ? Util.getSpeed(overview.hashrate_5s) : '--'
var hashrate_avg = colour !== 'grey' ? Util.getSpeed(overview.hashrate_avg) : '--'
var active_pool_url = overview.active_pool.url || '--'
var uptime = overview.uptime || '--'
return '<tr data-rig="'+ index +'">' +
'<td><i class="icon icon-'+ icon +' '+ colour +'"></i></td>' +
'<td><a href="#rig-'+ index +'" class="anchor-offset rig-'+ index +' '+ colour +'">'+ $('#rig-'+ index + ' h1').html() +'</a></td>' +
'<td>'+ overview.algorithm +'</td>' +
'<td>'+ hashrate_avg +'</td>' +
'<td>'+ hashrate_5s +'</td>' +
'<td>'+ active_pool_url +'</td>' +
'<td>'+ uptime +'</td>' +
@@ -12,6 +12,7 @@
<th></th>
<th>Name</th>
<th>Algorithm</th>
<th>Hashrate avg</th>
<th>Hashrate 5s</th>
<th>Active Pool</th>
<th>Uptime</th>
@@ -21,4 +22,4 @@
</table>
</div>
</div><!-- / .panel-body -->
</div>
</div>

0 comments on commit ae9ca60

Please sign in to comment.
You can’t perform that action at this time.