Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16,504 changes: 16,504 additions & 0 deletions app/data/generated.json

Large diffs are not rendered by default.

43 changes: 40 additions & 3 deletions app/html/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,56 @@ <h1>Mesh Activity</h1>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Node</th>
<th scope="col">Loc</th>
<th scope="col">Avg Retail Price</th>
<th scope="col">Avg Price (7 days)</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td><a href="#">24.582, 67.173</a></td>
<td><a href="#">44.582, 17.173</a></td>
<td>$.003/min</td>
<td>DOWN</td>
</tr>
<tr>
<th scope="row">2</th>
<td><a href="#">26.582, 37.173</a></td>
<td>$.003/min</td>
<td>Up</td>
</tr>
<tr>
<th scope="row">3</th>
<td><a href="#">51.582, 57.173</a></td>
<td>$.009/min</td>
<td>Up</td>
</tr>
<tr>
<th scope="row">4</th>
<td><a href="#">41.582, 6 1.173</a></td>
<td>$.012/min</td>
<td>UP</td>
</tr>

<tr>
<th scope="row">5</th>
<td><a href="#">26.582, 37.173</a></td>
<td>$.003/min</td>
<td>Up</td>
</tr>
<tr>
<th scope="row">6</th>
<td><a href="#">51.582, 57.173</a></td>
<td>$.009/min</td>
<td>DOWN</td>
</tr>
<tr>
<th scope="row">7</th>
<td><a href="#">41.582, 6 1.173</a></td>
<td>$.012/min</td>
<td>UP</td>
</tr>
</tbody>
</table>
</div>
Expand Down
49 changes: 40 additions & 9 deletions app/html/service-bounties.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ <h1>Mesh Demand & Bounty System</h1>
at a location. Providers can claim bounties by registering, then physically start service within
a bounty location
</p>

<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Loc</th>
<th scope="col">Funding</th>
<th scope="col">Install</th>
<th scope="col">Status</th>
<th scope="col">Action</th>
<th scope="col">Funding</th>
Expand All @@ -84,9 +84,10 @@ <h1>Mesh Demand & Bounty System</h1>
<a href="#">24.582, 67.173</a>
</td>
<td>$30</td>
<td>$130</td>
<td>AVAIL</td>
<td>
<button class="btn btn-default">Claim</button>
<button class="btn btn-primary">Claim</button>
</td>
<td>
<button class="btn btn-primary">Fund Bounty</button>
Expand All @@ -95,12 +96,13 @@ <h1>Mesh Demand & Bounty System</h1>
<tr>
<th scope="row">2</th>
<td>
<a href="#"></a>34.232, 77.322</a>
<a href="#">34.232, 77.322</a>
</td>
<td>$220</td>
<td>$530</td>
<td>IN SERVICE</td>
<td>
<button class="btn btn-success" disabled>CLAIM</button>
<button class="btn btn-primary" disabled>Claim</button>
</td>
<td>
<button class="btn btn-primary">Fund Service</button>
Expand All @@ -113,23 +115,52 @@ <h1>Mesh Demand & Bounty System</h1>
<a href="#">94.232, 33.455</a>
</td>
<td>$300</td>
<td>$130</td>
<td>AVAIL</td>
<td>
<button class="btn btn-success">Claim</button>
<button class="btn btn-primary">Claim</button>
</td>
<td>
<button class="btn btn-primary">Fund Bounty</button>
</td>
</tr>-
</tr>
</tbody>
</table>
<button class="btn btn-primary">Create New Service Bounty</button>


</div>
</div>
</div>
</div>
<!--/end row-->

<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h5>Create Service Bounty</h5>
</div>
<div class="panel-body">Request Service In Your Area
<form action="">
<label for="inputBountyLat">Latitude</flabel>
<input type="text" name="inputLat" class="form-control" id="inputBountyLat" placeholder="33.44">
<label for="inputBountyLng">Longitute</flabel>
<input type="text" name="inputBountyLng" class="form-control" id="inputBountyLng" placeholder="72.11">
<label for="inputBountyEscrow">Initial Escrow</flabel>
<input type="number" name="inputBountyEscrow" class="form-control" id="inputBountyEscrow" placeholder="300">
<label for="inputBountyBonus">Installation Bonus</flabel>
<input type="number" name="inputBountyBonus" class="form-control" id="inputBountyBonus" placeholder="300">
</form>

<button type="button" class="btn btn-primary" onclick="App.createServiceBounty(); return false;">Create New Service Bounty</button>
</div>
</div>
</div>
</div>
</div>
</div>

<div id="status"></div>
<div id="contractEvents" class="alert"></div>
<!--/end row-->
</div>
<!--END CONTAINER-->

Expand Down
15 changes: 14 additions & 1 deletion app/html/service-opportunity.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,23 @@ <h1>Mesh Service Opportunities</h1>
<tbody>
<tr>
<th scope="row">1</th>
<td><a href="#">24.582, 67.173</a></td>
<td><a href="#">26.582, 17.173</a></td>
<td>$.003/min</td>
<td>DOWN</td>
</tr>

<tr>
<th scope="row">2</th>
<td><a href="#">54.582, 47.173</a></td>
<td>$.001/min</td>
<td>DOWN</td>
</tr>
<tr>
<th scope="row">4</th>
<td><a href="#">44.582, 87.173</a></td>
<td>$.012/min</td>
<td>DOWN</td>
</tr>
</tbody>
</table>
</div>
Expand Down
52 changes: 45 additions & 7 deletions app/html/service-requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<!--END NAV-->

<div class="container">
<h1>Mesh Service Requsts</h1>
<h1>Mesh Service Requests <span id="numServiceRequests"></span></h1>

