Development
This commit is contained in:
parent
113328c566
commit
01a636e842
16 changed files with 388 additions and 502 deletions
|
|
@ -4,7 +4,7 @@ import os
|
|||
|
||||
from flask import Blueprint, request, redirect, flash
|
||||
from auth import require_level
|
||||
from config_utils import load_config, save_config_with_snapshot, verify_config_hash, queued_msg, queue_command
|
||||
from config_utils import load_config, record_group, diff_fields, verify_config_hash, queued_msg, queue_command
|
||||
import sanitize
|
||||
import validation as validate
|
||||
|
||||
|
|
@ -66,12 +66,8 @@ def physicalinterface_save():
|
|||
for msg in errors:
|
||||
flash(msg, 'error')
|
||||
return redirect(f'/{_PAGE}')
|
||||
flash(save_config_with_snapshot(
|
||||
cfg, path='network_interfaces', key='global', operation='edit',
|
||||
before=before, after=copy.deepcopy(cfg['network_interfaces']),
|
||||
description='Updated network interfaces',
|
||||
cmd='core apply',
|
||||
), 'success')
|
||||
changes = diff_fields(before, cfg['network_interfaces'])
|
||||
flash(record_group(cfg, 'network_interfaces', None, None, changes, 'core apply'), 'success')
|
||||
return redirect(f'/{_PAGE}')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue