github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/dashboard/app/build/ui.html (about)

     1  <!DOCTYPE HTML>
     2  <html>
     3    <head>
     4      <title>{{$.Dashboard.Name}} Build Dashboard</title>
     5      <link rel="stylesheet" href="/static/style.css"/>
     6      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
     7      <script>
     8      var showUnsupported = window.location.hash.substr(1) != "short";
     9      function redraw() {
    10          showUnsupported = !$("#showshort").prop('checked');
    11          $('.unsupported')[showUnsupported?'show':'hide']();
    12          window.location.hash = showUnsupported?'':'short';
    13      }
    14      $(document).ready(function() {
    15          $("#showshort").attr('checked', !showUnsupported).change(redraw);
    16          redraw();
    17      })
    18      </script>
    19    </head>
    20  
    21    <body>
    22      <header id="topbar">
    23        <h1>Go Dashboard</h1>
    24        <nav>
    25          <a href="{{$.Dashboard.Prefix}}/">Test</a>
    26          <a href="{{$.Dashboard.Prefix}}/perf">Perf</a>
    27          <a href="{{$.Dashboard.Prefix}}/perfgraph">Graphs</a>
    28        </nav>
    29        <div class="clear"></div>
    30      </header>
    31  
    32      <nav class="dashboards">
    33        {{range buildDashboards}}
    34          <a href="{{.Prefix}}/">{{.Name}}</a>
    35        {{end}}
    36        <label>
    37          <input type=checkbox id="showshort">
    38          show only <a href="http://golang.org/wiki/PortingPolicy">first-class ports</a>
    39        </label>
    40      </nav>
    41      {{with $.Package.Name}}<h2>{{.}}</h2>{{end}}
    42  
    43    <div class="page">
    44  
    45      {{if $.Commits}}
    46  
    47      <table class="build">
    48        <colgroup class="col-hash" {{if $.Package.Path}}span="2"{{end}}></colgroup>
    49      {{range $.Builders | builderSpans}}
    50        <colgroup class="col-result{{if .Unsupported}} unsupported{{end}}" span="{{.N}}"></colgroup>
    51      {{end}}
    52        <colgroup class="col-user"></colgroup>
    53        <colgroup class="col-time"></colgroup>
    54        <colgroup class="col-desc"></colgroup>
    55        <tr>
    56          <!-- extra row to make alternating colors use dark for first result -->
    57        </tr>
    58        <tr>
    59      {{if $.Package.Path}}
    60          <th colspan="2">revision</th>
    61      {{else}}
    62          <th>&nbsp;</th>
    63      {{end}}
    64      {{range $.Builders | builderSpans}}
    65          <th {{if .Unsupported}}class="unsupported"{{end}} colspan="{{.N}}">{{.OS}}</th>
    66      {{end}}
    67          <th></th>
    68          <th></th>
    69          <th></th>
    70        </tr>
    71        <tr>
    72      {{if $.Package.Path}}
    73          <th class="result arch">repo</th>
    74          <th class="result arch">{{$.Dashboard.Name}}</th>
    75      {{else}}
    76          <th>&nbsp;</th>
    77      {{end}}
    78      {{range $.Builders}}
    79          <th class="result arch{{if (unsupported .)}} unsupported{{end}}" title="{{.}}">{{builderSubheading .}}</th>
    80      {{end}}
    81          <th></th>
    82          <th></th>
    83          <th></th>
    84        </tr>
    85      {{range $c := $.Commits}}
    86        {{range $i, $h := $c.ResultGoHashes}}
    87          <tr class="commit">
    88          {{if $i}}
    89            <td>&nbsp;</td>
    90          {{else}}
    91            <td class="hash"><a href="{{repoURL $.Dashboard.Name $c.Hash $.Package.Path}}">{{shortHash $c.Hash}}</a></td>
    92          {{end}}
    93          {{if $h}} 
    94            <td class="hash"><a href="{{repoURL $.Dashboard.Name $h ""}}">{{shortHash $h}}</a></td>
    95          {{end}}
    96            {{range $.Builders}}
    97              <td class="result{{if (unsupported .)}} unsupported{{end}}">
    98                {{with $c.Result . $h}}
    99                  {{if .OK}}
   100                    <span class="ok">ok</span>
   101                  {{else}}
   102                    <a href="{{$.Dashboard.Prefix}}/log/{{.LogHash}}" class="fail">fail</a>
   103                  {{end}}
   104                {{else}}
   105                  &nbsp;
   106                {{end}}
   107              </td>
   108            {{end}}
   109          {{if $i}}
   110            <td>&nbsp;</td>
   111            <td>&nbsp;</td>
   112            <td>&nbsp;</td>
   113          {{else}}
   114            <td class="user" title="{{$c.User}}">{{shortUser $c.User}}</td>
   115            <td class="time">{{$c.Time.Format "Mon 02 Jan 15:04"}}</td>
   116            <td class="desc" title="{{$c.Desc}}">{{shortDesc $c.Desc}}</td>
   117          {{end}}
   118          </tr>
   119        {{end}}
   120      {{end}}
   121      </table>
   122  
   123      {{with $.Pagination}}
   124      <div class="paginate">
   125        <nav>
   126          <a {{if .HasPrev}}href="?{{with $.Package.Path}}repo={{.}}&{{end}}page={{.Prev}}{{with $.Branch}}&branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>newer</a>
   127          <a {{if .Next}}href="?{{with $.Package.Path}}repo={{.}}&{{end}}page={{.Next}}{{with $.Branch}}&branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>older</a>
   128          <a {{if .HasPrev}}href=".{{with $.Branch}}?branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>latest</a>
   129        </nav>
   130      </div>
   131      {{end}}
   132  
   133    {{else}}
   134      <p>No commits to display. Hm.</p>
   135    {{end}}
   136  
   137    {{with $.TipState}}
   138      {{$goHash := .Tag.Hash}}
   139      {{if .Packages}}
   140        <h2>
   141          Sub-repositories at tip
   142          <small>(<a href="{{repoURL $.Dashboard.Name .Tag.Hash ""}}">{{shortHash .Tag.Hash}}</a>)</small>
   143        </h2>
   144  
   145        <table class="build">
   146        <colgroup class="col-package"></colgroup>
   147        <colgroup class="col-hash"></colgroup>
   148        {{range $.Builders | builderSpans}}
   149          <colgroup class="col-result{{if .Unsupported}} unsupported{{end}}" span="{{.N}}"></colgroup>
   150        {{end}}
   151        <colgroup class="col-user"></colgroup>
   152        <colgroup class="col-time"></colgroup>
   153        <colgroup class="col-desc"></colgroup>
   154        <tr>
   155          <!-- extra row to make alternating colors use dark for first result -->
   156        </tr>
   157        <tr>
   158          <th></th>
   159          <th></th>
   160          {{range $.Builders | builderSpans}}
   161            <th {{if .Unsupported}}class="unsupported"{{end}} colspan="{{.N}}">{{.OS}}</th>
   162          {{end}}
   163          <th></th>
   164          <th></th>
   165          <th></th>
   166        </tr>
   167        <tr>
   168          <th></th>
   169          <th></th>
   170          {{range $.Builders}}
   171            <th class="result arch{{if (unsupported .)}} unsupported{{end}}" title="{{.}}">{{builderSubheading .}}</th>
   172          {{end}}
   173          <th></th>
   174          <th></th>
   175          <th></th>
   176        </tr>
   177      {{range $pkg := .Packages}}
   178        <tr class="commit">
   179          <td><a title="{{.Package.Path}}" href="?repo={{.Package.Path}}">{{.Package.Name}}</a></td>
   180          <td class="hash">
   181            {{$h := $pkg.Commit.Hash}}
   182            <a href="{{repoURL $.Dashboard.Name $h $pkg.Commit.PackagePath}}">{{shortHash $h}}</a>
   183          </td>
   184          {{range $.Builders}}
   185            <td class="result{{if (unsupported .)}} unsupported{{end}}">
   186              {{with $pkg.Commit.Result . $goHash}}
   187                {{if .OK}}
   188                  <span class="ok">ok</span>
   189                {{else}}
   190                  <a href="{{$.Dashboard.Prefix}}/log/{{.LogHash}}" class="fail">fail</a>
   191                {{end}}
   192              {{else}}
   193                &nbsp;
   194              {{end}}
   195            </td>
   196          {{end}}
   197          {{with $pkg.Commit}}
   198            <td class="user" title="{{.User}}">{{shortUser .User}}</td>
   199            <td class="time">{{.Time.Format "Mon 02 Jan 15:04"}}</td>
   200            <td class="desc" title="{{.Desc}}">{{shortDesc .Desc}}</td>
   201          {{end}}
   202        </tr>
   203      {{end}}
   204      </table>
   205     {{end}}
   206    {{end}}
   207  
   208    </div>
   209    </body>
   210  </html>