Expose some settings for Trainwreck DB rotation
This commit is contained in:
parent
d21826c70d
commit
9f763b46eb
|
@ -3,13 +3,44 @@
|
||||||
|
|
||||||
<%def name="form_content()">
|
<%def name="form_content()">
|
||||||
|
|
||||||
|
<h3 class="block is-size-3">Rotation</h3>
|
||||||
|
<div class="block" style="padding-left: 2rem;">
|
||||||
|
|
||||||
|
<b-field message="There is only one Trainwreck DB, unless rotation is used.">
|
||||||
|
<b-checkbox name="trainwreck.use_rotation"
|
||||||
|
v-model="simpleSettings['trainwreck.use_rotation']"
|
||||||
|
native-value="true"
|
||||||
|
@input="settingsNeedSaved = true">
|
||||||
|
Rotate Databases
|
||||||
|
</b-checkbox>
|
||||||
|
</b-field>
|
||||||
|
|
||||||
|
<b-field grouped>
|
||||||
|
<b-field label="Current Years"
|
||||||
|
message="How many years (max) to keep in "current" DB. Default is 2 if not set.">
|
||||||
|
<b-input name="trainwreck.current_years"
|
||||||
|
v-model="simpleSettings['trainwreck.current_years']"
|
||||||
|
@input="settingsNeedSaved = true">
|
||||||
|
</b-input>
|
||||||
|
</b-field>
|
||||||
|
</b-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3 class="block is-size-3">Hidden Databases</h3>
|
<h3 class="block is-size-3">Hidden Databases</h3>
|
||||||
<div class="block" style="padding-left: 2rem;">
|
<div class="block" style="padding-left: 2rem;">
|
||||||
|
<p class="block">
|
||||||
|
The selected DBs will be hidden from the DB picker when viewing
|
||||||
|
Trainwreck data.
|
||||||
|
</p>
|
||||||
% for key, engine in six.iteritems(trainwreck_engines):
|
% for key, engine in six.iteritems(trainwreck_engines):
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-checkbox name="hidedb_${key}"
|
<b-checkbox name="hidedb_${key}"
|
||||||
v-model="hiddenDatabases['${key}']"
|
v-model="hiddenDatabases['${key}']"
|
||||||
native-value="true"
|
native-value="true"
|
||||||
|
% if key == 'default':
|
||||||
|
disabled
|
||||||
|
% endif
|
||||||
@input="settingsNeedSaved = true">
|
@input="settingsNeedSaved = true">
|
||||||
${key}
|
${key}
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
|
|
|
@ -384,6 +384,19 @@ class TransactionView(MasterView):
|
||||||
'engines_data': engines_data,
|
'engines_data': engines_data,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def configure_get_simple_settings(self):
|
||||||
|
return [
|
||||||
|
|
||||||
|
# rotation
|
||||||
|
{'section': 'trainwreck',
|
||||||
|
'option': 'use_rotation',
|
||||||
|
'type': bool},
|
||||||
|
{'section': 'trainwreck',
|
||||||
|
'option': 'current_years',
|
||||||
|
'type': int},
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
def configure_get_context(self):
|
def configure_get_context(self):
|
||||||
context = super(TransactionView, self).configure_get_context()
|
context = super(TransactionView, self).configure_get_context()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue