Skip to content

Commit

Permalink
Merge branch 'xmrpool' into pooladmin
Browse files Browse the repository at this point in the history
  • Loading branch information
mesh0000 committed Mar 8, 2017
2 parents 6fa7839 + 301ba24 commit 8aa20f3
Show file tree
Hide file tree
Showing 17 changed files with 390 additions and 105 deletions.
2 changes: 1 addition & 1 deletion app/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ <h1 flex>Pool Admin CP</h1>
<script src="utils/dataservice.js"></script>
<script src="utils/strings.js"></script>
<script src="admin.js"></script>
<script src="admin/cp.js"></script>
<script src="admin/adminlogin.js"></script>
<script src="admin/dashboard.js"></script>
<script src="admin/workers.js"></script>
<script src="admin/ports.js"></script>
<script src="admin/config.js"></script>
<script src="admin/editconfig.js"></script>
</body>
</html>
31 changes: 27 additions & 4 deletions app/admin/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
'use strict';

app.controller('AdminConfigCtrl', function($scope, $location, $route, dataService) {
app.controller('AdminConfigCtrl', function($scope, $location, $route, $mdDialog, dataService) {
$scope.selected = [];

$scope.promise = dataService.getData("/admin/config", function(data) {
$scope.pool_configs = data;
});
var loadConfig = function () {
dataService.getData("/admin/config", function(data) {
$scope.pool_configs = data;
});
}

$scope.editConfig = function (ev, config) {
$mdDialog.show({
locals: {
config: config
},
clickOutsideToClose: true,
controller: 'editConfigCtrl',
controllerAs: 'ctrl',
focusOnOpen: false,
targetEvent: ev,
templateUrl: 'admin/editconfig.html',
}).then (function () {
loadConfig();
}, function(){
// error
})

};

loadConfig();
});
28 changes: 28 additions & 0 deletions app/admin/editconfig.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

<md-dialog add-item-dialog >
<md-dialog-content class="md-dialog-content">

<h2 class="md-title">Edit Config</h2>

<p ng-if="item.form.$submitted && item.form.$invalid" class="md-warn" layout="row" layout-align="start center">
<i class="material-icons">error_outline</i>
<span>&nbsp; All fields are required.</span>
</p>

<form name="item.form" ng-submit="ctrl.edit()">
<div layout="row" class="input-row">
<md-input-container flex>
<label>{{config.item}}</label>
<input name="value" ng-model="config.value" required>
</md-input-container>
</div>
</form>

</md-dialog-content>

<md-dialog-actions>
<md-button class="md-accent" ng-click="ctrl.edit()" ng-disabled="item.form.$invalid">Save</md-button>
<md-button class="md-warn" ng-click="ctrl.cancel()">Cancel</md-button>
</md-dialog-actions>

</md-dialog>
29 changes: 29 additions & 0 deletions app/admin/editconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';


app.controller('editConfigCtrl', function ($scope, $mdDialog, dataService, config) {
'use strict';

$scope.config = config;
var old_value = config.value;

this.cancel = function (){
config.value=old_value;
$mdDialog.cancel();
}

this.edit = function () {
$scope.item.form.$setSubmitted();

if($scope.item.form.$valid) {
dataService.putData('/admin/config', {id: config.id, value: config.value}, function(data) {
$mdDialog.hide(data);
}, function (e) {
// error
$scope.config = old_value;
$mdDialog.hide('error');
});
}
};

});
2 changes: 1 addition & 1 deletion app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ md-tooltip .md-content {
}

.navbar .smallfont h3{
font-size: 0.7em;
font-size: 0.8em;
}

.navbar .smallfont h3 b{
Expand Down
5 changes: 5 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ var app = angular.module('poolui', [
controller: 'NetworkCtrl',
activetab: 'network'
})
.when('/ports', {
templateUrl: 'user/ports/ports.html',
controller: 'PortsCtrl',
activetab: 'ports'
})
.when('/help/chat', {
templateUrl: 'user/help/chat.html',
controller: 'ChatCtrl',
Expand Down
8 changes: 8 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ <h1 class="md-toolbar-tools">XMRPool.net <i class="md-caption">beta</i></h1>
Payment
</md-button>
</md-list-item>
<md-list-item>
<md-button href="#/ports" ng-class="isActivePage('ports')">
<md-icon md-font-set="material-icons" class="menu-item">flight_land</md-icon>
Ports
</md-button>
</md-list-item>
<md-list-item>
<md-button href="#/network" ng-class="isActivePage('network')">
<md-icon md-font-set="material-icons" class="menu-item">language</md-icon>
Expand Down Expand Up @@ -135,8 +141,10 @@ <h3 flex><a href="#/dashboard">You : <b>{{yourTotalHashRate | toHashRate}}</b></
<script src="user/blocks/blocks.js"></script>
<script src="user/payments/payments.js"></script>
<script src="user/network/network.js"></script>
<script src="user/ports/ports.js"></script>
<script src="user/help/chat.js"></script>
<script src="user/help/getting_started.js"></script>
<script src="user/help/portsmodal.js"></script>
<script src="user/help/faq.js"></script>
</body>
</html>
38 changes: 3 additions & 35 deletions app/user/help/faq.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
<div layout-md="column" layout="row" flex>
<div layout="column" flex>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span>FAQ</span>
</div>
</md-toolbar>
<md-card-content class="md-subhead">
<p>XMR Pool Supports integrated addresses (i.e. payment to exchanges).</p>

<p>1. To start mining you first need to download mining software</p>
<p>a) Link to CPU miner, AMD/Nvidia Miners.</p>
<p>Depending on your miner you need to add the required parameters via command line or config.txt</p>
<p>Require fields are payment <b>address</b> and <b>MinerIdentifier</b></p>
<blockquote>
<i>Username format</i> : address.paymentID+FixedDifficulty<br/>
<i>Password Format</i> : MinerIdentifier:Email<br/>
</blockquote>
<md-list flex>
<md-subheader class="md-no-sticky">Username / Password Samples</md-subheader>
<md-divider></md-divider>
<md-list-item class="md-3-line" ng-repeat="sample in samples">
<div class="md-list-item-text" layout="column">
<h4>## {{ sample.desc }}</h4>
<blockquote>
<p><b>{{ sample.type }}</b> : {{ sample.sample }}</p>
<small class="md-body-1">(e.g. miner.exe -u <i class="truncate">{{(sample.type=="Username") ? sample.sample : 'paymentAddress'}}</i> -p {{(sample.type=="Password") ? sample.sample : 'worker'}})</small><br/>
</blockquote>
</div>
<md-divider></md-divider>
</md-list-item>
</md-list>
</md-card-content>
</md-card>
<div class="row">
<div class="col-md-3">
<h1>Coming SoOn..</h1>
</div>
</div>
121 changes: 63 additions & 58 deletions app/user/help/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,92 +2,97 @@
<div layout="column" flex>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span>Getting Started with XMRPool.net</span>
</div>
<div class="md-toolbar-tools">
<span>Getting Started with XMRPool.net</span>
</div>
</md-toolbar>
<md-card-content>
<p class="panel-subtitle">If you are new to mining, this is the place for you.</p>
<p class="panel-subtitle">Confusing at first but its as easy as 1, 2, 3</p>
<p class="panel-subtitle">take a deep breath, its only confusing at first but pure joy once up and running.</p>
</md-card-content>
</md-card>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span>1. Create a Wallet</span>
</div>
<div class="md-toolbar-tools">
<span>1. Create a Wallet</span>
</div>
</md-toolbar>
<md-card-content>
<p class="panel-subtitle">Both online wallets and hardware wallets have their pros and cons</p>
<p class="panel-subtitle">Software Wallet / MyMonero</p>
<p class="panel-subtitle">Both online wallets and hardware wallets have their pros and cons.</p>
<p class="panel-subtitle"><a href="https://www.mymonero.com" target="_blank">MyMonero</a> : MyMonero is an online wallet maintained by the core monero team, so while safe is still suceptable to hacks.</p>
<p class="panel-subtitle"><a href="https://getmonero.org/2016/12/22/monero-core-gui-beta-released.html" target="_blank">Monero GUI Wallet</a> : The safest way to safely store and secure your XMR, although it would be your responsibility to kee your XMR Safe.</p>
</md-card-content>
</md-card>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span>2. Download mining software</span>
</div>
<div class="md-toolbar-tools">
<span>2. Download mining software</span>
</div>
</md-toolbar>
<md-card-content>
<p class="panel-subtitle">Curious what the port types are? Most miners are best served by PPLNS, which
helps to combat pool hopping and ensures a good payout for miners. PPS is the most stable option of
the lot, ensuring that you get paid out for every share, but with a higher fee for the risk the pool
takes. Solo ports are for those who like to gamble and want to try and find their own block!</p>
<p class="panel-subtitle">AMD Miner</p>
<p class="panel-subtitle">Nvidia Miner</p>
<p class="panel-subtitle">CPU Miner (AESNI CPU's)</p>
<p class="panel-subtitle">CPU Miner (Older CPU's})</p>
</md-card-content>
</md-card>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span>3. Pick a server and port</span>
</div>
<div class="md-toolbar-tools">
<span>3. Pick a server and port</span>
</div>
</md-toolbar>
<md-card-content>
<p class="panel-subtitle">Curious what the port types are? Most miners are best served by PPLNS, which
helps to combat pool hopping and ensures a good payout for miners. PPS is the most stable option of
the lot, ensuring that you get paid out for every share, but with a higher fee for the risk the pool
takes. Solo ports are for those who like to gamble and want to try and find their own block!</p>
<p class="panel-subtitle">There are 2 important things here the <b>URL</b> and the <b>port</b> that you are going to connect to.</p>
<p>You need to pick your URL and Port from the Ports List. Here you'll notice theres Global, PPLNS, Solo (<a href="#/help/faq">?</a>)</p>
<p>Global is simply a collection of both PPLNS & Solo ports powerd by GEODNS. <br/>GEODNS automagically finds the closest server to you and could also be used to shares you in case of a regional outage.</p>
<p>If you prefer to shave off a few of those ms and connect directly, you have the option to select your preferred endpoint too.</p>
<p>The Port is used in conjunciton with the url and is used to specify the starting difficulty. You should select this depending on the total #ing power of your rig (see port descriptions).</p>
<p>If you are an advanced user or would like to set a fixed difficulty. examples below.</p>
<div flex layout="row">
<div flex></div>
<md-button ng-click="viewPorts($event)">View Ports list</md-button>
<div flex></div>
</div>
<!-- <p class="panel-subtitle">Curious what the port types are? Most miners are best served by PPLNS, which
helps to combat pool hopping and ensures a good payout for miners. PPS is the most stable option of
the lot, ensuring that you get paid out for every share, but with a higher fee for the risk the pool
takes. Solo ports are for those who like to gamble and want to try and find their own block!</p> -->
</md-card-content>
</md-card>
<md-card>
<md-toolbar class="md-table-toolbar md-default">
<div class="md-toolbar-tools">
<span class="md-title">Pool Stats</span>
</div>
<div class="md-toolbar-tools">
<span>The moment</span>
</div>
</md-toolbar>
<md-card-content>
<md-tabs md-dynamic-height>
<md-tab label="{{pooltype}}" index="$index" ng-repeat="(pooltype, ports) in portsList">
<md-table-container>
<table md-table md-row-select ng-model="selected" md-progress="promise">
<thead md-head md-order="portsOrder">
<tr md-row>
<th md-column md-numeric><h2 class="md-subhead">Server</h2></th>
<th md-column md-numeric md-order-by="port"><h2 class="md-subhead">Port</h2></th>
<th md-column md-numeric md-order-by="pool_type"><h2 class="md-subhead">Port Type</h2></th>
<th md-column md-numeric md-order-by="difficulty"><h2 class="md-subhead">Difficulty</h2></th>
<th md-column md-numeric md-order-by="miners"><h2 class="md-subhead">Miners</h2></th>
<th md-column md-numeric><h2 class="md-subhead">Current Block ID</h2></th>
<th md-column md-numeric><h2 class="md-subhead">Block Time</h2></th>
<th md-column md-numeric><h2 class="md-subhead">Description</h2></th>
</tr>
</thead>
<tbody md-body>
<tr md-row ng-repeat="portinfo in ports | orderBy: portsOrder">
<td md-cell><p class="md-body-2">{{portinfo.host.hostname}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.port}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.pool_type}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.difficulty}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.miners}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.host.blockID}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.host.blockIDTime * 1000 | date: 'hh:mm:ss - dd/MM/yy'}}</p></td>
<td md-cell><p class="md-body-2">{{portinfo.description}}</p></td>
</tr>
</tbody>
</table>
</md-table-container>
</md-tab>
</md-tabs>
<p class="panel-subtitle">OK So by now you should have a wallet, mining software, url and port. Its time to put them together.</p>
</md-card-content>
<md-card-content>
<p>Here are some examples of the parameters that you need to pass on to your miner software, the format matters so be careful.</p>
<p>Depending on your miner you need to add the required parameters via command line or config.txt</p>
<p>Required fields are payment <b>address</b> and <b>MinerIdentifier</b></p>
<blockquote>
<i>Username format</i> : address.paymentID+FixedDifficulty<br/>
<i>Password Format</i> : MinerIdentifier:Email<br/>
</blockquote>
<md-list flex>
<md-subheader class="md-no-sticky">Username / Password Samples</md-subheader>
<md-divider></md-divider>
<md-list-item class="md-3-line" ng-repeat="sample in samples">
<div class="md-list-item-text" layout="column">
<h4>## {{ sample.desc }}</h4>
<blockquote>
<p><b>{{ sample.type }}</b> : {{ sample.sample }}</p>
<small class="md-body-1">(e.g. miner.exe -u <i class="truncate">{{(sample.type=="Username") ? sample.sample : 'paymentAddress'}}</i> -p {{(sample.type=="Password") ? sample.sample : 'worker'}})</small><br/>
</blockquote>
</div>
<md-divider></md-divider>
</md-list-item>
</md-list>
</md-card-content>
</md-card>
<h3 class="text-center">Happy Mining !</h3>
</div>
</div>
Loading

0 comments on commit 8aa20f3

Please sign in to comment.