Compare commits
2 Commits
08ebb7a265
...
ef38edfcd4
Author | SHA1 | Date | |
---|---|---|---|
ef38edfcd4 | |||
7622716b92 |
@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "1.4.3"
|
current_version = "1.4.4"
|
||||||
commit = true
|
commit = true
|
||||||
tag = true
|
tag = true
|
||||||
tag_name = "{new_version}"
|
tag_name = "{new_version}"
|
||||||
|
@ -28,50 +28,17 @@
|
|||||||
</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('/dns')
|
fetch("{{ url_for('dns.get_dns_list') }}")
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
dnsList.innerHTML = '';
|
dnsList.innerHTML = '';
|
||||||
@ -96,7 +63,7 @@ document.getElementById('check-expiring-accounts-btn').addEventListener('click',
|
|||||||
function addDnsEntry() {
|
function addDnsEntry() {
|
||||||
const dnsEntry = dnsEntryInput.value.trim();
|
const dnsEntry = dnsEntryInput.value.trim();
|
||||||
if (dnsEntry) {
|
if (dnsEntry) {
|
||||||
fetch('/dns', {
|
fetch("{{ url_for('dns.add_dns') }}", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@ -110,7 +77,7 @@ document.getElementById('check-expiring-accounts-btn').addEventListener('click',
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeDnsEntry(dnsEntry) {
|
function removeDnsEntry(dnsEntry) {
|
||||||
fetch('/dns', {
|
fetch("{{ url_for('dns.remove_dns') }}", {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@ -123,6 +90,37 @@ document.getElementById('check-expiring-accounts-btn').addEventListener('click',
|
|||||||
|
|
||||||
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 %}
|
Loading…
x
Reference in New Issue
Block a user