UI improvements and input validations
This commit is contained in:
parent
b8c4914a52
commit
270856b391
22 changed files with 1548 additions and 302 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from flask import Blueprint, request, redirect, flash
|
||||
from auth import require_level
|
||||
from config_utils import load_core, save_core, verify_core_hash, apply_msg
|
||||
from config_utils import load_core, save_core, verify_core_hash, queued_msg
|
||||
import sanitize
|
||||
import validate
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ def add_port_forward():
|
|||
core.setdefault('port_forwarding', []).append(entry)
|
||||
save_core(core)
|
||||
|
||||
flash(apply_msg(), 'success')
|
||||
flash(queued_msg('core apply'), 'success')
|
||||
return redirect(VIEW)
|
||||
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ def toggle_port_forward():
|
|||
items[idx]['enabled'] = not items[idx].get('enabled', True)
|
||||
save_core(core)
|
||||
|
||||
flash(apply_msg(), 'success')
|
||||
flash(queued_msg('core apply'), 'success')
|
||||
return redirect(VIEW)
|
||||
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ def edit_port_forward():
|
|||
items[idx]['enabled'] = request.form.get('enabled') == 'on'
|
||||
save_core(core)
|
||||
|
||||
flash(apply_msg(), 'success')
|
||||
flash(queued_msg('core apply'), 'success')
|
||||
return redirect(VIEW)
|
||||
|
||||
|
||||
|
|
@ -163,5 +163,5 @@ def delete_port_forward():
|
|||
removed = items.pop(idx)
|
||||
save_core(core)
|
||||
|
||||
flash(apply_msg(), 'success')
|
||||
flash(queued_msg('core apply'), 'success')
|
||||
return redirect(VIEW)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue