From: Michael Tremer Date: Tue, 31 May 2022 12:25:37 +0000 (+0000) Subject: web: Drop uploads page X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=358fafd0625bc3e133210e0f44567ba2150faeec;p=pbs.git web: Drop uploads page We cannot really show any status about those any more and it makes no sense with higher bandwidths than 10 years ago when this was built first. Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 7f91cb27..f5ae5f18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -191,7 +191,6 @@ dist_templates_DATA = \ src/templates/search-results.html \ src/templates/source-list.html \ src/templates/updates-index.html \ - src/templates/uploads-list.html \ src/templates/user-delete.html \ src/templates/user-impersonation.html \ src/templates/user-list.html \ diff --git a/src/templates/base.html b/src/templates/base.html index 23545683..8aefba54 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -52,11 +52,6 @@
  • {{ _("Users") }}
  • - {% if current_user.is_admin() %} -
  • - {{ _("Uploads") }} -
  • - {% end %} {% end %} diff --git a/src/templates/uploads-list.html b/src/templates/uploads-list.html deleted file mode 100644 index 07de20e3..00000000 --- a/src/templates/uploads-list.html +++ /dev/null @@ -1,77 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Uploads") }}{% end block %} - -{% block body %} - - - - - {% if uploads %} - - - - - - - - - - - {% for upload in uploads %} - - - - - - - - - - - {% end %} - -
    {{ _("Filename") }}{{ _("Owner") }}{{ _("Filesize") }}{{ _("Time running") }}
    {{ upload.filename }} - {% if upload.builder %} - - {{ upload.builder.name }} - - {% elif upload.user %} - - {{ upload.user.realname }} - - {% else %} - {{ _("No owner.") }} - {% end %} - - {{ format_size(upload.size) }} - - {% if upload.time_running %} - {{ friendly_time(upload.time_running) }} / - {{ format_size(upload.speed) }}b/s - {% else %} - {{ _("N/A") }} - {% end %} -
    -
    -
    -
    -
    - {{ "%.2f%%" % (upload.progress * 100) }} -
    - {% else %} -

    - {{ _("There are currently no uploads running.") }} -

    - {% end %} -{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 88610c48..0d5c1898 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -213,9 +213,6 @@ class Application(tornado.web.Application): # Search (r"/search", search.SearchHandler), - # Uploads - (r"/uploads", UploadsHandler), - # Log (r"/log", LogHandler), diff --git a/src/web/handlers.py b/src/web/handlers.py index ab6bf179..e538d22b 100644 --- a/src/web/handlers.py +++ b/src/web/handlers.py @@ -26,15 +26,6 @@ class IndexHandler(base.BaseHandler): self.render("index.html", jobs=jobs, updates=updates) -class UploadsHandler(base.BaseHandler): - @tornado.web.authenticated - def get(self): - if not self.current_user.is_admin(): - raise tornado.web.HTTPError(403) - - self.render("uploads-list.html", uploads=self.backend.uploads) - - class FileDetailHandler(base.BaseHandler): def get(self, uuid): pkg, file = self.backend.packages.get_with_file_by_uuid(uuid)