PR#3346: www: display load/capacity at hosts page

Merges #3346
https://pagure.io/koji/pull-request/3346

Fixes #3345
https://pagure.io/koji/issue/3345
This commit is contained in:
Tomas Kopecek 2022-05-04 15:14:23 +02:00
commit c1b45d3d91

View file

@ -41,7 +41,7 @@ in $channel channel
<h4>$headerState($state) $headerReady($ready) $headerArch($arch) $headerChannel($channel)</h4>
<table class="data-list">
<tr>
<td colspan="7">
<td colspan="9">
<table class="nested">
<tr><td>
<strong>State</strong>:
@ -85,7 +85,7 @@ in $channel channel
</td>
</tr>
<tr>
<td class="paginate" colspan="7">
<td class="paginate" colspan="9">
#if $len($hostPages) > 1
<form class="pageJump" action="">
Page:
@ -114,6 +114,8 @@ in $channel channel
<th><a href="hosts?order=$util.toggleOrder($self, 'channels')$util.passthrough_except($self, 'order')">Channels</a> $util.sortImage($self, 'channels')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'enabled')$util.passthrough_except($self, 'order')">Enabled?</a> $util.sortImage($self, 'enabled')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'ready')$util.passthrough_except($self, 'order')">Ready?</a> $util.sortImage($self, 'ready')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'task_load')$util.passthrough_except($self, 'order')">Load</a> $util.sortImage($self, 'task_load')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'capacity')$util.passthrough_except($self, 'order')">Cap.</a> $util.sortImage($self, 'capacity')</th>
<th><a href="hosts?order=$util.toggleOrder($self, 'last_update')$util.passthrough_except($self, 'order')">Last Update</a> $util.sortImage($self, 'last_update')</th>
</tr>
#if $len($hosts) > 0
@ -129,16 +131,18 @@ in $channel channel
</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>
<td>$host.task_load</td>
<td>$host.capacity</td>
<td>$util.formatTime($host.last_update)</td>
</tr>
#end for
#else
<tr class="row-odd">
<td colspan="7">No hosts</td>
<td colspan="9">No hosts</td>
</tr>
#end if
<tr>
<td class="paginate" colspan="7">
<td class="paginate" colspan="9">
#if $len($hostPages) > 1
<form class="pageJump" action="">
Page: