Add common configuration logic for "input file templates"

just used in one batch so far but should be useful for many more..once
can get around to migrating them

had to rework the configuration logic to use HTML form instead of
JSON, to allow for the file uploads
This commit is contained in:
Lance Edgar 2021-12-17 19:22:48 -06:00
parent 099b6915f4
commit 30f95e2f08
13 changed files with 405 additions and 95 deletions

View file

@ -44,8 +44,8 @@
</div>
</%def>
<%def name="page_content()">
${parent.page_content()}
<%def name="form_content()">
${h.hidden('profiles', **{':value': 'JSON.stringify(profilesData)'})}
<b-notification type="is-warning"
:active.sync="showConfigFilesNote">
@ -401,7 +401,8 @@
<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 v-model="restartCommand"
<b-input name="restart_command"
v-model="restartCommand"
@input="settingsNeedSaved = true">
</b-input>
</b-field>
@ -675,13 +676,6 @@
}
}
ThisPage.methods.settingsCollectParams = function() {
return {
profiles: this.profilesData,
restart_command: this.restartCommand,
}
}
% if request.has_perm('datasync.restart'):
ThisPageData.restartingDatasync = false
ThisPageData.restartDatasyncFormButtonText = "Restart Datasync"