|
|
|
|
@ -18,9 +18,9 @@ export default Ember.Controller.extend({
|
|
|
|
|
marginRight: 10, |
|
|
|
|
height: 290, |
|
|
|
|
events: { |
|
|
|
|
load: function() { |
|
|
|
|
load: function () { |
|
|
|
|
var series = this.series[0]; |
|
|
|
|
setInterval(function() { |
|
|
|
|
setInterval(function () { |
|
|
|
|
var x = (new Date()).getTime(), |
|
|
|
|
y = e.getWithDefault("model.currentHashrate") / 1000000; |
|
|
|
|
series.addPoint([x, y], true, true); |
|
|
|
|
@ -32,7 +32,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
text: "" |
|
|
|
|
}, |
|
|
|
|
//////
|
|
|
|
|
rangeSelector : { |
|
|
|
|
rangeSelector: { |
|
|
|
|
enabled: true, |
|
|
|
|
selected: 4, |
|
|
|
|
allButtonsEnabled: true, |
|
|
|
|
@ -132,7 +132,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
formatter: function() { |
|
|
|
|
formatter: function () { |
|
|
|
|
return this.y > 1000000000000 ? "<b>" + this.point.d + "<b><br>Hashrate " + (this.y / 1000000000000).toFixed(2) + " TH/s</b>" : this.y > 1000000000 ? "<b>" + this.point.d + "<b><br>Hashrate " + (this.y / 1000000000).toFixed(2) + " GH/s</b>" : this.y > 1000000 ? "<b>" + this.point.d + "<b><br>Hashrate " + (this.y / 1000000).toFixed(2) + " MH/s</b>" : "<b>" + this.point.d + "<b><br>Hashrate <b>" + this.y.toFixed(2) + " H/s</b>"; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
@ -145,7 +145,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
series: [{ |
|
|
|
|
color: "#15BD27", |
|
|
|
|
name: "3 hours average hashrate", |
|
|
|
|
data: function() { |
|
|
|
|
data: function () { |
|
|
|
|
var e, a = []; |
|
|
|
|
if (null != t) { |
|
|
|
|
for (e = 0; e <= t.length - 1; e += 1) { |
|
|
|
|
@ -173,7 +173,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
}, { |
|
|
|
|
name: "30 minutes average hashrate", |
|
|
|
|
color: "#E99002", |
|
|
|
|
data: function() { |
|
|
|
|
data: function () { |
|
|
|
|
var e, a = []; |
|
|
|
|
if (null != t) { |
|
|
|
|
for (e = 0; e <= t.length - 1; e += 1) { |
|
|
|
|
@ -294,7 +294,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
formatter: function() { |
|
|
|
|
formatter: function () { |
|
|
|
|
return this.y > 1000000000000 ? "<b>" + this.point.d + "<b><br>Shares " + (this.y / 1000000000000) + "</b>" : this.y > 1000000000 ? "<b>" + this.point.d + "<b><br>Shares " + (this.y / 1000000000) + "</b>" : this.y > 1000000 ? "<b>" + this.point.d + "<b><br>Shares " + (this.y / 1000000) + "</b>" : "<b>" + this.point.d + "<b><br>Shares <b>" + this.y + "</b>"; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
@ -307,7 +307,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
series: [{ |
|
|
|
|
color: "#15BD27", |
|
|
|
|
name: "Valid share", |
|
|
|
|
data: function() { |
|
|
|
|
data: function () { |
|
|
|
|
var e, a = []; |
|
|
|
|
if (null != t) { |
|
|
|
|
for (e = 0; e <= t.length - 1; e += 1) { |
|
|
|
|
@ -337,7 +337,7 @@ export default Ember.Controller.extend({
|
|
|
|
|
|
|
|
|
|
name: "Stale share", |
|
|
|
|
color: "#E99002", |
|
|
|
|
data: function() { |
|
|
|
|
data: function () { |
|
|
|
|
var e, a = []; |
|
|
|
|
if (null != t) { |
|
|
|
|
for (e = 0; e <= t.length - 1; e += 1) { |
|
|
|
|
@ -402,5 +402,36 @@ export default Ember.Controller.extend({
|
|
|
|
|
}; |
|
|
|
|
return a; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}), |
|
|
|
|
earnPerHour: Ember.computed('model', { |
|
|
|
|
get() { |
|
|
|
|
return 1 * 60 * 60 / this.get('config').BlockTime * this.get('config').BlockReward * |
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
earnPerHour12: Ember.computed('model', { |
|
|
|
|
get() { |
|
|
|
|
return 12 * 60 * 60 / this.get('config').BlockTime * this.get('config').BlockReward * |
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
earnPerDay: Ember.computed('model', { |
|
|
|
|
get() { |
|
|
|
|
return 24 * 60 * 60 / this.get('config').BlockTime * this.get('config').BlockReward * |
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
earnPerWeek: Ember.computed('model', { |
|
|
|
|
get() { |
|
|
|
|
return 168 * 60 * 60 / this.get('config').BlockTime * this.get('config').BlockReward * |
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
earnPerMonth: Ember.computed('model', { |
|
|
|
|
get() { |
|
|
|
|
return 672 * 60 * 60 / this.get('config').BlockTime * this.get('config').BlockReward * |
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
});
|