mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-27 02:44:32 +01:00
200 lines
9.3 KiB
Plaintext
200 lines
9.3 KiB
Plaintext
@inject SignInManager<ApplicationUser> SignInManager
|
|
@inject UserManager<ApplicationUser> UserManager
|
|
@inject RoleManager<IdentityRole> RoleManager
|
|
@inject BTCPayServer.Services.BTCPayServerEnvironment env
|
|
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
|
|
<title>BTCPay Server</title>
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
<link href="~/vendor/bootstrap/css/bootstrap.css" rel="stylesheet">
|
|
|
|
<!-- Custom fonts for this template -->
|
|
@*<link href="~/vendor/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
|
<link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>*@
|
|
|
|
<!-- Plugin CSS -->
|
|
<link href="~/vendor/magnific-popup/magnific-popup.css" rel="stylesheet">
|
|
|
|
<!-- Custom styles for this template -->
|
|
<link href="~/css/creative.css" rel="stylesheet" />
|
|
|
|
<!-- Custom styles for this template -->
|
|
<link href="~/css/site.css" rel="stylesheet" />
|
|
|
|
</head>
|
|
|
|
<body id="page-top">
|
|
|
|
@{
|
|
if(ViewBag.AlwaysShrinkNavBar == null)
|
|
{
|
|
ViewBag.AlwaysShrinkNavBar = true;
|
|
}
|
|
var additionalStyle = ViewBag.AlwaysShrinkNavBar ? "navbar-shrink always-shrinked" : "";
|
|
}
|
|
|
|
<!-- Navigation -->
|
|
<nav class='navbar navbar-expand-lg navbar-light fixed-top @additionalStyle' id="mainNav">
|
|
<div class="container">
|
|
<a class="navbar-brand js-scroll-trigger" href="~/"><img src="~/img/logo.png" height="45"></a>
|
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
|
<ul class="navbar-nav ml-auto">
|
|
@if(SignInManager.IsSignedIn(User))
|
|
{
|
|
@if(User.IsInRole(Roles.ServerAdmin))
|
|
{
|
|
<li class="nav-item"><a asp-area="" asp-controller="Server" asp-action="ListUsers" class="nav-link js-scroll-trigger">Server settings</a></li>
|
|
}
|
|
<li class="nav-item"><a asp-area="" asp-controller="Stores" asp-action="ListStores" class="nav-link js-scroll-trigger">Stores</a></li>
|
|
<li class="nav-item"><a asp-area="" asp-controller="Invoice" asp-action="ListInvoices" class="nav-link js-scroll-trigger">Invoices</a></li>
|
|
<li class="nav-item">
|
|
<a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage" class="nav-link js-scroll-trigger">My settings</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a asp-area="" asp-controller="Account" asp- asp-action="Logout" title="Manage" class="nav-link js-scroll-trigger">Log out</a>
|
|
</li>}
|
|
else
|
|
{
|
|
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Register" class="nav-link js-scroll-trigger">Register</a></li>
|
|
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Login" class="nav-link js-scroll-trigger">Log in</a></li>}
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
@RenderBody()
|
|
|
|
|
|
@if(!dashboard.IsFullySynched())
|
|
{
|
|
<!-- Modal -->
|
|
<div id="synching-modal" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Your nodes are synching...</h4>
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>
|
|
Some of your nodes are still synching...<br />
|
|
BTCPay Server will not work correctly until it is over.
|
|
</p>
|
|
@foreach(var line in dashboard.GetAll())
|
|
{
|
|
<h4>@line.Network.CryptoCode</h4>
|
|
@if(line.Status == null)
|
|
{
|
|
<ul>
|
|
<li>The node is offline</li>
|
|
@if(line.Error != null)
|
|
{
|
|
<li>Last error: @line.Error</li>
|
|
}
|
|
</ul>
|
|
}
|
|
else
|
|
{
|
|
<ul>
|
|
<li>NBXplorer headers height: @line.Status.ChainHeight</li>
|
|
@if(line.Status.BitcoinStatus == null)
|
|
{
|
|
if(line.State == BTCPayServer.HostedServices.NBXplorerState.Synching)
|
|
{
|
|
<li>The node is starting...</li>
|
|
}
|
|
else
|
|
{
|
|
<li>The node is offline</li>
|
|
@if(line.Error != null)
|
|
{
|
|
<li>Last error: @line.Error</li>
|
|
}
|
|
}
|
|
}
|
|
else if(line.Status.BitcoinStatus.IsSynched)
|
|
{
|
|
<li>The node is synched (Height: @line.Status.BitcoinStatus.Headers)</li>
|
|
@if(line.Status.BitcoinStatus.IsSynched &&
|
|
line.Status.SyncHeight.HasValue &&
|
|
line.Status.SyncHeight.Value < line.Status.BitcoinStatus.Headers)
|
|
{
|
|
<li>NBXplorer is synching... (Height: @line.Status.SyncHeight.Value)</li>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<li>Node headers height: @line.Status.BitcoinStatus.Headers</li>
|
|
<li>Validated blocks: @line.Status.BitcoinStatus.Blocks</li>
|
|
}
|
|
</ul>
|
|
@if(!line.Status.IsFullySynched && line.Status.BitcoinStatus != null)
|
|
{
|
|
<div class="progress">
|
|
<div class="progress-bar" role="progressbar" aria-valuenow="@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))"
|
|
aria-valuemin="0" aria-valuemax="100" style="width:@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))%">
|
|
@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))%
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<footer class="bg-dark">
|
|
<div class="container text-right"><span style="font-size:8px;">@env.ToString()</span></div>
|
|
</footer>
|
|
|
|
<!-- Bootstrap core JavaScript -->
|
|
<script src="~/vendor/jquery/jquery.min.js"></script>
|
|
<script src="~/vendor/popper/popper.min.js"></script>
|
|
<script src="~/vendor/bootstrap/js/bootstrap.min.js"></script>
|
|
|
|
<!-- Plugin JavaScript -->
|
|
<script src="~/vendor/jquery-easing/jquery.easing.min.js"></script>
|
|
<script src="~/vendor/scrollreveal/scrollreveal.min.js"></script>
|
|
<script src="~/vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
|
|
|
|
<!-- Custom scripts for this template -->
|
|
<script src="~/js/creative.js"></script>
|
|
|
|
@if(!dashboard.IsFullySynched())
|
|
{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#synching-modal").modal();
|
|
});
|
|
</script>
|
|
}
|
|
|
|
@RenderSection("Scripts", required: false)
|
|
</body>
|
|
|
|
</html>
|