Add some helptext for various tempmon fields

This commit is contained in:
Lance Edgar 2018-10-06 17:41:33 -05:00
parent f17d7355e0
commit e05a58bdee
3 changed files with 17 additions and 3 deletions

View file

@ -6,7 +6,7 @@
<script type="text/javascript">
$(function() {
$('#restart-client').click(function() {
$(this).button('disable').button('option', 'label', "Restarting, please wait...");
disable_button(this);
location.href = '${url('tempmon.clients.restart', uuid=instance.uuid)}';
});
});

View file

@ -77,8 +77,8 @@ class TempmonClientView(MasterView):
row_grid_columns = [
'probe',
'taken',
'degrees_f',
'taken',
]
def configure_grid(self, g):
@ -128,9 +128,17 @@ class TempmonClientView(MasterView):
# notes
f.set_type('notes', 'text')
# enabled
f.set_helptext('enabled', tempmon.Client.enabled.__doc__)
# online
if self.creating or self.editing:
f.remove_field('online')
else:
f.set_helptext('online', tempmon.Client.online.__doc__)
# archived
f.set_helptext('archived', tempmon.Client.archived.__doc__)
def unique_config_key(self, node, value):
query = self.Session.query(tempmon.Client)\

View file

@ -79,8 +79,8 @@ class TempmonProbeView(MasterView):
]
row_grid_columns = [
'taken',
'degrees_f',
'taken',
]
def configure_grid(self, g):
@ -124,6 +124,12 @@ class TempmonProbeView(MasterView):
# appliance_type
f.set_enum('appliance_type', self.enum.TEMPMON_APPLIANCE_TYPE)
# therm_status_timeout
f.set_helptext('therm_status_timeout', tempmon.Probe.therm_status_timeout.__doc__)
# status_alert_timeout
f.set_helptext('status_alert_timeout', tempmon.Probe.status_alert_timeout.__doc__)
# notes
f.set_type('notes', 'text')