]> git.ipfire.org Git - pbs.git/commitdiff
web: Drop uploads page
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 May 2022 12:25:37 +0000 (12:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 May 2022 12:34:31 +0000 (12:34 +0000)
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 <michael.tremer@ipfire.org>
Makefile.am
src/templates/base.html
src/templates/uploads-list.html [deleted file]
src/web/__init__.py
src/web/handlers.py

index 7f91cb2799c59ce0ba9a7c36bfbf104a23a54ca5..f5ae5f1859cdf525c34017035acb6d17d248a8be 100644 (file)
@@ -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 \
index 2354568346bbca03f7605d99ce571f4bf761801a..8aefba542c178137ecb298c8d2a8eee10c5bc600 100644 (file)
                                                                                        <li>
                                                                                                <a href="/users">{{ _("Users") }}</a>
                                                                                        </li>
-                                                                                       {% if current_user.is_admin() %}
-                                                                                               <li>
-                                                                                                       <a href="/uploads">{{ _("Uploads") }}</a>
-                                                                                               </li>
-                                                                                       {% end %}
                                                                                {% end %}
                                                                        </ul>
                                                                </li>
diff --git a/src/templates/uploads-list.html b/src/templates/uploads-list.html
deleted file mode 100644 (file)
index 07de20e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Uploads") }}{% end block %}
-
-{% block body %}
-       <ul class="breadcrumb">
-               <li>
-                       <a href="/">{{ _("Home") }}</a>
-                       <span class="divider">/</span>
-               </li>
-               <li class="active">
-                       <a href="/uploads">{{ _("Uploads") }}</a>
-               </li>
-       </ul>
-
-       <div class="page-header">
-               <h2>{{ _("Uploads") }}</h2>
-       </div>
-
-       {% if uploads %}
-               <table class="table table-striped table-hover">
-                       <thead>
-                               <tr>
-                                       <th>{{ _("Filename") }}</th>
-                                       <th>{{ _("Owner") }}</th>
-                                       <th>{{ _("Filesize") }}</th>
-                                       <th>{{ _("Time running") }}</th>
-                               </tr>
-                       </thead>
-                       <tbody>
-                               {% for upload in uploads %}
-                                       <tr>
-                                               <td>{{ upload.filename }}</td>
-                                               <td>
-                                                       {% if upload.builder %}
-                                                               <a href="/builders/{{ upload.builder.name }}">
-                                                                       {{ upload.builder.name }}
-                                                               </a>
-                                                       {% elif upload.user %}
-                                                               <a href="/user/{{ upload.user.name }}">
-                                                                       {{ upload.user.realname }}
-                                                               </a>
-                                                       {% else %}
-                                                               {{ _("No owner.") }}
-                                                       {% end %}
-                                               </td>
-                                               <td>
-                                                       {{ format_size(upload.size) }}
-                                               </td>
-                                               <td>
-                                                       {% if upload.time_running %}
-                                                               {{ friendly_time(upload.time_running) }} /
-                                                               {{ format_size(upload.speed) }}b/s
-                                                       {% else %}
-                                                               {{ _("N/A") }}
-                                                       {% end %}
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td colspan="3">
-                                                       <div class="progress progress-striped active">
-                                                               <div class="bar" style="width: {{ "%d" % (upload.progress * 100) }}%;"></div>
-                                                       </div>
-                                               </td>
-                                               <td>
-                                                       {{ "%.2f%%" % (upload.progress * 100) }}
-                                               </td>
-                                       </tr>
-                               {% end %}
-                       </tbody>
-               </table>
-       {% else %}
-               <p class="muted">
-                       {{ _("There are currently no uploads running.") }}
-               </p>
-       {% end %}
-{% end block %}
index 88610c48b7864062b02e3549f51da623f3c07126..0d5c18982ec2c9f80b31372cb8644fcbac7506e6 100644 (file)
@@ -213,9 +213,6 @@ class Application(tornado.web.Application):
                        # Search
                        (r"/search", search.SearchHandler),
 
-                       # Uploads
-                       (r"/uploads", UploadsHandler),
-
                        # Log
                        (r"/log", LogHandler),
 
index ab6bf17960dc6918a2da5392e7be3265e8086fde..e538d22b3bb95b86ea7b8371b496d4e0dd9a397c 100644 (file)
@@ -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)