remove the extra lines at the end of the index
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 35s
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 35s
This commit is contained in:
parent
d3dd69cc02
commit
edaefd9cd1
@ -354,59 +354,3 @@
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
const domainList = document.getElementById('domainList');
|
||||
domainList.innerHTML = '';
|
||||
domains.forEach(domain => {
|
||||
const domainDiv = document.createElement('div');
|
||||
domainDiv.className = 'domain-list-item';
|
||||
domainDiv.innerHTML = `
|
||||
function showStatus(message, type) {
|
||||
const statusDiv = document.createElement('div');
|
||||
statusDiv.className = `status ${type}`;
|
||||
statusDiv.textContent = message;
|
||||
const container = document.querySelector('.container');
|
||||
const domainList = document.querySelector('.domain-list');
|
||||
if (container && domainList) {
|
||||
container.insertBefore(statusDiv, domainList);
|
||||
} else {
|
||||
document.body.appendChild(statusDiv);
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (statusDiv.parentNode) {
|
||||
statusDiv.remove();
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
function loadDomains() {
|
||||
fetch('/api/domains')
|
||||
.then(response => response.json())
|
||||
.then(domains => {
|
||||
const domainList = document.getElementById('domainList');
|
||||
domainList.innerHTML = '';
|
||||
domains.forEach(domain => {
|
||||
const domainDiv = document.createElement('div');
|
||||
domainDiv.className = 'domain-list-item';
|
||||
domainDiv.innerHTML = `
|
||||
<h3>${domain.domain}</h3>
|
||||
<p>Backend: ${domain.backend_name}</p>
|
||||
<p>SSL: ${domain.ssl_enabled ? 'Enabled' : 'Disabled'}</p>
|
||||
<button onclick="requestSSL('${domain.domain}')" class="ssl-btn">
|
||||
${domain.ssl_enabled ? 'Renew SSL' : 'Enable SSL'}
|
||||
</button>
|
||||
<button onclick="deleteDomain('${domain.domain}')" class="delete-btn">Delete Domain</button>
|
||||
`;
|
||||
domainList.appendChild(domainDiv);
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error loading domains:', error);
|
||||
showStatus('Error loading domains: ' + error.message, 'error');
|
||||
});
|
||||
}
|
||||
|
||||
addServerField();
|
||||
loadDomains();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user