Commit a795da63 authored by Clint Mourlevat's avatar Clint Mourlevat

Fixing some bugs

parent 217691f8
......@@ -25,7 +25,7 @@ namespace Stratis.Guru.Controllers
_stats = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString());
}
[ResponseCache(Duration = 60, NoStore = true)]
//[ResponseCache(Duration = 60, NoStore = true)]
public IActionResult Index()
{
var latestBlockClient = new RestClient($"{_nakoApiSettings.Endpoint}query/block/Latest/transactions");
......
......@@ -78,14 +78,18 @@
</tr>
</thead>
<tbody>
@{
double total = 0;
}
@foreach (var transaction in Model.transactions)
{
total += (double)transaction.value;
<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="Block" asp-route-block="@transaction.blockIndex">@transaction.blockIndex</a></td>
<td>2018-04-13 10:14:27</td>
<td><span class="@(transaction.value > 0 ? "green":"red")">@transaction.value.ToString("N8") STRAT</span></td>
<td>@Model.balance.ToString("N8") STRAT</td>
<td>-</td>
<td><span class="@(transaction.value > 0 ? "green" : "red")">@transaction.value.ToString("N8") STRAT</span></td>
<td>@total.ToString("N8") STRAT</td>
</tr>
}
</tbody>
......
......@@ -35,12 +35,16 @@
<td>@Model.blockSize kB</td>
</tr>
<tr>
<td><strong>Total Received</strong></td>
<td>@Model.blockIndex</td>
<td><strong>Previous Block Hash</strong></td>
<td>
<a asp-controller="BlockExplorer" asp-action="BlockHash" asp-route-hash="@Model.previousBlockHash">@(Model.previousBlockHash??"-")</a>
</td>
</tr>
<tr>
<td><strong>Total Sent</strong></td>
<td>@Model.blockIndex</td>
<td><strong>Next Block Hash</strong></td>
<td>
<a asp-controller="BlockExplorer" asp-action="BlockHash" asp-route-hash="@Model.nextBlockHash">@(Model.nextBlockHash??"-")</a>
</td>
</tr>
</tbody>
</table>
......@@ -60,15 +64,22 @@
<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>
<th>Index</th>
<th>Transaction ID</th>
</tr>
</thead>
<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>
</table>
</div>
......
......@@ -52,7 +52,7 @@
<tr>
<td><strong>Block Date/Time</strong></td>
<td>@Model.timestamp</td>
<td>@Model.timestamp.ToString("F")</td>
</tr>
<tr>
<td><strong>Total Output</strong></td>
......
......@@ -1351,7 +1351,7 @@ header
*/
.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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment