mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
views: Don't require sending diagnostics module name separately
- Reuse the app_id already available to the view. - Implement automatically detecting if an app has implemented diagnostics. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
636aa05b66
commit
f65b4ec407
36 files changed
+12
-39
No files matched your search
@@ -52,6 +52,7 @@ def index(request):
|
||||
|
||||
return TemplateResponse(
|
||||
request, 'tor.html', {
|
||||
'app_id': 'tor',
|
||||
'name': tor.name,
|
||||
'description': tor.description,
|
||||
'clients': tor.clients,
|
||||
@@ -60,7 +61,7 @@ def index(request):
|
||||
'config_running': bool(config_process),
|
||||
'form': form,
|
||||
'firewall': tor.app.get_components_of_type(Firewall),
|
||||
'diagnostics_module_name': 'tor',
|
||||
'has_diagnostics': True,
|
||||
'is_enabled': status['enabled'],
|
||||
'show_status_block': True,
|
||||
'is_running': status['is_running'],
|
||||
|
||||
Reference in new issue
Block a user