go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/appengine/templates/pages/recent_runs.html (about)

     1  {{define "title"}}{{.Project}} Recent Runs - LUCI Change Verifier{{end}}
     2  
     3  {{define "head"}}
     4    <style type="text/css">
     5  
     6      .tall-cell {
     7      padding: 0px 5px;
     8        overflow-y: auto;
     9        max-height: 100px;
    10        border: #eee;
    11        border-style: solid;
    12        border-width: thin;
    13      }
    14    </style>
    15  {{end}}
    16  
    17  {{define "content"}}
    18    <h2>Recent
    19      {{if .FilterMode}}
    20        {{Title .FilterMode -}}s
    21      {{else}}
    22        Runs
    23      {{end}}
    24  
    25      {{if .FilterStatus}}
    26        with Status "{{Title .FilterStatus}}"
    27      {{end}}
    28  
    29      {{if .Project}}
    30        for LUCI Project "{{.Project}}"
    31      {{end}}
    32    </h2>
    33  
    34    <div class="container">
    35      <table class="table table-striped" id="runs-table">
    36        <thead>
    37          <tr>
    38            <th style="width: 10%;">PROJECT</th>
    39            <th style="width: 27.5%;">ID</th>
    40            <th style="width: 10%;">MODE</th>
    41            <th style="width: 10%;">STATUS</th>
    42            <th style="width: 20%;">CREATE_TIME</th>
    43            <th style="width: *">CLs</th>
    44          </tr>
    45        </thead>
    46        <tbody>
    47          {{$Now := .Now}}
    48          {{$Project := .Project}}
    49          {{range .Runs}}
    50            <tr>
    51              <td><a href="/ui/recents/{{.ID.LUCIProject}}">{{.ID.LUCIProject}}</a></td>
    52              <td>
    53                <a href="/ui/run/{{.ID}}">
    54                  ({{slice .ID.Inner 5 10}})
    55                </a>
    56                <em>
    57                  {{.ID.Inner}}
    58                </em>
    59              </td>
    60              <td><a href="/ui/recents/{{$Project}}?mode={{.Mode}}">{{.Mode}}</a></td>
    61              <td><a href="/ui/recents/{{$Project}}?status={{.Status}}">{{.Status}}</a></td>
    62              <td>
    63                <span title="{{RelTime .CreateTime $Now}}" class="unix-timestamp">
    64                  {{.CreateTime.Unix}}
    65                </span>
    66              </td>
    67              <td>
    68                {{if (gt (len .ExternalCLs) 5)}}
    69                <div class="tall-cell">
    70                <p>{{ len .ExternalCLs }} total CLs</p>
    71                {{else}}
    72                <div>
    73                {{end}}
    74                <ul>
    75                {{range .ExternalCLs}}
    76                  <li><a href="{{.MustURL}}">{{DisplayExternalID .}}</a></li>
    77                {{end}}
    78                </ul>
    79                </div>
    80              </td>
    81            </tr>
    82          {{end}}
    83        </tbody>
    84      </table>
    85  
    86      <div class="pager">
    87        {{if .NextPage}}
    88        <span><a href="?page={{.NextPage}}&mode={{.FilterMode}}&status={{.FilterStatus}}">Next&#10095;</a></span>
    89        {{end}}
    90      </div>
    91    </div>
    92  {{end}}