diff --git a/tailbone/views/tempmon/clients.py b/tailbone/views/tempmon/clients.py index 22db63df..92d8f062 100644 --- a/tailbone/views/tempmon/clients.py +++ b/tailbone/views/tempmon/clients.py @@ -64,6 +64,7 @@ class TempmonClientView(MasterView): Master view for tempmon clients. """ model_class = tempmon.Client + model_title = "TempMon Client" route_prefix = 'tempmon.clients' url_prefix = '/tempmon/clients' @@ -107,7 +108,7 @@ class TempmonClientView(MasterView): def restart(self): client = self.get_instance() try: - subprocess.check_output(['ssh', client.hostname, 'sudo service tempmon restart'], + subprocess.check_output(['ssh', client.hostname, 'sudo service tempmon-client restart'], stderr=subprocess.STDOUT) except subprocess.CalledProcessError as error: self.request.session.flash("Failed to restart client: {}".format(error.output), 'error') diff --git a/tailbone/views/tempmon/probes.py b/tailbone/views/tempmon/probes.py index 529e76eb..aed366da 100644 --- a/tailbone/views/tempmon/probes.py +++ b/tailbone/views/tempmon/probes.py @@ -37,6 +37,7 @@ class TempmonProbeView(MasterView): Master view for tempmon probes. """ model_class = tempmon.Probe + model_title = "TempMon Probe" route_prefix = 'tempmon.probes' url_prefix = '/tempmon/probes' diff --git a/tailbone/views/tempmon/readings.py b/tailbone/views/tempmon/readings.py index 9f0c76dc..db3f5600 100644 --- a/tailbone/views/tempmon/readings.py +++ b/tailbone/views/tempmon/readings.py @@ -36,11 +36,16 @@ class TempmonReadingView(MasterView): Master view for tempmon readings. """ model_class = tempmon.Reading + model_title = "TempMon Reading" route_prefix = 'tempmon.readings' url_prefix = '/tempmon/readings' creatable = False editable = False + def _preconfigure_grid(self, g): + g.default_sortkey = 'taken' + g.default_sortdir = 'desc' + def configure_grid(self, g): g.configure( include=[