Add proper status page for datasync
or rather, it's a good start.. plenty more could be added
This commit is contained in:
parent
839c4e0c28
commit
065f845707
6 changed files with 361 additions and 113 deletions
|
@ -53,29 +53,30 @@
|
|||
<p class="block">
|
||||
This tool works by modifying settings in the DB. It
|
||||
does <span class="is-italic">not</span> modify any config
|
||||
files. If you intend to manage datasync config via files
|
||||
only then you should
|
||||
<span class="is-italic">not</span> use this tool!
|
||||
files. If you intend to manage datasync watcher/consumer
|
||||
config via files only then you should be sure to UNCHECK the
|
||||
"Use these Settings.." checkbox near the top of page.
|
||||
</p>
|
||||
<p class="block">
|
||||
If you have managed config via files thus far, and want to use
|
||||
this tool anyway/instead, that's fine - but after saving
|
||||
the settings via this tool you should probably remove all
|
||||
If you have managed config via files thus far, and want to
|
||||
start using this tool to manage via DB settings instead,
|
||||
that's fine - but after saving the settings via this tool
|
||||
you should probably remove all
|
||||
<span class="is-family-code">[rattail.datasync]</span> entries
|
||||
from your config file (and restart apps) so as to avoid
|
||||
confusion.
|
||||
</p>
|
||||
<p class="block">
|
||||
Finally, you should know that this tool will
|
||||
<span class="is-italic">overwrite</span> the entire
|
||||
<span class="is-family-code">rattail.datasync</span> namespace
|
||||
within the DB settings. In other words if you have
|
||||
manually created any ${h.link_to("Raw Settings", url('settings'))}
|
||||
within that namepsace, they will be lost when you save settings
|
||||
with this tool.
|
||||
</p>
|
||||
</b-notification>
|
||||
|
||||
<b-field>
|
||||
<b-checkbox name="use_profile_settings"
|
||||
v-model="useProfileSettings"
|
||||
native-value="true"
|
||||
@input="settingsNeedSaved = true">
|
||||
Use these Settings to configure watchers and consumers
|
||||
</b-checkbox>
|
||||
</b-field>
|
||||
|
||||
<div class="level">
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
|
@ -83,7 +84,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<div class="level-item">
|
||||
<div class="level-item"
|
||||
v-show="useProfileSettings">
|
||||
<b-button type="is-primary"
|
||||
@click="newProfile()"
|
||||
icon-pack="fas"
|
||||
|
@ -130,7 +132,8 @@
|
|||
<b-table-column field="enabled" label="Enabled">
|
||||
{{ props.row.enabled ? "Yes" : "No" }}
|
||||
</b-table-column>
|
||||
<b-table-column label="Actions">
|
||||
<b-table-column label="Actions"
|
||||
v-if="useProfileSettings">
|
||||
<a href="#"
|
||||
class="grid-action"
|
||||
@click.prevent="editProfile(props.row)">
|
||||
|
@ -397,15 +400,22 @@
|
|||
|
||||
<h3 class="is-size-3">Misc.</h3>
|
||||
|
||||
<b-field grouped>
|
||||
<b-field label="Restart Command"
|
||||
message="This will run as '${system_user}' system user - please configure sudoers as needed. Typical command is like: sudo supervisorctl restart poser:poser_datasync"
|
||||
expanded>
|
||||
<b-input name="restart_command"
|
||||
v-model="restartCommand"
|
||||
@input="settingsNeedSaved = true">
|
||||
</b-input>
|
||||
</b-field>
|
||||
<b-field label="Supervisor Process Name"
|
||||
message="This should be the complete name, including group - e.g. poser:poser_datasync"
|
||||
expanded>
|
||||
<b-input name="supervisor_process_name"
|
||||
v-model="supervisorProcessName"
|
||||
@input="settingsNeedSaved = true">
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Restart Command"
|
||||
message="This will run as '${system_user}' system user - please configure sudoers as needed. Typical command is like: sudo supervisorctl restart poser:poser_datasync"
|
||||
expanded>
|
||||
<b-input name="restart_command"
|
||||
v-model="restartCommand"
|
||||
@input="settingsNeedSaved = true">
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
</%def>
|
||||
|
@ -417,6 +427,7 @@
|
|||
ThisPageData.showConfigFilesNote = false
|
||||
ThisPageData.profilesData = ${json.dumps(profiles_data)|n}
|
||||
ThisPageData.showDisabledProfiles = false
|
||||
ThisPageData.useProfileSettings = ${json.dumps(use_profile_settings)|n}
|
||||
|
||||
ThisPageData.editProfileShowDialog = false
|
||||
ThisPageData.editingProfile = null
|
||||
|
@ -441,6 +452,7 @@
|
|||
ThisPageData.editingConsumerRunas = null
|
||||
ThisPageData.editingConsumerEnabled = true
|
||||
|
||||
ThisPageData.supervisorProcessName = ${json.dumps(supervisor_process_name)|n}
|
||||
ThisPageData.restartCommand = ${json.dumps(restart_command)|n}
|
||||
|
||||
ThisPage.computed.filteredProfilesData = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue