From: Michael Tremer Date: Wed, 22 Jan 2025 14:00:25 +0000 (+0000) Subject: web: Drop importing the removed ui_modules module X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7b7b0db43f46cadaedd644c18645072b9808ef3;p=pbs.git web: Drop importing the removed ui_modules module Signed-off-by: Michael Tremer --- diff --git a/src/web/__init__.py b/src/web/__init__.py index 4fb3368b..8eeae350 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -35,14 +35,6 @@ class Application(tornado.web.Application): login_url = "/login", template_path = TEMPLATESDIR, static_path = STATICDIR, - - ui_modules = { - # Jobs - "JobsLogStream" : jobs.LogStreamModule, - - # Users - "UserPushSubscribeButton" : users.PushSubscribeButton, - }, ui_methods = { "group" : self.group, "make_url" : self.make_url, diff --git a/src/web/builders.py b/src/web/builders.py index 25d9b6c1..efda1958 100644 --- a/src/web/builders.py +++ b/src/web/builders.py @@ -4,7 +4,6 @@ import logging import tornado.web from . import base -from . import ui_modules # Setup logging log = logging.getLogger("pbs.web.builders") diff --git a/src/web/builds.py b/src/web/builds.py index baf95bfa..8cd0db13 100644 --- a/src/web/builds.py +++ b/src/web/builds.py @@ -7,7 +7,6 @@ from ..errors import NoSuchDistroError from .. import misc from . import base -from . import ui_modules class APIv1IndexHandler(base.APIMixin, base.BaseHandler): # Allow users to create builds diff --git a/src/web/distributions.py b/src/web/distributions.py index d7c0edca..7ef4e63f 100644 --- a/src/web/distributions.py +++ b/src/web/distributions.py @@ -4,7 +4,6 @@ import asyncio import tornado.web from . import base -from . import ui_modules class IndexHandler(base.BaseHandler): async def get(self): diff --git a/src/web/jobs.py b/src/web/jobs.py index 1ed02b91..c851a25d 100644 --- a/src/web/jobs.py +++ b/src/web/jobs.py @@ -6,7 +6,6 @@ import tornado.websocket from .. import misc from . import base -from . import ui_modules # Setup logging log = logging.getLogger("pbs.web.jobs") @@ -250,12 +249,12 @@ class RetryHandler(base.BaseHandler): self.redirect("/builds/%s" % job.build.uuid) -class LogStreamModule(ui_modules.UIModule): - def render(self, job, limit=None, small=False): - return self.render_string("jobs/modules/log-stream.html", - job=job, limit=limit, small=small) - - def javascript_files(self): - return [ - "js/job-log-stream.min.js", - ] +#class LogStreamModule(ui_modules.UIModule): +# def render(self, job, limit=None, small=False): +# return self.render_string("jobs/modules/log-stream.html", +# job=job, limit=limit, small=small) +# +# def javascript_files(self): +# return [ +# "js/job-log-stream.min.js", +# ] diff --git a/src/web/mirrors.py b/src/web/mirrors.py index 1e377397..4b15c300 100644 --- a/src/web/mirrors.py +++ b/src/web/mirrors.py @@ -3,7 +3,6 @@ import tornado.web from . import base -from . import ui_modules class IndexHandler(base.BaseHandler): async def get(self): diff --git a/src/web/monitorings.py b/src/web/monitorings.py index eb0ea3ad..4bbdc358 100644 --- a/src/web/monitorings.py +++ b/src/web/monitorings.py @@ -21,7 +21,6 @@ import tornado.web from . import base -from . import ui_modules class ShowHandler(base.BaseHandler): async def get(self, slug, name): diff --git a/src/web/packages.py b/src/web/packages.py index b4be53da..f69f0cff 100644 --- a/src/web/packages.py +++ b/src/web/packages.py @@ -7,7 +7,6 @@ import tornado.web from .. import misc from . import base -from . import ui_modules class IndexHandler(base.BaseHandler): async def get(self): diff --git a/src/web/repos.py b/src/web/repos.py index de6db88b..f791e978 100644 --- a/src/web/repos.py +++ b/src/web/repos.py @@ -23,7 +23,6 @@ import configparser import tornado.web from . import base -from . import ui_modules class APIv1IndexHandler(base.APIMixin, base.BaseHandler): # Only users can have repositories diff --git a/src/web/sources.py b/src/web/sources.py index 9dfbdaf6..f8126373 100644 --- a/src/web/sources.py +++ b/src/web/sources.py @@ -21,7 +21,6 @@ import tornado.web from . import base -from . import ui_modules class ShowHandler(base.BaseHandler): async def _get_source(self, distro_slug, repo_slug, source_slug, user_slug=None): diff --git a/src/web/users.py b/src/web/users.py index 9c2fe6c1..45986354 100644 --- a/src/web/users.py +++ b/src/web/users.py @@ -5,7 +5,6 @@ import tornado.locale import tornado.web from . import base -from . import ui_modules class IndexHandler(base.BaseHandler): async def get(self): @@ -125,15 +124,15 @@ class PushSubscribeHandler(base.BaseHandler): await self.current_user.subscribe(**args) -class PushSubscribeButton(ui_modules.UIModule): - def render(self): - # Fetch the application server key - application_server_key = self.backend.users.application_server_key - - return self.render_string("users/modules/push-subscribe-button.html", - application_server_key=application_server_key) - - def javascript_files(self): - return ( - "js/user-push-subscribe-button.min.js", - ) +#class PushSubscribeButton(ui_modules.UIModule): +# def render(self): +# # Fetch the application server key +# application_server_key = self.backend.users.application_server_key +# +# return self.render_string("users/modules/push-subscribe-button.html", +# application_server_key=application_server_key) +# +# def javascript_files(self): +# return ( +# "js/user-push-subscribe-button.min.js", +# )