<div class="row">
<div class="col-md-12">
Expand Down Expand Up @@ -84,35 +84,73 @@ <h1>Mesh Service Requsts</h1>
<th scope="row">1</th>
<td><a href="#">24.582, 67.173</a></td>
<td>$30</td>
<td>AVAIL</td>
<td>Unclaimed</td>
<td><button class="btn btn-success">Claim</button></td>
<td>$60</td>
</tr>
<tr>
<th scope="row">2</th>
<td><a href="#"></a>34.232, 77.322</a></td>
<td>$250</td>
<td><a href="#">34.232, 77.322</a></td>
<td>$27</td>
<td>IN SERVICE</td>
<td><button class="btn btn-success" disabled>CLAIM</button></td>
<td><button class="btn btn-success" disabled>Claim</button></td>
<td>$300</td>

</tr>
<tr>
<th scope="row">3</th>
<td><a href="#">94.232, 33.455</a></td>
<td>$300</td>
<td>AVAIL</td>
<td>Unclaimed</td>
<td><button class="btn btn-success">Claim</button></td>
<td>69.99</td>
</tr>

<tr>
<th scope="row">2</th>
<td><a href="#">14.232, 23.455</a></td>
<td>$12</td>
<td>Unclaimed</td>
<td><button class="btn btn-success">Claim</button></td>
<td>34</td>
</tr>
</tbody>
</table>
<button class="btn btn-primary">Create New Service Request</button>
</div>
</div>
</div>
</div><!--/end row-->
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h5>Create Service Request</h5></div>
<div class="panel-body">Request Service In Your Area
<form action="">
<div class="form-group">
<label for="inputLat">Latitude</flabel>
<input type="text" name="inputLat" class="form-control" id="inputLat" placeholder="33.44">

<label for="inputLng">Longitute</flabel>
<input type="text" name="inputLng" class="form-control" id="inputLng" placeholder="72.11">

</div>
<label for="inputEscrow">Initial Escrow</flabel>
<input type="number" name="inputEscrow" class="form-control" id="inputEscrow" placeholder="300">

</form>
<button type="button" class="btn btn-primary" onclick="App.createServiceRequest(); return false;">Create New Service Request</button>
</div>
</div>
</div>
</div>
</div>
</div>

<div id="status"></div>
<div id="contractEvents" class="alert"></div>
</div>

</body>

</html>
35 changes: 24 additions & 11 deletions app/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ window.App = {
account = accounts[0];
console.log('Accounts:', accounts);
console.log('Account[0]:', account);

document.getElementById('currentAccount').innerText = account;
// App.setStatus('Successfully retrieved Accounts and user account info');


//init functions
App.refreshBalance();
Expand All @@ -59,33 +58,47 @@ window.App = {
});
}).then(function (txResponse) {
console.log("res", txResponse)
}).catch(function(e){
console.log("err", e);
})
},

createServiceRequest: function () {

var lat = document.getElementById('inputLat').value;
var lng = document.getElementById('inputLng').value;
var escrowAmt = document.getElementById('inputEscrow').value;

console.log("Request for Service:", lat, lng, escrowAmt)

MeshBounty.deployed().then(function (instance) {
return instance.createServiceRequest(lat,lng, {value:escrowAmnt, from: account});
return instance.createServiceRequest.sendTransaction(lat,lng, { from: account, value:escrowAmt, gas:23000});
}).then(function (txResponse) {
console.log("res", txResponse)
console.log("res", txResponse);
App.getNumberOfServiceRequests();
})
.catch(function(e){
console.log("err", e);
})
},

getNumberOfServiceRequests: function(){
MeshBounty.deployed().then(function (instance) {
return instance.getNumberServiceRequests.call();
}).then(function (numServiceRequests) {

document.getElementById('numServiceRequests').innerText = numServiceRequests.toNumber();
console.log("requests", requests);
}).catch(function(e){
console.log("err", e);
})
},

setStatus: function (message) {
var status = document.getElementById("status");
status.innerHTML = message;
alert(message);
},

refreshBalance: function () {


},


watchContractEvents: function () {
//any time an event occurs in the token contract, watch and display

Expand Down
6 changes: 3 additions & 3 deletions build/contracts/ComplexStorage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3684,10 +3684,10 @@
"5777": {
"events": {},
"links": {},
"address": "0x08bafb05e84c946c41f79ebb6f24d4e2ce68fec8",
"transactionHash": "0xd5697a68b534c0c67210b0c1181892d66b1ec08389109dea8de4ac56caaece4f"
"address": "0x2730155ec32a0bc9ed9973a8256d5e33b84b2085",
"transactionHash": "0xcca00986a185185de12b73c5941cb0d233de8bbfed4142bd4adc943e9aa027fe"
}
},
"schemaVersion": "2.0.1",
"updatedAt": "2018-07-01T12:09:16.590Z"
"updatedAt": "2018-07-01T13:21:59.408Z"
}
6 changes: 3 additions & 3 deletions build/contracts/DemandListing.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@
"5777": {
"events": {},
"links": {},
"address": "0xebf53cdc93a923a82154f93fb0920951f63d29c4",
"transactionHash": "0x2e6f7edb6551675f5d75568e10856bbbf39446501c22f52b7a83ec82ab5ab552"
"address": "0x72bd8cb1821ec46c4b267eef1982817fe70c2996",
"transactionHash": "0x09bb08f753ec7f6e247a5e43e98ec090051deecf2b0e3a347847f0755dcc95be"
}
},
"schemaVersion": "2.0.1",
"updatedAt": "2018-07-01T12:09:16.583Z"
"updatedAt": "2018-07-01T13:21:59.346Z"
}
Loading