Beispiel #1
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path=path, session=session)
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController())
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		if os.path.exists(getPublicPath('themes')):
			self.putChild("themes", static.File(getPublicPath() + "/themes"))
		if os.path.exists(getPublicPath('webtv')):
			self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
		if os.path.exists(getPublicPath('vxg')):
			self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
		if os.path.exists('/usr/bin/shellinaboxd'):
			self.putChild("terminal", proxy.ReverseProxyResource('::1', 4200, '/'))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController())
		self.putChild("wol", WOLClientController())
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
Beispiel #2
0
 def __init__(self, session, path=""):
     BaseController.__init__(self, path)
     self.session = session
     self.putChild("web", BQEWebController(session))
     self.putChild("api", BQEApiController(session))
     self.putChild('tmp', static.File('/tmp'))
     self.putChild('uploadrestore', BQEUploadFile(session))
	def __init__(self, session, path=""):
		BaseController.__init__(self, path=path, session=session)

		self.putChild("web", WebController(session))
		self.putGZChild("api", ApiController(session))
		self.putGZChild("ajax", AjaxController(session))
		self.putChild("file", FileController())
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		for static_val in ('js', 'css', 'static', 'images', 'fonts'):
			self.putChild(static_val, static.File(getPublicPath() + '/' + static_val))
		for static_val in ('themes', 'webtv', 'vxg'):
			if os.path.exists(getPublicPath(static_val)):
				self.putChild(static_val, static.File(getPublicPath() + '/' + static_val))

		if os.path.exists('/usr/bin/shellinaboxd'):
			self.putChild("terminal", proxy.ReverseProxyResource('::1', 4200, '/'))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController())
		self.putChild("wol", WOLClientController())
		self.putChild("wolsetup", WOLSetupController(session))
		if PICON_PATH:
			self.putChild("picon", static.File(PICON_PATH))
		try:
			from NET import NetController
			self.putChild("net", NetController(session))
		except:
			pass
Beispiel #4
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		self.putChild("web", BQEWebController(session))
		self.putChild("api", BQEApiController(session))
		self.putChild('tmp', static.File('/tmp'))
		self.putChild('uploadrestore', BQEUploadFile(session))
Beispiel #5
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("rc", static.File("/usr/share/enigma2/rc_models"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		if os.path.exists(getPublicPath('themes')):
			self.putChild("themes", static.File(getPublicPath() + "/themes"))
		if os.path.exists(getPublicPath('webtv')):
			self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
		if os.path.exists(getPublicPath('vxg')):
			self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController(session))
		self.putChild("wol", WOLClientController(session))
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
Beispiel #6
0
    def __init__(self, session, path=""):
        BaseController.__init__(self, path)
        self.session = session
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController(session))
        self.putChild("grab", grabScreenshot(session))
        self.putChild("mobile", MobileController(session))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("static", static.File(getPublicPath() + "/static"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController(session))
        self.putChild("wol", WOLClientController(session))
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
Beispiel #7
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		self.putChild("mobile", MobileController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController(session))
		self.putChild("wol", WOLClientController(session))
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
Beispiel #8
0
	def __init__(self, session, path=""):
		BaseController.__init__(self, path=path, session=session)

		self.putChild("web", WebController(session))
		self.putGZChild("api", ApiController(session))
		self.putGZChild("ajax", AjaxController(session))
		self.putChild("file", FileController())
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		for static_val in ('js', 'css', 'static', 'images', 'fonts'):
			self.putChild(static_val, static.File(getPublicPath() + '/' + static_val))
		for static_val in ('themes', 'webtv', 'vxg'):
			if os.path.exists(getPublicPath(static_val)):
				self.putChild(static_val, static.File(getPublicPath() + '/' + static_val))

		if os.path.exists('/usr/bin/shellinaboxd'):
			self.putChild("terminal", proxy.ReverseProxyResource('::1', 4200, '/'))
		self.putGZChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController())
		self.putChild("wol", WOLClientController())
		self.putChild("wolsetup", WOLSetupController(session))
		if PICON_PATH:
			self.putChild("picon", static.File(PICON_PATH))
		try:
			from NET import NetController
			self.putChild("net", NetController(session))
		except:
			pass
