From: Michael Tremer Date: Tue, 31 May 2022 16:32:48 +0000 (+0000) Subject: Drop jobs detail page X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea301784a6e7838d18784d71e987fd53a9cd01ec;p=pbs.git Drop jobs detail page Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index b69c1384..2be1ef5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -174,7 +174,6 @@ dist_templates_DATA = \ src/templates/jobs-buildroot.html \ src/templates/job-schedule-rebuild.html \ src/templates/job-schedule-test.html \ - src/templates/jobs-detail.html \ src/templates/keys-delete.html \ src/templates/keys-import.html \ src/templates/keys-list.html \ diff --git a/src/templates/jobs-detail.html b/src/templates/jobs-detail.html deleted file mode 100644 index 2f15cddb..00000000 --- a/src/templates/jobs-detail.html +++ /dev/null @@ -1,222 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Job") }}: {{ job.name }}{% end block %} - -{% block body %} - - - -
- {% if current_user and job.state in ("dispatching", "running", "uploading", "aborted", "failed", "finished") %} -
-

- {{ _("Build job") }}: {{ job.name }} - {% module JobState(job, cls="float-lg-right float-xl-right", show_icon=False) %} -
- {{ job.pkg.summary }} -

-
-
- -
- {% else %} -
-

- {{ _("Build job") }}: {{ job.name }} - {% module JobState(job, cls="float-lg-right float-xl-right", show_icon=False) %} -
- {{ job.pkg.summary }} -

-
- {% end %} -
- - - - {% if job.message %} -
-
-
- {{ "
".join(job.message.splitlines()) }} -
-
-
- {% end %} - - {% if job.state == "aborted" and job.aborted_state %} -
-
- -
-
- {% end %} - -
-
-

{{ _("General") }}

-
- - - {% if job.rank %} - - - - - {% end %} - - - - - - - - - - - - - - {% if job.time_started %} - - - - - {% end %} - {% if job.time_finished %} - - - - - {% end %} - -
- {{ _("Job rank") }} - - {{ _("#%s in the build queue") % job.rank }} -
- {{ _("Time") }} - - {{ friendly_time(job.duration) }} -
- {{ _("Builder") }} - - {% if job.builder %} - {{ job.builder.name }} - {% else %} - {{ _("No builder assigned.") }} - {% end %} -
- {{ _("Created") }} - - {{ format_date(job.time_created, full_format=True) }} -
- {{ _("Started") }} - - {{ format_date(job.time_started, full_format=True) }} -
- {{ _("Finished") }} - - {{ format_date(job.time_finished, full_format=True) }} -
-
-
- -
-

{{ _("Build logs") }}

- {% if job.logfiles %} - {% module LogFilesTable(job, job.logfiles) %} - {% else %} -

{{ _("No logs available, yet.") }}

- {% end %} - - {% if job.buildroot %} -

- {{ _("Buildroot") }} - ({{ _("%s package", "%s packages", len(job.buildroot)) % len(job.buildroot) }}) -

- {% end %} -
-
- - {% if len(job) > 0 %} -
-
-

- {{ _("Package files") }} - ({{ len(job) }}) -

-
-
- {% module PackagesTable(job, job) %} -
-
- {% end %} - - {% if log %} -
-
-

- {{ _("Log") }} -

-
-
- {% module Log(log) %} -
-
- {% end %} -{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 83843103..0b5e142a 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -144,7 +144,6 @@ class Application(tornado.web.Application): (r"/queue", jobs.QueueHandler), # Jobs - (r"/job/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})", jobs.JobDetailHandler), (r"/job/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/abort", jobs.JobAbortHandler), (r"/job/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/buildroot", jobs.JobBuildrootHandler), (r"/job/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12})/schedule", jobs.JobScheduleHandler), diff --git a/src/web/jobs.py b/src/web/jobs.py index c483ab3b..421314b2 100644 --- a/src/web/jobs.py +++ b/src/web/jobs.py @@ -9,18 +9,6 @@ class QueueHandler(base.BaseHandler): self.render("queue.html", queue=self.backend.jobqueue) -class JobDetailHandler(base.BaseHandler): - def get(self, uuid): - job = self.backend.jobs.get_by_uuid(uuid) - if not job: - raise tornado.web.HTTPError(404, "No such job: %s" % job) - - # Cache the log. - log = job.get_log() - - self.render("jobs-detail.html", job=job, build=job.build, log=log) - - class JobBuildrootHandler(base.BaseHandler): def get(self, uuid): job = self.backend.jobs.get_by_uuid(uuid)