go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/frontend/templates/pages/build_legacy.html (about)

     1  {{define "title"}}
     2    {{ with .Build.Summary -}}
     3      {{ if eq .Status.String "InfraFailure" }}
     4        Infra Failure
     5      {{ else if eq .Status.String "Exception" }}
     6        Exception
     7      {{ else if eq .Status.String "Failure" }}
     8        Failed
     9      {{ else if eq .Status.String "NotRun" }}
    10        Pending
    11      {{ else }}
    12        {{ .Status.String }}
    13      {{ end }}
    14      -
    15      {{ .ParentLabel }} {{ .Label }}
    16    {{- end }}
    17  {{end}}
    18  
    19  {{define "head"}}
    20  <script>
    21    const useTabs = false;
    22  </script>
    23  <script src="/static/common/js/build.js"></script>
    24  <link rel="stylesheet" href="/static/common/css/tabs.css" type="text/css">
    25  {{end}}
    26  
    27  {{define "interval"}}
    28    {{ if .Started }}
    29      <span class="duration"
    30            data-starttime="{{ .Started | formatTime }}"
    31            {{ if not .Finished.IsZero -}}
    32              data-endtime="{{ .Finished | formatTime }}"
    33            {{- end }}>
    34            ( {{ .Duration | humanDuration }} )</span>
    35    {{ end }}
    36  {{end}}
    37  
    38  {{define "favicon"}}
    39  <link id="favicon" rel="shortcut icon" type="image/png" href="/static/common/favicon/
    40  {{- with .Build.Summary.Status.String -}}
    41    {{- if eq . "Running" -}} yellow
    42    {{- else if eq . "Success" -}} green
    43    {{- else if eq . "InfraFailure" -}} purple
    44    {{- else if eq . "Exception" -}} purple
    45    {{- else if eq . "Expired" -}} darkpurple
    46    {{- else if eq . "Failure" -}} red
    47    {{- else if eq . "Canceled" -}} red
    48    {{- else if eq . "NotRun" -}} gray
    49    {{- else if eq . "Warning" -}} yellow
    50    {{- else if eq . "DependencyFailure" -}} redamber
    51    {{- else if eq . "WaitingDependency" -}} brown
    52    {{- else -}} milo
    53    {{- end -}}
    54  {{- end -}}-32.png">
    55  
    56  {{end}}
    57  
    58  {{define "component"}}
    59  <li class="{{ if eq .Status.String "Success" }}green{{ end }}
    60             {{- if .Children }} substeps
    61               {{- if .Collapsed }} collapsed{{ end }}
    62             {{- end }}">
    63    <div class="status-{{.Status}} result">
    64        {{ template "interval" .ExecutionTime }}
    65      <b>{{.Label.HTML}}</b>
    66      <span>
    67        {{ range .TextBR -}}
    68          <div class="step-text">
    69            {{- if . -}}{{- . -}}{{- else -}}&nbsp;{{- end -}}
    70          </div>
    71        {{- end }}
    72      </span>
    73    </div>
    74    <ul>
    75      {{ if .MainLink }}
    76        <li class="sublink">{{.MainLink.HTML}}</li>
    77        {{- if ne .Status.String "Success" -}}
    78        {{ end }}
    79      {{- end }}
    80      {{ range .SubLink }}
    81        <li class="sublink {{- if .IsDebugLink }} debug-log{{end}}">{{.HTML}}</li>
    82      {{ end }}
    83      {{ if not (or .MainLink .SubLink) }}
    84        <li class="sublink"> - no logs - </li>
    85      {{ end }}
    86    </ul>
    87    {{ if .Children }}
    88      <ol>
    89      {{ range .Children  }}
    90        {{ template "component" . }}
    91      {{ end }}
    92      </ol>
    93    {{ end }}
    94  </li>
    95  {{ end }}
    96  
    97  {{define "body"}}
    98    <div class="content">
    99      <h1>
   100      {{ if .Build.Summary.ParentLabel }}
   101        Builder {{ .Build.Summary.ParentLabel.HTML }}
   102      {{ end }}
   103      Build {{.Build.Summary.Label.HTML }}
   104      {{ if .Build.Summary.Banner }}
   105        {{ range .Build.Summary.Banner.OS }}
   106          <img src="/static/common/logos/{{.LogoBase.Img}}" alt="{{.LogoBase.Alt}}"
   107               width="25px">
   108        {{ end }}
   109        {{ range .Build.Summary.Banner.Device }}
   110          <img src="/static/common/logos/{{.LogoBase.Img}}" alt="{{.LogoBase.Alt}}"
   111               width="25px">
   112        {{ end }}
   113      {{ end }}
   114      </h1>
   115  
   116      <div id="tabs" style="display: none;">
   117        <ul>
   118          <li><a href="#overview-tab">Overview</a></li>
   119        </ul>
   120        <div id="overview-tab">
   121          {{ template "overview" . }}
   122          {{ template "properties" . }}
   123          {{ template "changes" . }}
   124        </div>
   125      </div>
   126    </div>
   127  {{end}}
   128  
   129  {{define "overview"}}
   130    <div id="results" class="column">
   131      <h2>Results:</h2>
   132      {{ with .Build.Summary }}
   133        <p class="result status-{{.Status}}">
   134        {{ if .Text }}{{ range .TextBR }}<span class="step-text">{{ . }} </span>{{ end }}
   135        {{ else if eq .Status.String "InfraFailure" }}
   136          Internal Failure
   137        {{ else if eq .Status.String "Expired" }}
   138          Internal Failure - Expired
   139        {{ else if eq .Status.String "NotRun" }}
   140          Pending
   141        {{ else }}
   142          {{.Status}}
   143        {{ end }}
   144        </p>
   145      {{ end }} <!-- with -->
   146  
   147      {{ if .Build.Trigger }}
   148      {{ with .Build.Trigger }}
   149  
   150      <h2>Trigger Info:</h2>
   151  
   152      <table class="info" width="100%">
   153      {{ if .Project }}
   154        <tr><td class="left">Project</td><td>{{ .Project }}</td></tr>
   155      {{ end }}
   156  
   157      {{ if .Commit.Repo }}
   158        <tr><td class="left">Repository</td><td>{{ .Commit.Repo }}</td></tr>
   159      {{ end }}
   160  
   161      {{ if .Commit.Branch }}
   162        <tr><td class="left">Branch</td><td>{{ .Commit.Branch }}</td></tr>
   163      {{ end }}
   164  
   165      {{ if .Commit.RequestRevision }}
   166        <tr><td class="left">Revision</td><td>{{ .Commit.RequestRevision.HTML }}</td></tr>
   167      {{ end }}
   168  
   169      {{ if .Commit.Revision }}
   170        <tr><td class="left">Got Revision</td><td>{{ .Commit.Revision.HTML }}</td></tr>
   171      {{ end }}
   172  
   173      {{ if .Commit.Changelist }}
   174        <tr><td class="left">Patch</td><td>{{ .Commit.Changelist.HTML }}</td></tr>
   175      {{ end }}
   176  
   177      </table>
   178      {{ end }}  <!-- with -->
   179      {{ end }}  <!-- if -->
   180  
   181      {{ if or .Build.Summary.Bot .Build.Summary.Source }}
   182      <h2>Execution:</h2>
   183      <ul>
   184        {{ if .Build.Summary.Source }}
   185        <li>
   186          Source:
   187          <a href="{{ .Build.Summary.Source.URL }}"
   188             aria-label="Source for {{ .Build.Summary.Source.Label }}">
   189            {{ .Build.Summary.Source.Label }}
   190          </a>
   191        </li>
   192        {{ end }}
   193  
   194        {{ if .Build.Summary.Bot }}
   195        <li>
   196          Bot:
   197          <a href="{{ .Build.Summary.Bot.URL }}"
   198             aria-label="Bot {{ .Build.Summary.Bot.Label }}">
   199            {{ .Build.Summary.Bot.Label }}
   200          </a>
   201        </li>
   202        {{ end }}
   203  
   204        {{ if .Build.Summary.Recipe }}
   205        <li>
   206          Recipe: {{ .Build.Summary.Recipe.HTML }}
   207        </li>
   208        {{ end }}
   209      </ul>
   210      {{ end }} <!-- if -->
   211  
   212      {{ if .Build.Trigger }}
   213        {{ if .Build.Trigger.Source }}
   214          <h2>Reason:</h2>
   215          <p>{{ .Source }}</p>
   216        {{ end }}
   217      {{ end }}
   218  
   219      {{ if or .Build.Components .Build.Summary.SubLink }}
   220        <h2>Steps and Logfiles:</h2>
   221        Show:
   222        <input type="radio" name="hider" id="showExpanded" value="expanded"
   223               {{- if eq .Build.StepDisplayPref "expanded" }} checked{{ end }}>
   224        <label for="showExpanded">Expanded</label>
   225        <input type="radio" name="hider" id="showDefault" value="default"
   226               {{- if eq .Build.StepDisplayPref "default" }} checked{{ end }}>
   227        <label for="showDefault">Default</label>
   228        <input type="radio" name="hider" id="showNonGreen" value="non-green"
   229               {{- if eq .Build.StepDisplayPref "non-green" }} checked{{ end }}>
   230        <label for="showNonGreen">Non-Green</label>
   231  
   232        <br/>
   233        Debug Logs:
   234        <input type="checkbox" name="debug_hider" id="showDebugLogs"
   235               {{- if .Build.ShowDebugLogsPref }} checked{{ end }}>
   236  
   237        <ol id="steps" class="
   238          {{- if eq .Build.StepDisplayPref "non-green" }} non-green{{ end -}}
   239          {{- if not .Build.ShowDebugLogsPref }} hide-debug-logs{{ end -}}
   240          ">
   241  
   242          {{ with .Build.Summary }}
   243            {{ if .SubLink }}
   244            <li>
   245              <div class="status-{{.Status}} result">
   246                {{ template "interval" .ExecutionTime }}
   247                <b>Steps</b>
   248              </div>
   249              <ul>
   250                {{ range .SubLink  }}
   251                <li class="sublink">{{ .HTML }}</li>
   252                {{ end }}
   253              </ul>
   254            </li>
   255            {{ end }}
   256          {{ end }}
   257  
   258          {{ range .Build.Components }}
   259            {{ template "component" . }}
   260          {{ end }}
   261        </ol>
   262      {{ end }} <!-- if .Build.Components -->
   263  
   264    </div>
   265  {{end}}
   266  
   267  {{define "properties"}}
   268    <div id="properties" class="column">
   269      <h2>Build Properties:</h2>
   270  
   271      <table class="info BuildProperties" width="100%">
   272      <tr><th>Name</th><th>Value</th><th>Source</th></tr>
   273  
   274        {{ range .Build.PropertyGroup }}
   275        {{ $name := .GroupName }}
   276          {{ range .Property }}
   277            <tr>
   278              <td class="left">{{.Key}}</td>
   279              <td class="middle"><abbr title="{{.Value}}">{{.Value}}</abbr></td>
   280              <td>{{$name}}</td>
   281            </tr>
   282          {{ end }}
   283        {{ end }}
   284      </table>
   285  
   286      {{ if .Build.Blame }}
   287        <h2>Blamelist:</h2>
   288        <ol>
   289        {{ range .Build.Blame }}
   290          <li>{{ .AuthorName }} ({{ .AuthorEmail | obfuscateEmail }})</li>
   291        {{ end }}
   292        </ol>
   293      {{ end }}
   294  
   295      <h2>Timing:</h2>
   296      <table class="info" width="100%">
   297        <tr class="alt"><td class="left">Create</td>
   298        <td>
   299          {{ .Build.Summary.PendingTime.Started | localTime "N/A" }}
   300        </td></tr>
   301        <tr><td class="left">Start</td>
   302        <td>
   303          {{ .Build.Summary.ExecutionTime.Started | localTime "N/A" }}
   304        </td></tr>
   305        <tr class="alt"><td class="left">End</td>
   306        <td>
   307          {{ .Build.Summary.ExecutionTime.Finished | localTime "N/A" }}
   308        </td></tr>
   309        <tr><td class="left">Pending</td>
   310        <td id="duration">
   311          {{ if .Build.Summary.PendingTime.Started.IsZero }}
   312            N/A
   313          {{ else }}
   314            {{ .Build.Summary.PendingTime.Duration | humanDuration }}
   315          {{ end }}
   316        </td></tr>
   317        <tr class="alt"><td class="left">Execution</td>
   318        <td id="duration">
   319          {{ if .Build.Summary.ExecutionTime.Started.IsZero }}
   320            N/A
   321          {{ else }}
   322            {{ .Build.Summary.ExecutionTime.Duration | humanDuration }}
   323          {{ end }}
   324        </td></tr>
   325      </table>
   326  
   327    </div>
   328  {{end}}
   329  
   330  {{define "changes"}}
   331    <div id="changes" class="column">
   332      {{ if .Build.Blame }}
   333      <h2>All Changes:</h2>
   334      <ol>
   335      {{ range .Build.Blame }}
   336      <li>
   337        <h3>{{.Title}}</h3>
   338        <table class="info">
   339          <tbody>
   340            <tr>
   341              <td class="left">Changed by</td>
   342              <td class="value">
   343                  {{ if .AuthorName }}{{ .AuthorName }} - {{ end }}
   344                  {{ .AuthorEmail | obfuscateEmail }}
   345              </td>
   346            </tr>
   347            <tr>
   348              <td class="left">Changed at</td>
   349              <td class="value">{{ .CommitTime | localTime "N/A" }}</td>
   350            </tr>
   351            <tr>
   352              <td class="left">Repository</td>
   353              <td class="value">{{ .Repo }}</td>
   354            </tr>
   355            <tr>
   356              <td class="left">Branch</td>
   357              <td class="value">{{ .Branch }}</td>
   358            </tr>
   359            {{ with .Revision }}
   360              <tr>
   361                <td class="left">Revision</td>
   362                <td class="value">{{ .HTML }}</td>
   363              </tr>
   364            {{ end }}
   365          </tbody>
   366        </table>
   367  
   368        {{ if .Description }}
   369          <h3>Comments</h3>
   370          <pre class="comments">{{ .Description | formatCommitDesc }}</pre>
   371        {{ end }}
   372  
   373        {{ if .File }}
   374          <h3 class="files">Changed files</h3>
   375          <ul class="alternating">
   376            {{ range .File }}
   377            <li class="file">{{ . }}</li>
   378            {{ end }}
   379          </ul>
   380        {{ end }}
   381  
   382      </li>
   383      {{ end }}
   384      </ol>
   385      {{ end }}
   386    </div>
   387  {{end}}