Beispiel #9
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		self.controller = None

		self.putChild("control", WebController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("api", ApiController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
Beispiel #10
0
    def __init__(self, session, path=""):
        BaseController.__init__(self, path)
        self.session = session
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController(session))
        self.putChild("grab", grabScreenshot(session))
        self.putChild("mobile", MobileController(session))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
Beispiel #11
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()
		
		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		self.putChild("mobile", MobileController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
    def __init__(self, session, path=""):
        BaseController.__init__(self, path=path, session=session)
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))

        encoder_factory = rest_fs_access.GzipEncodeByFileExtensionFactory(
            extensions=[
                'txt', 'json', 'html', 'xml', 'js', 'conf', 'cfg', 'eit', 'sc',
                'ap'
            ])
        #: gzip compression enabled file controller
        wrapped_fs_controller = EncodingResourceWrapper(
            rest_fs_access.FileController(root='/',
                                          resource_prefix="/file",
                                          session=session), [encoder_factory])
        self.putChild("file", wrapped_fs_controller)
        self.putChild("grab", grabScreenshot(session))
        if os.path.exists(getPublicPath('mobile')):
            self.putChild("mobile", MobileController(session))
            self.putChild("m", static.File(getPublicPath() + "/mobile"))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("static", static.File(getPublicPath() + "/static"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
        if os.path.exists(getPublicPath('themes')):
            self.putChild("themes", static.File(getPublicPath() + "/themes"))
        if os.path.exists(getPublicPath('webtv')):
            self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
        if os.path.exists(getPublicPath('vxg')):
            self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
        if os.path.exists('/usr/bin/shellinaboxd'):
            self.putChild("terminal",
                          proxy.ReverseProxyResource('::1', 4200, '/'))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController())
        self.putChild("wol", WOLClientController())
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
    def __init__(self, session, path=""):
        BaseController.__init__(self, path=path, session=session)

        self.putChild("web", WebController(session))
        api_controller_instance = EncodingResourceWrapper(
            rest_api_controller.ApiController(session, resource_prefix='/api'),
            [GzipEncoderFactory()])
        self.putChild("api", api_controller_instance)

        recordings_controller_instance = EncodingResourceWrapper(
            rest_recordings_controller.RESTRecordingsController(),
            [GzipEncoderFactory()])
        self.putChild(RECORDINGS_ENDPOINT_PATH, recordings_controller_instance)
        self.putChild(RECORDING_ENDPOINT_PATH,
                      static.File(RECORDINGS_ROOT_PATH))

        timer_controller_instance = EncodingResourceWrapper(
            rest_timer_controller.RESTTimerController(session=session),
            [GzipEncoderFactory()])
        self.putChild("timers", timer_controller_instance)

        services_controller_instance = EncodingResourceWrapper(
            rest_services_controller.RESTServicesController(),
            [GzipEncoderFactory()])
        self.putChild("services", services_controller_instance)

        event_controller_instance = EncodingResourceWrapper(
            rest_current_event_controller.RESTCurrentEventController(
                session=session), [GzipEncoderFactory()])
        self.putChild("current_event", event_controller_instance)

        self.putChild("file", fs_access.RestrictedFilesystemAccessController())
        self.putChild("grab", grabScreenshot(session))

        if TOW_FRONTEND:
            self.putChild("ajax", AjaxController(session))
            self.putChild('favicon.ico', static.File(FAVICON_PATH))
            self.putChild('favicon.png', static.File(FAVICON_PATH))

        for shortcut in ('js', 'css', 'static', 'images', 'fonts'):
            self.putChild(shortcut,
                          static.File('/'.join((PUBLIC_PATH, shortcut))))

        self.putChild("transcoding", TranscodingController())
        if PICON_PATH:
            self.putChild("picon", static.File(PICON_PATH))
    def __init__(self, session, path=""):
        BaseController.__init__(self, path=path, session=session)
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController())
        self.putChild("grab", grabScreenshot(session))
        if os.path.exists(getPublicPath('mobile')):
            self.putChild("mobile", MobileController(session))
            self.putChild("m", static.File(getPublicPath() + "/mobile"))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("static", static.File(getPublicPath() + "/static"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
        if os.path.exists(getPublicPath('themes')):
            self.putChild("themes", static.File(getPublicPath() + "/themes"))
        if os.path.exists(getPublicPath('webtv')):
            self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
        if os.path.exists(getPublicPath('vxg')):
            self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
        if os.path.exists('/usr/bin/shellinaboxd'):
            self.putChild("terminal",
                          proxy.ReverseProxyResource('::1', 4200, '/'))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController())
        self.putChild("wol", WOLClientController())
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
Beispiel #15
0
 def __init__(self, session, path=""):
     BaseController.__init__(self, path)
     self.session = session
     self.putChild('upload', IPKGUpload(session))
Beispiel #16
0
 def __init__(self, session, path=""):
     BaseController.__init__(self, path)
     self.session = session
     self.putChild("stream", StreamController(session))
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		self.putChild("web", BQEWebController(session))
		self.putChild("api", BQEApiController(session))
Beispiel #18
0
 def __init__(self, session, path=""):
     BaseController.__init__(self,
                             path=path,
                             session=session,
                             isMobile=True)
Beispiel #19
0
 def __getattribute__(self, name):
     if name in ["get", "post"] and not self.isUserAdmin():
         self.renderError(403)
         def pass_through(*args, **kwargs): pass
         return pass_through
     return BaseController.__getattribute__(self, name)
	def __init__(self, session, path=""):
		BaseController.__init__(self, path=path, session=session)
		self.putChild('upload', IPKGUpload(self.session))
Beispiel #21
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path=path, session=session, isMobile=True)
Beispiel #22
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.isMobile = True
		self.session = session
Beispiel #23
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		self.putChild("stream", StreamController(session))
Beispiel #25
0
 def __init__(self, session, path=""):
     BaseController.__init__(self, path)
     self.session = session
     self.putChild("web", BQEWebController(session))
     self.putChild("api", BQEApiController(session))