Compare commits

..

No commits in common. "ef38edfcd487ff368703f01cbece7b9470713f71" and "08ebb7a2658fe9fe2811b0ed8c66fc9b00c43875" have entirely different histories.

3 changed files with 39 additions and 37 deletions

View File

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

View File

@ -1 +1 @@
1.4.4 1.4.3

View File

@ -28,17 +28,50 @@
</div> </div>
{% endblock %} {% endblock %}
{% block scripts %}
{{ super() }}
<script>
document.getElementById('send-test-notification-btn').addEventListener('click', function() {
fetch('{{ url_for("send_test_notification") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Test notification sent successfully!');
} else {
alert('Failed to send test notification.');
}
}).catch(err => {
console.error('Error sending test notification:', err);
alert('An error occurred while sending the test notification.');
});
});
document.getElementById('check-expiring-accounts-btn').addEventListener('click', function() {
fetch('{{ url_for("check_expiring_accounts") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Expiring accounts check triggered successfully!');
} else {
alert('Failed to trigger expiring accounts check.');
}
}).catch(err => {
console.error('Error triggering expiring accounts check:', err);
alert('An error occurred while triggering the expiring accounts check.');
});
});
</script>
{% endblock %}
{% block scripts %} {% block scripts %}
{{ super() }} {{ super() }}
<script> <script>
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// DNS Manager
const dnsList = document.getElementById('dns-list'); const dnsList = document.getElementById('dns-list');
const addDnsBtn = document.getElementById('add-dns-btn'); const addDnsBtn = document.getElementById('add-dns-btn');
const dnsEntryInput = document.getElementById('dns-entry-input'); const dnsEntryInput = document.getElementById('dns-entry-input');
function fetchDnsList() { function fetchDnsList() {
fetch("{{ url_for('dns.get_dns_list') }}") fetch('/dns')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
dnsList.innerHTML = ''; dnsList.innerHTML = '';
@ -63,7 +96,7 @@
function addDnsEntry() { function addDnsEntry() {
const dnsEntry = dnsEntryInput.value.trim(); const dnsEntry = dnsEntryInput.value.trim();
if (dnsEntry) { if (dnsEntry) {
fetch("{{ url_for('dns.add_dns') }}", { fetch('/dns', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@ -77,7 +110,7 @@
} }
function removeDnsEntry(dnsEntry) { function removeDnsEntry(dnsEntry) {
fetch("{{ url_for('dns.remove_dns') }}", { fetch('/dns', {
method: 'DELETE', method: 'DELETE',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@ -90,37 +123,6 @@
addDnsBtn.addEventListener('click', addDnsEntry); addDnsBtn.addEventListener('click', addDnsEntry);
fetchDnsList(); fetchDnsList();
// Other buttons
document.getElementById('send-test-notification-btn').addEventListener('click', function() {
fetch('{{ url_for("send_test_notification") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Test notification sent successfully!');
} else {
alert('Failed to send test notification.');
}
}).catch(err => {
console.error('Error sending test notification:', err);
alert('An error occurred while sending the test notification.');
});
});
document.getElementById('check-expiring-accounts-btn').addEventListener('click', function() {
fetch('{{ url_for("check_expiring_accounts") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Expiring accounts check triggered successfully!');
} else {
alert('Failed to trigger expiring accounts check.');
}
}).catch(err => {
console.error('Error triggering expiring accounts check:', err);
alert('An error occurred while triggering the expiring accounts check.');
});
});
}); });
</script> </script>
{% endblock %} {% endblock %}