-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'xmrpool' into pooladmin
- Loading branch information
Showing
17 changed files
with
390 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
} | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.