styles update
This commit is contained in:
+11
-10
@@ -19,32 +19,33 @@ def backups_page():
|
||||
for path in list_backups():
|
||||
size_mb = path.stat().st_size / 1024 / 1024
|
||||
backup_name = html.escape(path.name)
|
||||
backup_path = html.escape(str(path))
|
||||
backup_path = html.escape(str(path), quote=True)
|
||||
|
||||
restore_cmd = html.escape(
|
||||
f"sudo /home/jiri/workspace/appfactory-tools/scripts/restore-appfactory.sh --force {path}"
|
||||
f"sudo /home/jiri/workspace/appfactory-tools/scripts/restore-appfactory.sh --force {path}",
|
||||
quote=True,
|
||||
)
|
||||
|
||||
rows += f"""
|
||||
<tr>
|
||||
<tr class="backup-row">
|
||||
<td>
|
||||
<strong>{backup_name}</strong><br>
|
||||
<span class="muted">{size_mb:.2f} MB</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cmd-row">
|
||||
<input readonly value="{backup_path}" id="path-{backup_name}">
|
||||
<button onclick="copyValue('path-{backup_name}')">Copy</button>
|
||||
<div class="copy-row">
|
||||
<input readonly value="{backup_path}">
|
||||
<button type="button" class="copy-button" data-copy-value="{backup_path}" onclick="copyText(this)">Copy</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cmd-row">
|
||||
<input readonly value="{restore_cmd}" id="restore-{backup_name}">
|
||||
<button onclick="copyValue('restore-{backup_name}')">Copy</button>
|
||||
<div class="copy-row">
|
||||
<input readonly value="{restore_cmd}">
|
||||
<button type="button" class="copy-button" data-copy-value="{restore_cmd}" onclick="copyText(this)">Copy</button>
|
||||
</div>
|
||||
<div class="muted">Restore is dangerous and must be run manually over SSH.</div>
|
||||
</td>
|
||||
<td>
|
||||
<td class="actions-cell">
|
||||
<form method="post" action="/portal/backups/delete" onsubmit="return confirm('Delete backup {backup_name}?');">
|
||||
<input type="hidden" name="backup_path" value="{backup_path}">
|
||||
<button type="submit" class="danger">Delete</button>
|
||||
|
||||
Reference in New Issue
Block a user