Development
This commit is contained in:
parent
cd667c5009
commit
3ee1a6f0de
3 changed files with 24 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from flask import Blueprint, request, redirect, flash, session
|
||||
from auth import require_level
|
||||
from config_utils import (flush_pending_to_queue, get_dashboard_pending,
|
||||
revert_snapshot_to_core,
|
||||
revert_snapshot_to_config, queued_msg,
|
||||
_is_locked, _format_timing, _seconds_until_next_run)
|
||||
|
||||
bp = Blueprint('action_actions', __name__)
|
||||
|
|
@ -36,6 +36,13 @@ def actions_cardpending_applynow():
|
|||
return redirect(_VIEW)
|
||||
|
||||
|
||||
@bp.route('/action/queue_core_apply', methods=['POST'])
|
||||
@require_level('administrator')
|
||||
def queue_core_apply():
|
||||
flash(queued_msg('core apply', action_label='Apply queued'), 'success')
|
||||
return redirect(_VIEW)
|
||||
|
||||
|
||||
@bp.route('/action/actions_cardhistory_revertselected', methods=['POST'])
|
||||
@require_level('administrator')
|
||||
def actions_cardhistory_revertselected():
|
||||
|
|
@ -45,7 +52,7 @@ def actions_cardhistory_revertselected():
|
|||
return redirect(_VIEW)
|
||||
succeeded, failed = 0, 0
|
||||
for uuid in selected_uuids:
|
||||
msg, ok = revert_snapshot_to_core(uuid)
|
||||
msg, ok = revert_snapshot_to_config(uuid)
|
||||
if ok:
|
||||
succeeded += 1
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue