Veiko Aasa 995af05866
apps: Do not show status block if service is running
If at least one related service/daemon is not running, show the alert if app
is enabled, otherwise set alert as hidden (for functional tests).

Closes #1752

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Minor code simplification in app template, status section]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-03-05 12:28:14 -08:00

27 lines
690 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Views for the JSXC module
"""
from django.views.generic import TemplateView
from plinth.modules import config
from plinth.views import AppView
class JSXCAppView(AppView):
"""Show ejabberd as an app."""
app_id = 'jsxc'
template_name = 'jsxc.html'
class JsxcView(TemplateView):
"""A simple page to embed Javascript XMPP Client library."""
template_name = 'jsxc_launch.html'
def get_context_data(self, *args, **kwargs):
"""Add domain information to view context."""
context = super().get_context_data(*args, **kwargs)
context['domainname'] = config.get_domainname()
return context