btcpayserver/BTCPayServer/Views/Server/SSHService.cshtml
d11n 06db29dd43
Delete confirmation modals (#2614)
* Refactor confirm view: separate modal

* Add delete confirmation modals for apps and FIDO2

* Add delete confirmation modals for 2FA actions

* Add delete confirmation modals for api keys and webhooks

* Add delete confirmation modals for stores and store users

* Add delete confirmation modals for LND seed and SSH

* Add delete confirmation modals for rate rule scripting

* Test fixes and improvements

* Add delete confirmation modals for dynamic DNS

* Add delete confirmation modals for store access tokens

* Add confirmation modals for pull payment archiving

* Refactor confirm modal code

* Add confirmation input, update wording

* Update modal styles

* Upgrade ChromeDriver

* Simplify and unify confirmation input

* Test fixes

* Fix wording

* Add modals for wallet replace and removal
2021-09-07 11:55:53 +09:00

93 lines
3.3 KiB
Plaintext

@model BTCPayServer.Models.ServerViewModels.SSHServiceViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "SSH settings");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<div class="row">
<div class="col-md-8">
<div class="form-group">
<p>
<span>SSH services are used by the maintenance operations<br /></span>
</p>
</div>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
<div class="form-group">
<div class="form-group">
<label asp-for="CommandLine" class="form-label"></label>
<input asp-for="CommandLine" class="form-control" readonly />
</div>
@if (!string.IsNullOrEmpty(Model.Password))
{
<div class="form-group">
<label asp-for="Password" class="form-label"></label>
<input asp-for="Password" class="form-control" readonly />
</div>
}
@if (!string.IsNullOrEmpty(Model.KeyFilePassword))
{
<div class="form-group">
<label asp-for="KeyFilePassword" class="form-label"></label>
<input asp-for="KeyFilePassword" class="form-control" readonly />
</div>
}
</div>
</div>
</div>
@if (Model.SSHKeyFileContent != null)
{
<h4>Authorized keys</h4>
<div class="row">
<div class="col-md-8">
<div class="form-group">
<p>
<span>You can enter here SSH public keys authorized to connect to your server.<br /></span>
</p>
</div>
<form method="post">
<div class="form-group">
<textarea asp-for="SSHKeyFileContent" rows="20" cols="80" class="form-control"></textarea>
<span asp-validation-for="SSHKeyFileContent" class="text-danger"></span>
</div>
<button name="command" id="submit" type="submit" class="btn btn-primary" value="Save">Save</button>
</form>
</div>
</div>
}
<h4 class="mt-5 mb-3">Other actions</h4>
<div class="row">
<div class="col-md-8">
<div class="form-group">
<p>
<span>Increase the security of your instance by disabling the ability to change the SSH settings in this BTCPay Server instance's user interface.<br /></span>
</p>
</div>
<div>
<form method="post">
<button name="command" id="disable" type="submit" class="btn btn-outline-danger mb-5" value="disable" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-confirm-input="DISABLE">Disable</button>
</form>
</div>
</div>
</div>
<partial name="_Confirm" model="@(new ConfirmModel("Disable modification of SSH settings", "This action is permanent and will remove the ability to change the SSH settings via the BTCPay Server user interface.", "Disable"))"/>
@section PageFootContent {
<script>
const disableButton = document.getElementById('disable')
disableButton.dataset.action = window.location.href + '/disable'
disableButton.addEventListener('click', event => {
event.preventDefault()
})
</script>
}