Compare commits

..

2 Commits

Author SHA1 Message Date
5106686a12 Bump version: 1.4.5 → 1.4.6
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m23s
2025-07-19 10:20:50 +01:00
21c48d0b6a show current entries in dns 2025-07-19 10:20:47 +01:00
3 changed files with 26 additions and 14 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "1.4.5"
current_version = "1.4.6"
commit = true
tag = true
tag_name = "{new_version}"

View File

@ -1 +1 @@
1.4.5
1.4.6

View File

@ -21,9 +21,17 @@
</div>
</div>
</div>
<ul class="list-group list-group-flush" id="dns-list">
<table class="table table-striped mt-3">
<thead>
<tr>
<th>DNS Entry</th>
<th style="width: 10%;">Actions</th>
</tr>
</thead>
<tbody id="dns-list-table-body">
<!-- DNS entries will be loaded here -->
</ul>
</tbody>
</table>
</div>
</div>
{% endblock %}
@ -33,7 +41,7 @@
<script>
document.addEventListener('DOMContentLoaded', function() {
// DNS Manager
const dnsList = document.getElementById('dns-list');
const dnsListTableBody = document.getElementById('dns-list-table-body');
const addDnsBtn = document.getElementById('add-dns-btn');
const dnsEntryInput = document.getElementById('dns-entry-input');
@ -41,20 +49,24 @@
fetch("{{ config.BASE_URL }}/dns")
.then(response => response.json())
.then(data => {
dnsList.innerHTML = '';
dnsListTableBody.innerHTML = '';
if (data.length === 0) {
dnsList.innerHTML = '<li class="list-group-item">No DNS entries found.</li>';
const row = dnsListTableBody.insertRow();
const cell = row.insertCell();
cell.colSpan = 2;
cell.textContent = 'No DNS entries found.';
cell.classList.add('text-center');
} else {
data.forEach(entry => {
const li = document.createElement('li');
li.className = 'list-group-item d-flex justify-content-between align-items-center';
li.textContent = entry;
const row = dnsListTableBody.insertRow();
const entryCell = row.insertCell();
entryCell.textContent = entry;
const actionCell = row.insertCell();
const removeBtn = document.createElement('button');
removeBtn.className = 'btn btn-danger btn-sm';
removeBtn.textContent = 'Remove';
removeBtn.textContent = 'Delete';
removeBtn.addEventListener('click', () => removeDnsEntry(entry));
li.appendChild(removeBtn);
dnsList.appendChild(li);
actionCell.appendChild(removeBtn);
});
}
});