Add button to remove all datasync settings from DB
seems useful for someone testing, as prep to make the switch
This commit is contained in:
parent
8aff5d519d
commit
4229798c7b
2 changed files with 68 additions and 30 deletions
|
@ -50,9 +50,57 @@
|
|||
</b-button>
|
||||
${h.end_form()}
|
||||
</div>
|
||||
<div class="level-item">
|
||||
<b-button type="is-danger"
|
||||
@click="purgeSettingsInit()"
|
||||
icon-pack="fas"
|
||||
icon-left="trash">
|
||||
Remove All Settings
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<b-modal has-modal-card
|
||||
:active.sync="purgeSettingsShowDialog">
|
||||
<div class="modal-card">
|
||||
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">Remove All Settings</p>
|
||||
</header>
|
||||
|
||||
<section class="modal-card-body">
|
||||
<p class="block">
|
||||
If you like we can remove all DataSync settings from the DB.
|
||||
</p>
|
||||
<p class="block">
|
||||
Note that this tool normally removes all settings first,
|
||||
every time you click "Save Settings". Here though you
|
||||
can "just remove" and <span class="is-italic">not</span>
|
||||
save the current settings.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<footer class="modal-card-foot">
|
||||
<b-button @click="purgeSettingsShowDialog = false">
|
||||
Cancel
|
||||
</b-button>
|
||||
${h.form(request.current_route_url())}
|
||||
${h.csrf_token(request)}
|
||||
${h.hidden('purge_settings', 'true')}
|
||||
<b-button type="is-danger"
|
||||
native-type="submit"
|
||||
:disabled="purgingSettings"
|
||||
icon-pack="fas"
|
||||
icon-left="trash"
|
||||
@click="purgingSettings = true">
|
||||
{{ purgingSettings ? "Working, please wait..." : "Remove All Settings" }}
|
||||
</b-button>
|
||||
${h.end_form()}
|
||||
</footer>
|
||||
</div>
|
||||
</b-modal>
|
||||
|
||||
<b-notification type="is-warning"
|
||||
:active.sync="showConfigFilesNote">
|
||||
## TODO: should link to some ratman page here, yes?
|
||||
|
@ -448,6 +496,9 @@
|
|||
|
||||
ThisPageData.restartCommand = ${json.dumps(restart_command)|n}
|
||||
|
||||
ThisPageData.purgeSettingsShowDialog = false
|
||||
ThisPageData.purgingSettings = false
|
||||
|
||||
ThisPageData.settingsNeedSaved = false
|
||||
ThisPageData.undoChanges = false
|
||||
ThisPageData.savingSettings = false
|
||||
|
@ -692,6 +743,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
ThisPage.methods.purgeSettingsInit = function() {
|
||||
this.purgeSettingsShowDialog = true
|
||||
}
|
||||
|
||||
ThisPage.methods.saveSettings = function() {
|
||||
this.savingSettings = true
|
||||
let url = ${json.dumps(request.current_route_url())|n}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue