Skip to content

Commit

Permalink
Merge pull request #220 from chronologic/revert/clearstats-option
Browse files Browse the repository at this point in the history
[Revert] Stats clear button
  • Loading branch information
adibas03 authored Mar 23, 2018
2 parents 0989eaf + db6dd7e commit 1e751e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
29 changes: 0 additions & 29 deletions app/components/TimeNode/TimeNodeSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,17 @@ class TimeNodeSettings extends Component {
constructor(props) {
super(props);
this.resetWallet = this.resetWallet.bind(this);
this.clearStats = this.clearStats.bind(this);
}

resetWallet() {
this.props.timeNodeStore.resetWallet();
this.props.timeNodeStore.clearStats();
}

clearStats() {
this.props.timeNodeStore.clearStats();
this.props.timeNodeStore.updateStats();
}

render() {
return (
<div id="timeNodeSettings">

<div className="card card-transparent">
<div className="card-header separator">
<div className="card-title">
Clear Stats
</div>
</div>
<div className="card-block p-3">
<div className="row vertical-align">
<div className="col-md-8 col-lg-9 my-2">
<p className="m-0">You can reset your TimeNode statistics here - claimed ETH, executed transactions counter and logs.</p>
</div>
<div className="col-md-4 col-lg-3">
<button className='btn btn-light'
type='button'
data-dismiss="modal"
onClick={this.clearStats}>
Clear Stats
</button>
</div>
</div>
</div>
</div>

<div className="card card-transparent">
<div className="card-header separator">
<div className="card-title">
Expand Down
1 change: 1 addition & 0 deletions app/stores/TimeNodeStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class TimeNodeStore {
} else if (type === EAC_WORKER_MESSAGE_TYPES.CLEAR_STATS) {
if (event.data.result) {
showNotification('Cleared the stats.', 'success');
this.updateStats();
} else {
showNotification('Unable to clear the stats.', 'danger', 3000);
}
Expand Down

0 comments on commit 1e751e8

Please sign in to comment.