31 lines
930 B
HTML
31 lines
930 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Config Dashboard{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<h2>Configuration Dashboard</h2>
|
|
<p>Welcome to the configuration page.</p>
|
|
<button id="send-test-notification-btn" class="btn btn-primary">Send Test Notification</button>
|
|
</div>
|
|
{% 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.');
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |