From: Michael Tremer Date: Wed, 22 Jun 2022 10:44:37 +0000 (+0000) Subject: builds: Drop changing priority UI X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f96d4b9b1b07f930d7e5defbe8fe075ae937f07b;p=pbs.git builds: Drop changing priority UI Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 1d30fcb3..53386673 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index a100b9de..00000000 --- a/src/templates/build-priority.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Edit build priority") }}{% end block %} - -{% block body %} -

{{ _("Edit build priority") }}: {{ build.name }}

-
- {% raw xsrf_form_html() %} - - - - - - - - - - - - -
{{ _("Priority") }} - - - {{ _("Set the priority of the build process.") }} -
-

- {{ _("Beware") }}: - {{ _("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.") }} -

-
- -
-
-{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index a8c55454..96f3e06e 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -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), diff --git a/src/web/builds.py b/src/web/builds.py index d8193983..e6c57679 100644 --- a/src/web/builds.py +++ b/src/web/builds.py @@ -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)