mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-23 19:42:50 +00:00
Create Backup funcitonality
Added create backup functionality to the admin panel
This commit is contained in:
parent
5521a86693
commit
ef551f4cc6
3 changed files with 44 additions and 1 deletions
|
@ -154,6 +154,17 @@
|
|||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-light mb-3">
|
||||
<div class="card-header"><button type="button" class="btn btn-link collapsed" data-toggle="collapse"
|
||||
data-target="#g_database">Database</button></div>
|
||||
<div id="g_database" class="card-body collapse" data-parent="#config-form">
|
||||
<div class="small mb-3">
|
||||
NOTE: A local installation of sqlite3 is required for this section to work.
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" onclick="backupDatabase();">Backup Database</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -268,6 +279,12 @@
|
|||
|
||||
return false;
|
||||
}
|
||||
function backupDatabase() {
|
||||
_post("/admin/config/backup_db",
|
||||
"Backup created successfully",
|
||||
"Error creating backup");
|
||||
return false;
|
||||
}
|
||||
function masterCheck(check_id, inputs_query) {
|
||||
function toggleEnabled(check_id, inputs_query, enabled) {
|
||||
$(inputs_query).prop("disabled", !enabled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue