remove the route
This commit is contained in:
parent
ef38edfcd4
commit
824bdd080f
12
app.py
12
app.py
@ -315,17 +315,7 @@ def config_dashboard():
|
|||||||
"""Renders the configuration dashboard."""
|
"""Renders the configuration dashboard."""
|
||||||
if not session.get('config_logged_in'):
|
if not session.get('config_logged_in'):
|
||||||
return redirect(url_for('config'))
|
return redirect(url_for('config'))
|
||||||
|
return render_template('config_dashboard.html')
|
||||||
DNS_FILE = os.path.join(os.path.dirname(__file__), '..', 'KTVManager_python', 'ktvmanager', 'lib', 'DNS_list.txt')
|
|
||||||
|
|
||||||
def read_dns_list():
|
|
||||||
if not os.path.exists(DNS_FILE):
|
|
||||||
return []
|
|
||||||
with open(DNS_FILE, 'r') as f:
|
|
||||||
return [line.strip() for line in f.readlines()]
|
|
||||||
|
|
||||||
dns_list = read_dns_list()
|
|
||||||
return render_template('config_dashboard.html', dns_list=dns_list)
|
|
||||||
|
|
||||||
@app.route('/check-expiring-accounts', methods=['POST'])
|
@app.route('/check-expiring-accounts', methods=['POST'])
|
||||||
def check_expiring_accounts():
|
def check_expiring_accounts():
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
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("{{ config.BASE_URL }}/dns")
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
dnsList.innerHTML = '';
|
dnsList.innerHTML = '';
|
||||||
@ -63,7 +63,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("{{ config.BASE_URL }}/dns", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@ -77,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeDnsEntry(dnsEntry) {
|
function removeDnsEntry(dnsEntry) {
|
||||||
fetch("{{ url_for('dns.remove_dns') }}", {
|
fetch("{{ config.BASE_URL }}/dns", {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user