mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
Move XMPP to separate module and present under Apps
- Remove Services section
This commit is contained in:
parent
7c878ba1b4
commit
11a3cecf0a
@ -1,17 +0,0 @@
|
|||||||
import cherrypy
|
|
||||||
from modules.auth import require
|
|
||||||
from plugin_mount import PagePlugin
|
|
||||||
import cfg
|
|
||||||
import util
|
|
||||||
|
|
||||||
|
|
||||||
class Services(PagePlugin):
|
|
||||||
order = 9 # order of running init in PagePlugins
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
PagePlugin.__init__(self, *args, **kwargs)
|
|
||||||
self.register_page("services")
|
|
||||||
self.menu = cfg.main_menu.add_item("Services", "icon-list", "/services", 90)
|
|
||||||
|
|
||||||
@cherrypy.expose
|
|
||||||
def index(self):
|
|
||||||
raise cherrypy.HTTPRedirect(cfg.server_dir + '/services/xmpp')
|
|
||||||
@ -10,19 +10,21 @@ import util
|
|||||||
|
|
||||||
|
|
||||||
SIDE_MENU = {'title': _('XMPP'),
|
SIDE_MENU = {'title': _('XMPP'),
|
||||||
'items': [{'url': '/services/xmpp/configure',
|
'items': [{'url': '/apps/xmpp/configure',
|
||||||
'text': 'Configure XMPP Server'},
|
'text': 'Configure XMPP Server'},
|
||||||
{'url': '/services/xmpp/register',
|
{'url': '/apps/xmpp/register',
|
||||||
'text': 'Register XMPP Account'}]}
|
'text': 'Register XMPP Account'}]}
|
||||||
|
|
||||||
|
|
||||||
class XMPP(PagePlugin):
|
class XMPP(PagePlugin):
|
||||||
"""XMPP Page"""
|
"""XMPP Page"""
|
||||||
|
order = 60
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
PagePlugin.__init__(self, *args, **kwargs)
|
PagePlugin.__init__(self, *args, **kwargs)
|
||||||
self.register_page('services.xmpp')
|
self.register_page('apps.xmpp')
|
||||||
cfg.html_root.services.menu.add_item('XMPP', 'icon-comment',
|
cfg.html_root.apps.menu.add_item('XMPP', 'icon-comment',
|
||||||
'/services/xmpp', 40)
|
'/apps/xmpp', 40)
|
||||||
|
|
||||||
self.client_service = service.Service(
|
self.client_service = service.Service(
|
||||||
'xmpp-client', _('Chat Server - client connections'),
|
'xmpp-client', _('Chat Server - client connections'),
|
||||||
@ -62,10 +64,11 @@ allowed to register an account through an XMPP client'))
|
|||||||
|
|
||||||
class Configure(PagePlugin):
|
class Configure(PagePlugin):
|
||||||
"""Configuration page"""
|
"""Configuration page"""
|
||||||
|
order = 65
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
PagePlugin.__init__(self, *args, **kwargs)
|
PagePlugin.__init__(self, *args, **kwargs)
|
||||||
self.register_page("services.xmpp.configure")
|
self.register_page("apps.xmpp.configure")
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
@ -143,10 +146,11 @@ class RegisterForm(forms.Form): # pylint: disable-msg=W0232
|
|||||||
|
|
||||||
class Register(PagePlugin):
|
class Register(PagePlugin):
|
||||||
"""User registration page"""
|
"""User registration page"""
|
||||||
|
order = 65
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
PagePlugin.__init__(self, *args, **kwargs)
|
PagePlugin.__init__(self, *args, **kwargs)
|
||||||
self.register_page('services.xmpp.register')
|
self.register_page('apps.xmpp.register')
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
@ -1 +0,0 @@
|
|||||||
installed/services/services.py
|
|
||||||
@ -1 +1 @@
|
|||||||
installed/services/xmpp.py
|
installed/xmpp/xmpp.py
|
||||||
Loading…
x
Reference in New Issue
Block a user