Sunil Mohan Adapa 9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00

20 lines
558 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Views for the Cockpit module
"""
from plinth.modules.cockpit.utils import get_origin_domains, load_augeas
from plinth.views import AppView
class CockpitAppView(AppView):
app_id = 'cockpit'
show_status_block = True
template_name = 'cockpit.html'
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(**kwargs)
urls = get_origin_domains(load_augeas())
context['urls'] = [url for url in urls if 'localhost' not in url]
return context