feat: Add new UI
All checks were successful
Build Docker / BuildImage (push) Successful in 32s

This commit is contained in:
2025-02-25 23:04:47 +11:00
parent a26eecf59e
commit 1c7093307a
3 changed files with 133 additions and 91 deletions

View File

@@ -22,9 +22,10 @@ function getSSL() {
history.pushState(null, null, url);
// Add a loading spinner
document.getElementById("results").innerHTML = `<div class="spinner-border text-primary" role="status">
document.getElementById("ssl-results").innerHTML = `<div style="text-align: center;">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>`;
</div></div>`;
// Send a GET request to the API
@@ -34,7 +35,7 @@ function getSSL() {
// Check if the request was successful
if (data.success) {
// Display the results
document.getElementById("results").innerHTML = `
document.getElementById("ssl-results").innerHTML = `
<div class="card shadow-sm p-4" style="max-width: 950px;margin: auto;">
<h2 class="mb-3">SSL Certificate Details</h2>
<ul class="list-group">
@@ -93,7 +94,7 @@ function getSSL() {
</button>
</div>
<div class="dnssec-details mt-2" style="display:none;">
<div class="card card-body bg-light"><pre class="mb-0" style="white-space: pre-wrap; text-align: left;">${data.dnssec.errors}${data.dnssec.output}</pre>
<div class="card card-body bg-light"><pre class="mb-0" style="white-space: pre-wrap; text-align: left;">${data.dnssec.output}</pre>
</div>
</div>
</li>
@@ -140,13 +141,13 @@ document.querySelector('.dnssec-toggle').addEventListener('click', function() {
} else {
// Display an error message
document.getElementById("results").innerHTML = `<h2>Error</h2>
document.getElementById("ssl-results").innerHTML = `<h2>Error</h2>
<p>${data.message}</p>`;
}
})
.catch(error => {
// Display an error message
document.getElementById("results").innerHTML = `<h2>Error</h2>
document.getElementById("ssl-results").innerHTML = `<h2>Error</h2>
<p>${error.message}</p>`;
});