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"> <script type="text/javascript">
$(function() { $(function() {
$('#restart-client').click(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)}'; location.href = '${url('tempmon.clients.restart', uuid=instance.uuid)}';
}); });
}); });

View file

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

View file

@ -79,8 +79,8 @@ class TempmonProbeView(MasterView):
] ]
row_grid_columns = [ row_grid_columns = [
'taken',
'degrees_f', 'degrees_f',
'taken',
] ]
def configure_grid(self, g): def configure_grid(self, g):
@ -124,6 +124,12 @@ class TempmonProbeView(MasterView):
# appliance_type # appliance_type
f.set_enum('appliance_type', self.enum.TEMPMON_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 # notes
f.set_type('notes', 'text') f.set_type('notes', 'text')