Move PageKite to separate module and present in Apps

- Remove Router section
This commit is contained in:
Sunil Mohan Adapa 2014-06-01 13:24:28 +05:30
parent 034745e91f
commit f0e710a3d8
8 changed files with 7 additions and 59 deletions

View File

@ -1 +0,0 @@
installed/router/info.py

View File

@ -38,10 +38,10 @@ class PageKite(PagePlugin):
def __init__(self, *args, **kwargs):
PagePlugin.__init__(self, *args, **kwargs)
self.register_page("router.pagekite")
cfg.html_root.router.menu.add_item(
self.register_page("apps.pagekite")
cfg.html_root.apps.menu.add_item(
_("Public Visibility (PageKite)"), "icon-flag",
"/router/pagekite", 50)
"/apps/pagekite", 50)
@staticmethod
@cherrypy.expose
@ -51,7 +51,7 @@ class PageKite(PagePlugin):
del kwargs # Unused
menu = {'title': _('PageKite'),
'items': [{'url': '/router/pagekite/configure',
'items': [{'url': '/apps/pagekite/configure',
'text': _('Configure PageKite')}]}
sidebar_right = util.render_template(template='menu_block', menu=menu)
@ -112,7 +112,7 @@ class Configure(PagePlugin): # pylint: disable-msg=C0103
def __init__(self, *args, **kwargs):
PagePlugin.__init__(self, *args, **kwargs)
self.register_page("router.pagekite.configure")
self.register_page("apps.pagekite.configure")
@cherrypy.expose
@require()

View File

@ -49,7 +49,7 @@ there. In future, it might be possible to use your buddy's
<p>
<a class='btn btn-primary btn-lg'
href="{{ basehref }}/router/setup/pagekite/configure">Configure
href="{{ basehref }}/apps/pagekite/configure">Configure
PageKite</a>
</p>

View File

@ -1,21 +0,0 @@
import cherrypy
from plugin_mount import PagePlugin
from modules.auth import require
import util
class Info(PagePlugin):
title = 'Info'
order = 10
url = 'info'
def __init__(self, *args, **kwargs):
self.register_page("router.info")
@cherrypy.expose
@require()
def index(self):
return util.render_template(title="Router Information", main="""
<p>Eventually we will display a bunch of info, graphs and logs about
the routing functions here.</p>
""")

View File

@ -1,29 +0,0 @@
import cherrypy
from django import forms
from gettext import gettext as _
from plugin_mount import PagePlugin
from modules.auth import require
import cfg
import util
class Router(PagePlugin):
"""Router page"""
order = 9 # order of running init in PagePlugins
def __init__(self, *args, **kwargs):
PagePlugin.__init__(self, args, kwargs)
self.register_page('router')
self.menu = cfg.main_menu.add_item('Router', 'icon-retweet', '/router',
10)
@staticmethod
@cherrypy.expose
def index():
"""This isn't an internal redirect, because we need the url to
reflect that we've moved down into the submenu hierarchy.
Otherwise, it's hard to know which menu portion to make active
or expand or contract."""
raise cherrypy.HTTPRedirect(cfg.server_dir + '/router/pagekite')

View File

@ -1 +1 @@
installed/router/pagekite.py
installed/pagekite/pagekite.py

View File

@ -1 +0,0 @@
installed/router/router.py