btcpayserver/BTCPayServer/Views/UIServer/Services.cshtml
d11n c56821300a
Server Settings: Consolidate Storage and Files (#3863)
* Server Settings: Consolidate Storage and Files

* Improve storage options name display

* Remove file services from services page

* Remove more code
2022-06-15 21:06:16 +09:00

133 lines
4.1 KiB
Plaintext

@model BTCPayServer.Models.ServerViewModels.ServicesViewModel
@{
ViewData.SetActivePage(ServerNavPages.Services, "Services");
}
<h3 class="mb-4">@ViewData["Title"]</h3>
<div class="mb-5">
<h4 class="mb-3">Crypto services exposed by your server</h4>
<table class="table table-hover mt-2">
<thead>
<tr>
<th>Crypto</th>
<th>Access Type</th>
<th style="text-align: right">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var s in Model.ExternalServices.Where(service => !string.IsNullOrEmpty(service.CryptoCode)))
{
<tr>
<td>@s.CryptoCode</td>
<td>
<span>@s.DisplayName</span>
@if (s.ConnectionString.IsOnion() == true ||
(s.ConnectionString.IsOnion() == false && Context.Request.IsOnion()))
{
<img style="display:inline; margin-top:-8px;" src="~/img/icons/Onion_Color.svg" height="20" asp-append-version="true" alt="Tor Hidden Service" />
}
</td>
<td style="text-align: right">
<a asp-action="Service" asp-route-serviceName="@s.ServiceName" asp-route-cryptoCode="@s.CryptoCode">See information</a>
</td>
</tr>
}
</tbody>
</table>
</div>
@if (Model.OtherExternalServices.Count != 0 || Model.ExternalServices.Any(service => string.IsNullOrEmpty(service.CryptoCode)))
{
<div class="mb-5">
<h4 class="mb-3">Other external services</h4>
<table class="table table-hover mt-2">
<thead>
<tr>
<th>Name</th>
<th style="text-align: right">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var s in Model.ExternalServices.Where(service => string.IsNullOrEmpty(service.CryptoCode)))
{
<tr>
<td>@s.DisplayName</td>
<td style="text-align: right">
<a asp-action="Service" asp-route-serviceName="@s.ServiceName">See information</a>
</td>
</tr>
}
@foreach (var s in Model.OtherExternalServices)
{
<tr>
<td>@s.Name</td>
<td style="text-align: right">
<a href="@s.Link" target="_blank" rel="noreferrer noopener">See information</a>
</td>
</tr>
}
</tbody>
</table>
</div>
}
@if (Model.TorHttpServices.Count != 0)
{
<div class="mb-5">
<h4 class="mb-3">HTTP-based Tor hidden services</h4>
<table class="table table-hover mt-2">
<thead>
<tr>
<th>Name</th>
<th style="text-align: right">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var s in Model.TorHttpServices)
{
<tr>
<td>@s.Name</td>
<td style="text-align: right">
<a href="@s.Link" target="_blank" rel="noreferrer noopener">See information</a>
</td>
</tr>
}
</tbody>
</table>
</div>
}
@if (Model.TorOtherServices.Count != 0)
{
<div class="mb-5">
<h4 class="mb-3">Other Tor hidden services</h4>
<table class="table table-hover mt-2">
<thead>
<tr>
<th>Name</th>
<th>URL</th>
</tr>
</thead>
<tbody>
@foreach (var s in Model.TorOtherServices)
{
<tr>
<td>@s.Name</td>
<td style="word-break: break-all;">
<code>@s.Link</code>
</td>
</tr>
}
</tbody>
</table>
</div>
}
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
}