From: Michael Tremer Date: Wed, 19 Oct 2022 17:37:30 +0000 (+0000) Subject: web: Drop the unused FileDetail Handler X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce9bf9bb02942fbca81c9ec66dbdc02e9c9a5e6b;p=pbs.git web: Drop the unused FileDetail Handler Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index b12f66ce..db110c17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,7 +164,6 @@ dist_templates_DATA = \ src/templates/distro-source-detail.html \ src/templates/distro-update-detail.html \ src/templates/distro-update-edit.html \ - src/templates/file-detail.html \ src/templates/index.html \ src/templates/jobs-abort.html \ src/templates/jobs-buildroot.html \ diff --git a/src/templates/file-detail.html b/src/templates/file-detail.html deleted file mode 100644 index b5a25241..00000000 --- a/src/templates/file-detail.html +++ /dev/null @@ -1,120 +0,0 @@ -{% extends "base.html" %} - -{% block body %} -

- {{ _("File") }}: - {{ file.name }} -

- -

{{ file.summary or pkg.summary }}

- - - - - - - - - - - - - - - - - - - - - - - - - {% if file.maintainer %} - - - - - {% end %} - - - - - - - - - - - - {% for i in file.provides %} - - - - - {% end %} - - - - - - - {% for i in file.requires %} - - - - - {% end %} - - {% for i in file.obsoletes %} - - - - - {% end %} - - {% for i in file.conflicts %} - - - - - {% end %} -
{{ _("Package") }} - {{ pkg.friendly_name }} -
{{ _("Description") }}
{{ file.description or pkg.description }}
{{ _("URL") }} - {{ file.url or pkg.url }} -
{{ _("License") }}{{ file.license or pkg.license}}
{{ _("Maintainer") }}{{ file.maintainer or pkg.maintainer }}
{{ _("Size") }}{{ friendly_size(file.size) }}
{{ _("Hash") }}{{ file.hash1 }}
{{ _("Provides") }}{{ i }}
{{ _("Requires") }}{{ "
".join(file.requires) }}
{{ _("Requires") }}{{ i }}
{{ _("Obsoletes") }}{{ i }}
{{ _("Conflicts") }}{{ i }}
-
 
- -

{{ _("Build information") }}

- - - - - - - - - - - - - -
{{ _("ID") }} - {{ file.build_id }} -
{{ _("Host") }} - {{ file.build_host }} -
{{ _("Time") }}{{ file.build_date }}
-
 
- -

{{ _("Files") }}

- {% module PackageFilesTable(file.filelist) %} -{% end block %} - -{% block sidebar %} -

{{ _("Actions") }}

- -{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 5090c469..067a55be 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -127,9 +127,6 @@ class Application(tornado.web.Application): (r"/package/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/view(.*)", packages.FileViewHandler), - # Files - (r"/file/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})", FileDetailHandler), - # Builds (r"/builds", builds.IndexHandler), (r"/builds/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})", builds.ShowHandler), diff --git a/src/web/handlers.py b/src/web/handlers.py index 8a18f321..4ec826d8 100644 --- a/src/web/handlers.py +++ b/src/web/handlers.py @@ -9,16 +9,6 @@ class IndexHandler(base.BaseHandler): self.render("index.html", jobs=self.backend.jobs.running) -class FileDetailHandler(base.BaseHandler): - def get(self, uuid): - pkg, file = self.backend.packages.get_with_file_by_uuid(uuid) - - if not file: - raise tornado.web.HTTPError(404, "File not found") - - self.render("file-detail.html", pkg=pkg, file=file) - - class LogHandler(base.BaseHandler): def get(self): kwargs = {