Development

This commit is contained in:
Matthew Grotke 2026-05-25 01:04:47 -04:00
parent a4652866c3
commit 27eaea3d73
19 changed files with 602 additions and 427 deletions

View file

@ -111,9 +111,9 @@ def ddns_tableaccounts_rowdelete():
return redirect(VIEW)
@bp.route('/action/ddns_cardcheckinterval_save', methods=['POST'])
@bp.route('/action/ddns_cardipcheckinterval_save', methods=['POST'])
@require_level('administrator')
def ddns_cardcheckinterval_save():
def ddns_cardipcheckinterval_save():
raw = request.form.get('timer_interval', '').strip()
try:
mins = int(raw)
@ -157,9 +157,9 @@ def ddns_cardipcheckservices_save():
return redirect(VIEW)
@bp.route('/action/ddns_cardddnslog_save', methods=['POST'])
@bp.route('/action/ddns_cardlogging_save', methods=['POST'])
@require_level('administrator')
def ddns_cardddnslog_save():
def ddns_cardlogging_save():
log_max_kb = validate.int_range(request.form.get('log_max_kb', '').strip(), 64, None)
if log_max_kb is None:
flash('Max Log Size must be a number >= 64.', 'error')
@ -178,9 +178,9 @@ def ddns_cardddnslog_save():
return redirect(VIEW)
@bp.route('/action/ddns_cardddnslog_clear', methods=['POST'])
@bp.route('/action/ddns_cardlogging_clear', methods=['POST'])
@require_level('administrator')
def ddns_cardddnslog_clear():
def ddns_cardlogging_clear():
try:
open(LOG_FILE, 'w').close()
flash('DDNS log cleared.', 'success')
@ -189,9 +189,9 @@ def ddns_cardddnslog_clear():
return redirect(VIEW)
@bp.route('/action/ddns_cardddnslog_download', methods=['GET'])
@bp.route('/action/ddns_cardlogging_download', methods=['GET'])
@require_level('administrator')
def ddns_cardddnslog_download():
def ddns_cardlogging_download():
if not os.path.isfile(LOG_FILE):
abort(404)
return send_file(LOG_FILE, as_attachment=True, download_name='ddns.log', mimetype='text/plain')