From: Michael Tremer Date: Fri, 2 Jun 2023 11:39:02 +0000 (+0000) Subject: builders: Show status on detail page X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbcb7e4208bdc17b3cf2baef3af5c52e04b2125b;p=pbs.git builders: Show status on detail page Since we are polling the API now, we may as well show the status Signed-off-by: Michael Tremer --- diff --git a/src/templates/builders/show.html b/src/templates/builders/show.html index 7365ec8f..65484485 100644 --- a/src/templates/builders/show.html +++ b/src/templates/builders/show.html @@ -24,6 +24,15 @@ {{ _("Maintenance") }} {% end %} + {# Status #} + {% if is_running %} + {{ _("Running") }} + {% elif is_shutting_down %} + {{ _("Shutting Down") }} + {% elif is_shut_down %} + {{ _("Stopped") }} + {% end %} + {% if builder.is_online() %} {{ _("Online") }} {% else %} diff --git a/src/web/builders.py b/src/web/builders.py index 6a256891..c0cb87db 100644 --- a/src/web/builders.py +++ b/src/web/builders.py @@ -87,8 +87,9 @@ class ShowHandler(base.BaseHandler): # Fetch status args = { - "is_running" : await builder.is_running(), - "is_shut_down" : await builder.is_shut_down(), + "is_running" : await builder.is_running(), + "is_shutting_down" : await builder.is_shutting_down(), + "is_shut_down" : await builder.is_shut_down(), } self.render("builders/show.html", builder=builder, **args)