datetime: Disable diagnostics when no tests are available

Closes: #1846

Tests:

- When systemd-timesyncd is running, 'Run Diagnostics' button is shown and two
diagnostics results are shown. The two results appears on the diagnostics app
results too.

- When systemd-timesyncd is not running, 'Run Diagnostics' button is not shown.
Datetime app is not included the diagnostics app page results.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-05-04 16:24:51 -07:00 committed by James Valleroy
parent 1b6c2e60c0
commit b1fd0c93dc
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -87,6 +87,10 @@ class DateTimeApp(app_module.App):
return results
def has_diagnostics(self):
"""Return that app has diagnostics only when time is managed."""
return self._is_time_managed()
def init():
"""Initialize the date/time module."""