#989 additional info on builders in channelinfo page
Merged 3 years ago by mikem. Opened 3 years ago by tkopecek.
tkopecek/koji issue988  into  master

file modified
+22 -7
@@ -17,13 +17,28 @@ 

      <tr>

        <th>Hosts</th>

        <td>

-         #if $len($hosts) > 0

-         #for $host in $hosts

-         <a href="hostinfo?hostID=$host.id">$host.name</a><br/>

-         #end for

-         #else

-         No hosts

-         #end if

+       #if $len($hosts) > 0

+       <table>

+         <tr>

+           <th>Hostname</th>

+           <th>Enabled</th>

+           <th>Ready</th>

+         </tr>

+       #for $host in $hosts

+         <tr>

+           <td><a href="hostinfo?hostID=$host.id">$host.name</a></td>

+           <td class="$str($bool($host.enabled)).lower()">#if $host.enabled then $util.imageTag('yes') else $util.imageTag('no')#</td>

+           <td class="$str($bool($host.ready)).lower()">#if $host.ready then $util.imageTag('yes') else $util.imageTag('no')#</td>

+         </tr>

+       #end for

+         <tr>

+           <th>Total</th>

+           <td>$enabled_hosts</td>

+           <td>$ready_hosts</td>

+         </tr>

+       #else

+       No hosts

+       #end if

        </td>

      </tr>

    </table>

file modified
+2
@@ -1645,6 +1645,8 @@ 

  

      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')