| <!DOCTYPE html> | |
| <!-- | |
| Copyright 2022 The Go Authors. All rights reserved. | |
| Use of this source code is governed by a BSD-style | |
| license that can be found in the LICENSE file. | |
| --> | |
| <html lang="en"> | |
| <head> | |
| <link rel="stylesheet" href="/style.css" /> | |
| <title>Go Farmer Queues</title> | |
| </head> | |
| <body class="QueueStats-body"> | |
| {{template "build-header"}} | |
| <div class="page"> | |
| <h2>Queues</h2> | |
| <div class="QueueStats"> | |
| {{range $name, $stats := .Queues}} | |
| <div class="QueueStats-queue"> | |
| <table class="QueueStats-queueTable"> | |
| <caption> | |
| <div class="QueueStats-queueTableCaption"> | |
| <div class="QueueStats-captionCol"></div> | |
| <div class="QueueStats-captionTitle"><a href="#{{$name}}" id="{{$name}}">{{$name}}</a></div> | |
| <div class="QueueStats-capacities"> | |
| <div class="QueueStats-capacityTerm">Usage:</div> | |
| <div class="QueueStats-capacityDefinition">{{$stats.Used}}/{{$stats.Limit}}</div> | |
| {{if ne $stats.UntrackedUsed 0}} | |
| <div class="QueueStats-capacityTerm">Untracked:</div> | |
| <div class="QueueStats-capacityDefinition">{{$stats.UntrackedUsed}}</div> | |
| {{end}} | |
| </div> | |
| </div> | |
| </caption> | |
| <thead> | |
| <tr> | |
| <th class="QueueStats-queueTableHeader">Name</th> | |
| <th class="QueueStats-queueTableHeader">Repository</th> | |
| <th class="QueueStats-queueTableHeader">Go branch</th> | |
| <th class="QueueStats-queueTableHeader">Cost</th> | |
| <th class="QueueStats-queueTableHeader">Priority</th> | |
| <th class="QueueStats-queueTableHeader">User</th> | |
| <th class="QueueStats-queueTableHeader">Age (request or commit)</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {{range $item := $stats.Items}} | |
| <tr class="QueueStats-queueTableRow"> | |
| {{$build := $item.Build}} | |
| <td class="QueueStats-queueTableColumn"> | |
| {{$item.Build.Name}} | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{$item.Build.Repo}} | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{$item.Build.Branch}} | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{$item.Cost}} | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{if $build.IsRelease}} | |
| Release | |
| {{else if $build.IsTry}} | |
| Trybot | |
| {{else}} | |
| Post-submit | |
| {{end}} | |
| ({{$build.Priority}}) | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{$build.User}} | |
| </td> | |
| <td class="QueueStats-queueTableColumn"> | |
| {{humanDuration (timeSince $build.SortTime)}} | |
| </td> | |
| </tr> | |
| {{else}} | |
| <tr class="QueueStats-queueTableRow"> | |
| <td class="QueueStats-queueTableColumn" colspan="6">Queue empty.</td> | |
| </tr> | |
| {{end}} | |
| </tbody> | |
| </table> | |
| </div> | |
| {{end}} | |
| </div> | |
| </div> | |
| </body> | |
| </html> |