github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/misc/dashboard/app/build/ui.html (about)

     1  <!DOCTYPE HTML>
     2  <html>
     3    <head>
     4      <title>Go Build Dashboard</title>
     5      <style>
     6        body {
     7          font-family: sans-serif;
     8          padding: 0; margin: 0;
     9        }
    10        h1, h2 {
    11          margin: 0;
    12          padding: 5px;
    13        }
    14        h1 {
    15          background: #eee;
    16        }
    17        h2 {
    18          margin-top: 20px;
    19        }
    20        .build, .packages {
    21          margin: 5px;
    22          border-collapse: collapse;
    23        }
    24        .build td, .build th, .packages td, .packages th {
    25          vertical-align: top;
    26          padding: 2px 4px;
    27          font-size: 10pt;
    28        }
    29        .build tr.commit:nth-child(2n) {
    30          background-color: #f0f0f0;
    31        }
    32        .build .hash {
    33          font-family: monospace;
    34          font-size: 9pt;
    35        }
    36        .build .result {
    37          text-align: center;
    38          width: 2em;
    39        }
    40        .col-hash, .col-result {
    41          border-right: solid 1px #ccc;
    42        }
    43        .build .arch {
    44          font-size: 66%;
    45          font-weight: normal;
    46        }
    47        .build .time {
    48          color: #666;
    49        }
    50        .build .ok {
    51          font-size: 83%;
    52        }
    53        .build .desc, .build .time, .build .user {
    54          white-space: nowrap;
    55        }
    56        .paginate {
    57          padding: 0.5em;
    58        }
    59        .paginate a {
    60          padding: 0.5em;
    61          background: #eee;
    62          color: blue;
    63        }
    64        .paginate a.inactive {
    65          color: #999;
    66        }
    67        .fail {
    68          color: #C00;
    69        }
    70      </style>
    71    </head>
    72    <body>
    73  
    74      <h1>Go Build Status</h1>
    75  
    76    {{if $.Commits}}
    77  
    78      <table class="build">
    79        <colgroup class="col-hash"></colgroup>
    80      {{range $.Builders | builderSpans}}
    81        <colgroup class="col-result" span="{{.N}}"></colgroup>
    82      {{end}}
    83        <colgroup class="col-user"></colgroup>
    84        <colgroup class="col-time"></colgroup>
    85        <colgroup class="col-desc"></colgroup>
    86        <tr>
    87          <!-- extra row to make alternating colors use dark for first result -->
    88        </tr>
    89        <tr>
    90          <th>&nbsp;</th>
    91      {{range $.Builders | builderSpans}}
    92          <th colspan="{{.N}}">{{.OS}}</th>
    93      {{end}}
    94          <th></th>
    95          <th></th>
    96          <th></th>
    97        </tr>
    98        <tr>
    99          <th>&nbsp;</th>
   100      {{range $.Builders}}
   101          <th class="result arch" title="{{.}}">{{builderArchShort .}}</th>
   102      {{end}}
   103        </tr>
   104      {{range $c := $.Commits}}
   105        <tr class="commit">
   106          <td class="hash"><a href="{{repoURL .Hash ""}}">{{shortHash .Hash}}</a></td>
   107          {{range $.Builders}}
   108            <td class="result">
   109              {{with $c.Result . ""}}
   110                {{if .OK}}
   111                  <span class="ok">ok</span>
   112                {{else}}
   113                  <a href="/log/{{.LogHash}}" class="fail">fail</a>
   114                {{end}}
   115              {{else}}
   116                &nbsp;
   117              {{end}}
   118            </td>
   119          {{end}}
   120          <td class="user" title="{{.User}}">{{shortUser .User}}</td>
   121          <td class="time">{{.Time.Format "Mon 02 Jan 15:04"}}</td>
   122          <td class="desc" title="{{.Desc}}">{{shortDesc .Desc}}</td>
   123        </tr>
   124      {{end}}
   125      </table>
   126  
   127      {{with $.Pagination}}
   128      <div class="paginate">
   129        <a {{if .HasPrev}}href="?page={{.Prev}}"{{else}}class="inactive"{{end}}>newer</a>
   130        <a {{if .Next}}href="?page={{.Next}}"{{else}}class="inactive"{{end}}>older</a>
   131        <a {{if .HasPrev}}href="."{{else}}class="inactive"{{end}}>latest</a>
   132      </div>
   133      {{end}}
   134  
   135    {{else}}
   136      <p>No commits to display. Hm.</p>
   137    {{end}}
   138  
   139    {{with $.TipState}}
   140      {{$goHash := .Tag.Hash}}
   141      <h2>
   142        Sub-repositories at tip
   143        <small>(<a href="{{repoURL .Tag.Hash ""}}">{{shortHash .Tag.Hash}}</a>)</small>
   144      </h2>
   145  
   146      <table class="build">
   147        <colgroup class="col-package"></colgroup>
   148        <colgroup class="col-hash"></colgroup>
   149        {{range $.Builders | builderSpans}}
   150          <colgroup class="col-result" span="{{.N}}"></colgroup>
   151        {{end}}
   152        <colgroup class="col-user"></colgroup>
   153        <colgroup class="col-time"></colgroup>
   154        <colgroup class="col-desc"></colgroup>
   155        <tr>
   156          <!-- extra row to make alternating colors use dark for first result -->
   157        </tr>
   158        <tr>
   159          <th></th>
   160          <th></th>
   161          {{range $.Builders | builderSpans}}
   162            <th colspan="{{.N}}">{{.OS}}</th>
   163          {{end}}
   164          <th></th>
   165          <th></th>
   166          <th></th>
   167        </tr>
   168        <tr>
   169          <th></th>
   170          <th></th>
   171          {{range $.Builders}}
   172            <th class="result arch" title="{{.}}">{{builderArchShort .}}</th>
   173          {{end}}
   174          <th></th>
   175          <th></th>
   176          <th></th>
   177        </tr>
   178      {{range $pkg := .Packages}}
   179        <tr class="commit">
   180          <td><a title="{{.Package.Path}}">{{.Package.Name}}</a></td>
   181          <td class="hash">
   182            {{$h := $pkg.Commit.Hash}}
   183            <a href="{{repoURL $h $pkg.Commit.PackagePath}}">{{shortHash $h}}</a>
   184          </td>
   185          {{range $.Builders}}
   186            <td class="result">
   187              {{with $pkg.Commit.Result . $goHash}}
   188                {{if .OK}}
   189                  <span class="ok">ok</span>
   190                {{else}}
   191                  <a href="/log/{{.LogHash}}" class="fail">fail</a>
   192                {{end}}
   193              {{else}}
   194                &nbsp;
   195              {{end}}
   196            </td>
   197          {{end}}
   198          {{with $pkg.Commit}}
   199            <td class="user" title="{{.User}}">{{shortUser .User}}</td>
   200            <td class="time">{{.Time.Format "Mon 02 Jan 15:04"}}</td>
   201            <td class="desc" title="{{.Desc}}">{{shortDesc .Desc}}</td>
   202          {{end}}
   203        </tr>
   204      {{end}}
   205      </table>
   206    {{end}}
   207  
   208    </body>
   209  </html>