From 1a851c9498734ecffaa92c32b0969faa19668e24 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jul 09 2018 10:09:51 +0000 Subject: additional info on builders in channelinfo page Fixes: https://pagure.io/koji/issue/988 --- diff --git a/www/kojiweb/channelinfo.chtml b/www/kojiweb/channelinfo.chtml index 31dcdc5..2f328f8 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 6b6659e..929738b 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -1645,6 +1645,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')