Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
guru
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
guru
Commits
8befcf9c
Commit
8befcf9c
authored
Oct 20, 2018
by
Clint Mourlevat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor edit
parent
052284f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
255 deletions
+13
-255
BlockExplorerController.cs
Controllers/BlockExplorerController.cs
+11
-2
Address.cshtml
Views/BlockExplorer/Address.cshtml
+0
-5
Index.cshtml
Views/BlockExplorer/Index.cshtml
+0
-247
SearchBlock.cshtml
Views/BlockExplorer/SearchBlock.cshtml
+1
-1
default.css
wwwroot/css/default.css
+1
-0
No files found.
Controllers/BlockExplorerController.cs
View file @
8befcf9c
using
System
;
using
System.IO
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Caching.Memory
;
using
Microsoft.Extensions.Options
;
using
Newtonsoft.Json
;
using
RestSharp
;
...
...
@@ -13,14 +14,19 @@ namespace Stratis.Guru.Controllers
public
class
BlockExplorerController
:
Controller
{
private
readonly
NakoApiSettings
_nakoApiSettings
;
private
readonly
IMemoryCache
_memoryCache
;
private
readonly
dynamic
_stats
;
public
BlockExplorerController
(
IOptions
<
NakoApiSettings
>
nakoApiSettings
)
public
BlockExplorerController
(
I
MemoryCache
memoryCache
,
I
Options
<
NakoApiSettings
>
nakoApiSettings
)
{
_nakoApiSettings
=
nakoApiSettings
.
Value
;
_memoryCache
=
memoryCache
;
_stats
=
JsonConvert
.
DeserializeObject
(
_memoryCache
.
Get
(
"BlockchainStats"
).
ToString
());
}
public
IActionResult
Index
()
{
ViewBag
.
BlockchainHeight
=
_stats
.
syncBlockIndex
;
return
View
();
}
...
...
@@ -35,18 +41,20 @@ namespace Stratis.Guru.Controllers
{
return
RedirectToAction
(
"Transaction"
,
new
{
transactionId
=
searchBlockExplorer
.
Query
});
}
return
Content
(
"oh yeay
"
);
return
RedirectToAction
(
"Index
"
);
}
[
Route
(
"block/{block}"
)]
public
IActionResult
Block
(
string
block
)
{
ViewBag
.
BlockchainHeight
=
_stats
.
syncBlockIndex
;
return
View
();
}
[
Route
(
"address/{address}"
)]
public
IActionResult
Address
(
string
address
)
{
ViewBag
.
BlockchainHeight
=
_stats
.
syncBlockIndex
;
var
endpointClient
=
new
RestClient
(
$"
{
_nakoApiSettings
.
Endpoint
}
query/address/
{
address
}
/transactions"
);
var
enpointRequest
=
new
RestRequest
(
Method
.
GET
);
var
endpointResponse
=
endpointClient
.
Execute
(
enpointRequest
);
...
...
@@ -56,6 +64,7 @@ namespace Stratis.Guru.Controllers
[
Route
(
"transaction/{transactionId}"
)]
public
IActionResult
Transaction
(
string
transactionId
)
{
ViewBag
.
BlockchainHeight
=
_stats
.
syncBlockIndex
;
var
endpointClient
=
new
RestClient
(
$"
{
_nakoApiSettings
.
Endpoint
}
query/transaction/
{
transactionId
}
"
);
var
enpointRequest
=
new
RestRequest
(
Method
.
GET
);
var
endpointResponse
=
endpointClient
.
Execute
(
enpointRequest
);
...
...
Views/BlockExplorer/Address.cshtml
View file @
8befcf9c
...
...
@@ -13,11 +13,6 @@
<h2 class="section-title">Details for Address</h2>
</div>
</div>
@*<div class="offset-lg-3 col-lg-6">
<div class="center-text">
<p>Fusce placerat pretium mauris, vel sollicitudin elit lacinia vitae. Quisque sit amet nisi erat.</p>
</div>
</div>*@
</div>
<div class="row m-bottom-70">
<div class="col-lg-9 col-md-9 col-sm-12">
...
...
Views/BlockExplorer/Index.cshtml
View file @
8befcf9c
...
...
@@ -3,250 +3,3 @@
Layout = "_Layout";
}
<partial name="SearchBlock" />
<section class="block-explorer-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="center-heading">
<h2 class="section-title text-white">Details for Address</h2>
</div>
</div>
@*<div class="offset-lg-3 col-lg-6">
<div class="center-text">
<p>Fusce placerat pretium mauris, vel sollicitudin elit lacinia vitae. Quisque sit amet nisi erat.</p>
</div>
</div>*@
</div>
<div class="row m-bottom-70">
<div class="col-lg-9 col-md-9 col-sm-12">
<div class="table-responsive">
<table class="table table-striped table-latests table-detail">
<tbody>
<tr>
<td><strong>Address</strong></td>
<td>EcGbgDMaxhEhe9spbGjhqAPuWDTcfUopQY</td>
</tr>
<tr>
<td><strong>Hash</strong></td>
<td>74e9d4cde54b8a6decdd997541e44508ff8ba5e8</td>
</tr>
<tr>
<td><strong>No. Transactions</strong></td>
<td>64</td>
</tr>
<tr>
<td><strong>Balance</strong></td>
<td>8.35500476 ARD</td>
</tr>
<tr>
<td><strong>Total Received</strong></td>
<td>$3,209.53</td>
</tr>
<tr>
<td><strong>Final Balance</strong></td>
<td>$2,357.27</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<div class="qr">
<img src="~/images/qr.svg" class="img-fluid d-block mx-auto" alt="">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="center-heading">
<h2 class="section-title">Transactions</h2>
</div>
</div>
<div class="offset-lg-3 col-lg-6">
<div class="center-text">
<p>Fusce placerat pretium mauris, vel sollicitudin elit lacinia vitae. Quisque sit amet nisi erat.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<table class="table table-striped table-latests">
<thead>
<tr>
<th>Hash</th>
<th>Block</th>
<th>Date/Time</th>
<th>Amount</th>
<th>Balance</th>
</tr>
</thead>
<tbody>
<tr>
<td>d3e4f72db22777a3</td>
<td>1863796</td>
<td>2018-04-13 10:14:27</td>
<td><span class="red">- 99,999<small>.99</small> ARD</span></td>
<td>8,355,004<small>.71</small> ARD</td>
</tr>
<tr>
<td>29a7e2f30d424248</td>
<td>1862732</td>
<td>2018-04-12 14:16:54</td>
<td><span class="red">- 99,999<small>.99</small> ARD</span></td>
<td>8,455,004<small>.7</small> ARD</td>
</tr>
<tr>
<td>2f04876ba83f63d6</td>
<td>1837529</td>
<td>2018-03-23 22:12:16</td>
<td><span class="green">+ 99,999<small>.99</small> ARD</span></td>
<td>8,555,004<small>.69</small> ARD</td>
</tr>
<tr>
<td>24dadeea863c4cb6</td>
<td>1837516</td>
<td>2018-03-23 21:59:47</td>
<td><span class="green">+ 99,999<small>.99</small> ARD</span></td>
<td>8,455,004<small>.7</small> ARD</td>
</tr>
<tr>
<td>6c1f51ee1782f1de</td>
<td>1801648</td>
<td>2018-02-24 23:32:49</td>
<td><span class="red">- 70,001<small>.99</small> ARD</span></td>
<td>8,355,004<small>.71</small> ARD</td>
</tr>
<tr>
<td>35689f91f9a389fa</td>
<td>1766980</td>
<td>2018-01-30 03:42:33</td>
<td><span class="red">- 299,999<small>.99</small> ARD</span></td>
<td>8,425,006<small>.7</small> ARD</td>
</tr>
<tr>
<td>459f7bd610f62f8e</td>
<td>1744792</td>
<td>2018-01-13 16:52:33</td>
<td><span class="red">- 79,999<small>.99</small> ARD</span></td>
<td>8,725,006<small>.69</small> ARD</td>
</tr>
<tr>
<td>33d333ed27d8585c</td>
<td>1711392</td>
<td>2017-12-20 01:23:30</td>
<td><span class="red">- 499,999<small>.99</small> ARD</span></td>
<td>8,805,006<small>.68</small> ARD</td>
</tr>
<tr>
<td>ef89f28eacd70b95</td>
<td>1711220</td>
<td>2017-12-19 22:20:29</td>
<td><span class="red">- 169,999<small>.99</small> ARD</span></td>
<td>9,305,006<small>.67</small> ARD</td>
</tr>
<tr>
<td>3ae2012fac36f081</td>
<td>1705263</td>
<td>2017-12-15 12:55:55</td>
<td><span class="red">- 159,999<small>.99</small> ARD</span></td>
<td>9,475,006<small>.66</small> ARD</td>
</tr>
<tr>
<td>ec630c5de5ccbdaf</td>
<td>1685058</td>
<td>2017-11-30 13:14:24</td>
<td><span class="red">- 399,999<small>.99</small> ARD</span></td>
<td>9,635,006<small>.65</small> ARD</td>
</tr>
<tr>
<td>a3db0f84e058175c</td>
<td>1664298</td>
<td>2017-11-15 01:10:22</td>
<td><span class="red">- 600,001<small>.99</small> ARD</span></td>
<td>10,035,006<small>.64</small> ARD</td>
</tr>
<tr>
<td>2cf97e2c61e7a1a7</td>
<td>1644648</td>
<td>2017-10-31 00:48:40</td>
<td><span class="red">- 99,999<small>.99</small> ARD</span></td>
<td>10,635,008<small>.63</small> ARD</td>
</tr>
<tr>
<td>88f82cf57bf61a8d</td>
<td>1632389</td>
<td>2017-10-21 17:01:49</td>
<td><span class="green">+ 79,999<small>.99</small> ARD</span></td>
<td>10,735,008<small>.62</small> ARD</td>
</tr>
<tr>
<td>574d2191cc0514ab</td>
<td>1632387</td>
<td>2017-10-21 17:00:20</td>
<td><span class="green">+ 299,999<small>.99</small> ARD</span></td>
<td>10,655,008<small>.63</small> ARD</td>
</tr>
<tr>
<td>d737aee6f7bd32bf</td>
<td>1630884</td>
<td>2017-10-20 14:20:22</td>
<td><span class="green">+ 169,999<small>.99</small> ARD</span></td>
<td>10,355,008<small>.64</small> ARD</td>
</tr>
<tr>
<td>fc1d953a47e30f5f</td>
<td>1628746</td>
<td>2017-10-18 23:59:21</td>
<td><span class="green">+ 159,999<small>.99</small> ARD</span></td>
<td>10,185,008<small>.65</small> ARD</td>
</tr>
<tr>
<td>31086ded676a6e1c</td>
<td>1628740</td>
<td>2017-10-18 23:57:52</td>
<td><span class="green">+ 2,099,999<small>.99</small> ARD</span></td>
<td>10,025,008<small>.66</small> ARD</td>
</tr>
<tr>
<td>8dbfc3d0c5a22ea5</td>
<td>1626679</td>
<td>2017-10-17 10:43:17</td>
<td><span class="red">- 700,000<small>.0</small> ARD</span></td>
<td>7,925,008<small>.67</small> ARD</td>
</tr>
<tr>
<td>77c39582662734b2</td>
<td>1602704</td>
<td>2017-09-28 22:07:41</td>
<td><span class="green">+ 700,000<small>.0</small> ARD</span></td>
<td>8,625,008<small>.67</small> ARD</td>
</tr>
<tr>
<td>0cfe0329984af3a9</td>
<td>1602668</td>
<td>2017-09-28 21:32:08</td>
<td><span class="red">- 10<small>.0</small> ARD</span></td>
<td>7,925,008<small>.67</small> ARD</td>
</tr>
<tr>
<td>241e20def07426c6</td>
<td>1594640</td>
<td>2017-09-22 21:24:25</td>
<td><span class="green">+ 10<small>.0</small> ARD</span></td>
<td>7,925,018<small>.67</small> ARD</td>
</tr>
<tr>
<td>3cc8be1caadd24f1</td>
<td>1593981</td>
<td>2017-09-22 09:31:09</td>
<td><span class="green">+ 359,999<small>.99</small> ARD</span></td>
<td>7,925,008<small>.67</small> ARD</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
Views/BlockExplorer/SearchBlock.cshtml
View file @
8befcf9c
...
...
@@ -7,7 +7,7 @@
<h1>Stratis Blockchain Explorer</h1>
</div>
<div class="offset-lg-3 col-lg-6">
<p>Actual Stratis Blocks Height:
1039459
</p>
<p>Actual Stratis Blocks Height:
@(ViewBag.BlockchainHeight??"Loading...") <i class="fa fa-info-circle"></i>
</p>
</div>
</div>
</div>
...
...
wwwroot/css/default.css
View file @
8befcf9c
...
...
@@ -64,6 +64,7 @@ html, body {
background
:
#1b1d20
url("/images/prodnews-hero.png")
fixed
;
background-size
:
cover
;
box-shadow
:
inset
0px
0px
10em
rgba
(
0
,
0
,
0
,
0.6
);
height
:
100vh
;
}
a
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment