From 167b296311106bd23796381a4f03848043787fd4 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mon, 9 Jul 2018 12:09:51 +0200 Subject: [PATCH] additional info on builders in channelinfo page Fixes: https://pagure.io/koji/issue/988 --- www/kojiweb/channelinfo.chtml | 29 ++++++++++++++++++++++------- www/kojiweb/index.py | 2 ++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/www/kojiweb/channelinfo.chtml b/www/kojiweb/channelinfo.chtml index 31dcdc52..2f328f84 100644 --- a/www/kojiweb/channelinfo.chtml +++ b/www/kojiweb/channelinfo.chtml @@ -17,13 +17,28 @@ Hosts - #if $len($hosts) > 0 - #for $host in $hosts - $host.name
- #end for - #else - No hosts - #end if + #if $len($hosts) > 0 + + + + + + + #for $host in $hosts + + + + + + #end for + + + + + + #else + No hosts + #end if
HostnameEnabledReady
$host.name#if $host.enabled then $util.imageTag('yes') else $util.imageTag('no')##if $host.ready then $util.imageTag('yes') else $util.imageTag('no')#
Total$enabled_hosts$ready_hosts
diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py index fb6c4a39..cd382456 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -1650,6 +1650,8 @@ def channelinfo(environ, channelID): values['channel'] = channel values['hosts'] = hosts + values['enabled_hosts'] = len([h for h in hosts if h['enabled']]) + values['ready_hosts'] = len([h for h in hosts if h['ready']]) return _genHTML(environ, 'channelinfo.chtml')