Development
This commit is contained in:
parent
6221ee3691
commit
4150c6ef6e
4 changed files with 141 additions and 13 deletions
|
|
@ -1,8 +1,8 @@
|
|||
from flask import Blueprint, request, redirect, flash, session
|
||||
from auth import require_level
|
||||
from config_utils import (flush_selected_to_queue, delete_pending_by_uuids,
|
||||
get_dashboard_pending, _is_locked, _format_timing,
|
||||
_seconds_until_next_run)
|
||||
from config_utils import (flush_pending_to_queue, flush_selected_to_queue,
|
||||
delete_pending_by_uuids, get_dashboard_pending,
|
||||
_is_locked, _format_timing, _seconds_until_next_run)
|
||||
|
||||
bp = Blueprint('action_actions', __name__)
|
||||
|
||||
|
|
@ -20,11 +20,10 @@ def actions_cardoptions_save():
|
|||
@bp.route('/action/actions_cardpendingchanges_applynow', methods=['POST'])
|
||||
@require_level('administrator')
|
||||
def actions_cardpendingchanges_applynow():
|
||||
selected_uuids = request.form.getlist('selected_uuids')
|
||||
if not selected_uuids:
|
||||
flash('No items selected.', 'info')
|
||||
if not get_dashboard_pending():
|
||||
flash('No pending changes to apply.', 'info')
|
||||
return redirect(_VIEW)
|
||||
flush_selected_to_queue(selected_uuids)
|
||||
flush_pending_to_queue()
|
||||
if _is_locked():
|
||||
msg = 'Changes queued. They are being applied now.'
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue