btcpayserver/BTCPayServer/Views/UIStores/Lightning.cshtml
d11n 0f5d932726
Add test IDs for Lightning and Plugins (#3402)
I came across these when writing a Selenium test for LNbank.
2022-02-02 12:47:22 +09:00

67 lines
2.6 KiB
Plaintext

@using BTCPayServer.Lightning
@using BTCPayServer.Client
@model LightningViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../UILightning/_Nav";
ViewData.SetActivePage(StoreNavPages.Lightning, $"{Model.CryptoCode} Lightning", Context.GetStoreData().Id);
}
<div class="mb-5">
<h3 class="mb-3">@ViewData["Title"]</h3>
<div class="mb-3">
<span class="me-3" id="NodeType">@Model.LightningNodeType Node</span>
@if (Model.LightningNodeType != LightningNodeType.Internal)
{
<span class="me-3" id="CustomNodeInfo">
@if (LightningConnectionString.TryParse(Model.ConnectionString, out var cs))
{
@typeof(LightningConnectionType).DisplayName(cs.ConnectionType.ToString())
<span>(@cs.BaseUri)</span>
}
else
{
@Model.ConnectionString
}
</span>
}
<a
asp-controller="UIPublicLightningNodeInfo"
asp-action="ShowLightningNodeInfo"
asp-route-cryptoCode="@Model.CryptoCode"
asp-route-storeId="@Model.StoreId"
target="_blank"
id="PublicNodeInfo">
Public Node Info
</a>
</div>
@if (Model.Services != null && Model.Services.Any())
{
<div permission="@Policies.CanModifyServerSettings" class="mt-4">
<h3 class="mb-3">Services</h3>
<div id="Services" class="services-list">
@foreach (var service in Model.Services)
{
@if (string.IsNullOrEmpty(service.Link))
{
<a asp-controller="UIServer" asp-action="Service" asp-route-serviceName="@service.ServiceName" asp-route-cryptoCode="@service.CryptoCode" class="service" id="@($"Service-{service.ServiceName}")">
<img src="@($"~/img/{service.Type.ToLower()}.png")" asp-append-version="true" alt="@service.DisplayName" />
<h6>@service.DisplayName</h6>
</a>
}
else
{
<a href="@service.Link" target="_blank" rel="noreferrer noopener" class="service" id="@($"Service-{service.ServiceName}")">
<img src="@($"~/img/{service.Type.ToLower()}.png")" asp-append-version="true" alt="@service.DisplayName" />
<h6>@service.DisplayName</h6>
</a>
}
}
</div>
</div>
}
</div>