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
a795da63
Commit
a795da63
authored
Oct 20, 2018
by
Clint Mourlevat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some bugs
parent
217691f8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
23 deletions
+38
-23
BlockExplorerController.cs
Stratis.Guru/Controllers/BlockExplorerController.cs
+1
-1
Address.cshtml
Stratis.Guru/Views/BlockExplorer/Address.cshtml
+14
-10
Block.cshtml
Stratis.Guru/Views/BlockExplorer/Block.cshtml
+21
-10
Transaction.cshtml
Stratis.Guru/Views/BlockExplorer/Transaction.cshtml
+1
-1
default.css
Stratis.Guru/wwwroot/css/default.css
+1
-1
No files found.
Stratis.Guru/Controllers/BlockExplorerController.cs
View file @
a795da63
...
@@ -25,7 +25,7 @@ namespace Stratis.Guru.Controllers
...
@@ -25,7 +25,7 @@ namespace Stratis.Guru.Controllers
_stats
=
JsonConvert
.
DeserializeObject
(
_memoryCache
.
Get
(
"BlockchainStats"
).
ToString
());
_stats
=
JsonConvert
.
DeserializeObject
(
_memoryCache
.
Get
(
"BlockchainStats"
).
ToString
());
}
}
[
ResponseCache
(
Duration
=
60
,
NoStore
=
true
)]
//
[ResponseCache(Duration = 60, NoStore = true)]
public
IActionResult
Index
()
public
IActionResult
Index
()
{
{
var
latestBlockClient
=
new
RestClient
(
$"
{
_nakoApiSettings
.
Endpoint
}
query/block/Latest/transactions"
);
var
latestBlockClient
=
new
RestClient
(
$"
{
_nakoApiSettings
.
Endpoint
}
query/block/Latest/transactions"
);
...
...
Stratis.Guru/Views/BlockExplorer/Address.cshtml
View file @
a795da63
...
@@ -78,14 +78,18 @@
...
@@ -78,14 +78,18 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
@{
double total = 0;
}
@foreach (var transaction in Model.transactions)
@foreach (var transaction in Model.transactions)
{
{
total += (double)transaction.value;
<tr>
<tr>
<td><a asp-controller="BlockExplorer" asp-action="Transaction" asp-route-transactionId="@transaction.transactionHash">@transaction.transactionHash.ToString().Substring(0, 25)...</a></td>
<td><a asp-controller="BlockExplorer" asp-action="Transaction" asp-route-transactionId="@transaction.transactionHash">@transaction.transactionHash.ToString().Substring(0, 25)...</a></td>
<td><a asp-controller="BlockExplorer" asp-action="Block" asp-route-block="@transaction.blockIndex">@transaction.blockIndex</a></td>
<td><a asp-controller="BlockExplorer" asp-action="Block" asp-route-block="@transaction.blockIndex">@transaction.blockIndex</a></td>
<td>2018-04-13 10:14:27
</td>
<td>-
</td>
<td><span class="@(transaction.value > 0 ? "green":
"red")">@transaction.value.ToString("N8") STRAT</span></td>
<td><span class="@(transaction.value > 0 ? "green" :
"red")">@transaction.value.ToString("N8") STRAT</span></td>
<td>@Model.balance
.ToString("N8") STRAT</td>
<td>@total
.ToString("N8") STRAT</td>
</tr>
</tr>
}
}
</tbody>
</tbody>
...
...
Stratis.Guru/Views/BlockExplorer/Block.cshtml
View file @
a795da63
...
@@ -35,12 +35,16 @@
...
@@ -35,12 +35,16 @@
<td>@Model.blockSize kB</td>
<td>@Model.blockSize kB</td>
</tr>
</tr>
<tr>
<tr>
<td><strong>Total Received</strong></td>
<td><strong>Previous Block Hash</strong></td>
<td>@Model.blockIndex</td>
<td>
<a asp-controller="BlockExplorer" asp-action="BlockHash" asp-route-hash="@Model.previousBlockHash">@(Model.previousBlockHash??"-")</a>
</td>
</tr>
</tr>
<tr>
<tr>
<td><strong>Total Sent</strong></td>
<td><strong>Next Block Hash</strong></td>
<td>@Model.blockIndex</td>
<td>
<a asp-controller="BlockExplorer" asp-action="BlockHash" asp-route-hash="@Model.nextBlockHash">@(Model.nextBlockHash??"-")</a>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -60,15 +64,22 @@
...
@@ -60,15 +64,22 @@
<table class="table table-striped table-latests">
<table class="table table-striped table-latests">
<thead>
<thead>
<tr>
<tr>
<th>Hash</th>
<th>Index</th>
<th>Block</th>
<th>Transaction ID</th>
<th>Date/Time</th>
<th>Amount</th>
<th>Balance</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
@{ int i = 0;}
@foreach (var transaction in Model.transactions)
{
<tr>
<td>@i</td>
<td>
<a asp-controller="BlockExplorer" asp-action="Transaction" asp-route-transactionId="@transaction">@transaction</a>
</td>
</tr>
i++;
}
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
...
Stratis.Guru/Views/BlockExplorer/Transaction.cshtml
View file @
a795da63
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<tr>
<tr>
<td><strong>Block Date/Time</strong></td>
<td><strong>Block Date/Time</strong></td>
<td>@Model.timestamp</td>
<td>@Model.timestamp
.ToString("F")
</td>
</tr>
</tr>
<tr>
<tr>
<td><strong>Total Output</strong></td>
<td><strong>Total Output</strong></td>
...
...
Stratis.Guru/wwwroot/css/default.css
View file @
a795da63
...
@@ -1351,7 +1351,7 @@ header
...
@@ -1351,7 +1351,7 @@ header
*/
*/
.header-area.header-sticky
{
.header-area.header-sticky
{
background
:
rgba
(
33
,
37
,
41
,
0.90
);
background
:
rgba
(
33
,
37
,
41
,
1
);
box-shadow
:
0
2px
28px
0
rgba
(
0
,
0
,
0
,
0.6
);
box-shadow
:
0
2px
28px
0
rgba
(
0
,
0
,
0
,
0.6
);
}
}
...
...
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