]> git.ipfire.org Git - pbs.git/commitdiff
builds: Drop changing priority UI
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 Jun 2022 10:44:37 +0000 (10:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 Jun 2022 10:44:37 +0000 (10:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/build-priority.html [deleted file]
src/web/__init__.py
src/web/builds.py

index 1d30fcb3b12431456eda2b10357e74f84aa998bf..53386673d86cbd884fcb442027dd66e5cbb08c17 100644 (file)
@@ -152,7 +152,6 @@ dist_templates_DATA = \
        src/templates/build-filter.html \
        src/templates/build-list.html \
        src/templates/build-manage.html \
-       src/templates/build-priority.html \
        src/templates/build-schedule-test.html \
        src/templates/build-state.html \
        src/templates/builds-watchers-add.html \
diff --git a/src/templates/build-priority.html b/src/templates/build-priority.html
deleted file mode 100644 (file)
index a100b9d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}{{ _("Edit build priority") }}{% end block %}
-
-{% block body %}
-       <h1>{{ _("Edit build priority") }}: {{ build.name }}</h1>
-       <form method="post" action="">
-               {% raw xsrf_form_html() %}
-               <table class="form form3">
-                       <tr>
-                               <td class="col1">{{ _("Priority") }}</td>
-                               <td class="col2">
-                                       <select name="priority">
-                                               <option value="2" {% if build.priority >= 2 %}selected="selected"{% end %}>{{ _("Very high") }}</option>
-                                               <option value="1" {% if build.priority == 1 %}selected="selected"{% end %}>{{ _("High") }}</option>
-                                               <option value="0" {% if build.priority == 0 %}selected="selected"{% end %}>{{ _("Medium") }}</option>
-                                               <option value="-1" {% if build.priority == -1 %}selected="selected"{% end %}>{{ _("Low") }}</option>
-                                               <option value="-2" {% if build.priority <= -2 %}selected="selected"{% end %}>{{ _("Very low") }}</option>
-                                       </select>
-                               </td>
-                               <td class="col3">
-                                       {{ _("Set the priority of the build process.") }}
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3">
-                                       <p>
-                                               <strong>{{ _("Beware") }}:</strong>
-                                               {{ _("Shuffeling build jobs can cause problems with the dependency solving.") }}
-                                               {{ _("Don't do this if you are not totally sure you won't break anything.") }}
-                                       </p>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" class="buttons">
-                                       <input type="submit" value="{{ _("Save") }}" />
-                               </td>
-                       </tr>
-               </table>
-       </form>
-{% end block %}
index a8c554543cc25cf0fb0f6a93d1637b43f3ed4e62..96f3e06eecc2fe0267197b3b94b16f9fb1afc8d2 100644 (file)
@@ -129,7 +129,6 @@ class Application(tornado.web.Application):
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/bugs", builds.BuildBugsHandler),
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/manage", builds.BuildManageHandler),
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/comment", builds.BuildDetailCommentHandler),
-                       (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/priority", builds.BuildPriorityHandler),
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/state", builds.BuildStateHandler),
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/watch", builds.BuildWatchersAddHandler),
                        (r"/build/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/watchers", builds.BuildWatchersHandler),
index d81939834980e23f3ff1b9a8a762189d709e9914..e6c57679c2179cd596171b1c08cbc18e19dc581a 100644 (file)
@@ -241,41 +241,6 @@ class BuildManageHandler(base.BaseHandler):
                self.redirect("/build/%s" % build.uuid)
 
 
-class BuildPriorityHandler(base.BaseHandler):
-       @tornado.web.authenticated
-       def get(self, uuid):
-               build = self.backend.builds.get_by_uuid(uuid)
-
-               if not build:
-                       raise tornado.web.HTTPError(404, "Build not found")
-
-               self.render("build-priority.html", build=build)
-
-       @tornado.web.authenticated
-       def post(self, uuid):
-               build = self.backend.builds.get_by_uuid(uuid)
-
-               if not build:
-                       raise tornado.web.HTTPError(404, "Build not found")
-
-               # Get the priority from the request data and convert it to an integer.
-               # If that cannot be done, we default to zero.
-               prio = self.get_argument("priority")
-               try:
-                       prio = int(prio)
-               except TypeError:
-                       prio = 0
-
-               # Check if the value is in a valid range.
-               if not prio in (-2, -1, 0, 1, 2):
-                       prio = 0
-
-               # Save priority.
-               build.priority = prio
-
-               self.redirect("/build/%s" % build.uuid)
-
-
 class BuildWatchersHandler(base.BaseHandler):
        def get(self, uuid):
                build = self.backend.builds.get_by_uuid(uuid)