Development
This commit is contained in:
parent
cd667c5009
commit
3ee1a6f0de
3 changed files with 24 additions and 7 deletions
|
|
@ -1700,7 +1700,17 @@ def render_layout(view_id, content_html, tokens):
|
|||
+ '</ul>')
|
||||
fix_html = ''
|
||||
if fix_cmds:
|
||||
fix_items = ''.join(f'<li>Run `{e(c)}`</li>' for c in fix_cmds)
|
||||
_queue_urls = {
|
||||
'sudo python3 core.py --apply': '/action/queue_core_apply',
|
||||
}
|
||||
def _fix_item(c):
|
||||
url = _queue_urls.get(c)
|
||||
if url:
|
||||
btn = (f'<form class="form-inline" method="post" action="{e(url)}">'
|
||||
f'<button type="submit" class="btn-link">Click here</button></form>')
|
||||
return f'<li>{btn} or manually run <code>{e(c)}</code></li>'
|
||||
return f'<li>Run <code>{e(c)}</code></li>'
|
||||
fix_items = ''.join(_fix_item(c) for c in fix_cmds)
|
||||
fix_html = ('<div style="margin-top:0.5em"><strong>To fix:</strong></div>'
|
||||
f'<ul style="margin:0.25em 0;padding-left:1.25em">{fix_items}</ul>')
|
||||
content = ('<div style="width:100%">'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue