aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/dashboard/templates/series.html
blob: 3f349435d38cff4c29980c2c5577678f7f78f111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{{define "content"}}
    <!-- Modal -->
    <div class="modal fade" tabindex="-1" id="contentModal" role="dialog" aria-labelledby="contentModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="contentModalLabel">Content</h5>&nbsp;
            <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <!-- will be set dynamically -->
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
          </div>
        </div>
      </div>
    </div>
    <script>
      $(document).ready(function() {
          $('a.modal-link-raw').click(function(event) {
              event.preventDefault();
              var body = $('#contentModal .modal-body')
              var url = $(this).attr('href');
              body.html("")
              body.load(url, function(response, status, xhr){
                  if (status == "success") {
                      body.html($('<pre></pre>').text(response))
                  }
                  $('#contentModal').modal('show');
              });
          })
      });
    </script>

    <div class="container">
        <h2>Patch Series</h2>
        <table class="table table-bordered table-sm">
            <tbody>
                <tr>
                    <th>Subject</th>
                    <td><a href="{{.Link}}">{{.Title}}</a></td>
                </tr>
                <tr>
                    <th>Author</th>
                    <td>{{.AuthorEmail}}</td>
                </tr>
                <tr>
                    <th>Date</th>
                    <td>{{.PublishedAt}}</td>
                </tr>
                <tr>
                    <th>Version</th>
                    <td>{{.Version}}</td>
                </tr>
                <tr>
                    <th>Cc</th>
                    <td>
                        {{range .Cc}}
                            <a href="/?cc={{.}}">{{.}}</a>
                        {{end}}
                    </td>
                </tr>
            </tbody>
        </table>

        <h3>Patches ({{.TotalPatches}})</h3>
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Content <a href="/series/{{.ID}}/all_patches">[All]</a></th>
                </tr>
            </thead>
            <tbody>
                {{$data := .}} 
                {{range .Patches}}
                <tr>
                    <td><a href="{{.Link}}">{{.Title}}</a></td>
                    <td><a href="/patches/{{.ID}}" class="modal-link-raw">[Body]</a></td>
                </tr>
                {{end}}
           </tbody>
        </table>
        {{range .Sessions}}
        <h3>Session {{.CreatedAt.Format "2006-01-02"}}</h3>
        <table class="table table-bordered table-sm">
            <tbody>
                <tr>
                    <th><i>ID (for dev)</i></th>
                    <td>{{.ID}}</td>
                </tr>
                <tr>
                    <th>Status</th>
                    <td>{{.Status}}</td>
                </tr>
                {{if or (not .SkipReason.IsNull) .TriageLogURI}}
                <tr>
                    <th>Triaged</th>
                    <td>
                        {{if not .SkipReason.IsNull}}Skipped: {{.SkipReason.StringVal}}{{else}}OK{{end}}
                        {{if .TriageLogURI}}
                            <a href="/sessions/{{.ID}}/triage_log">[Log]</a>
                        {{end}}
                    </td>
                </tr>
                {{end}}
                {{if .LogURI}}
                <tr>
                    <th><i>Execution Log</i></th>
                    <td><a href="/sessions/{{.ID}}/log">[Link]</a></td>
                </tr>
                {{end}}
            </tbody>
        </table>
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Test</th>
                    <th>Base</th>
                    <th>Patched</th>
                    <th>Verdict</th>
                </tr>
            </thead>
            <tbody>
            {{range .Tests}}
                <tr>
                    <td>{{.TestName}}</td>
                    <td>{{if .BaseBuild}}{{template "build_info" .BaseBuild}}{{end}}</td>
                    <td>{{if .PatchedBuild}}{{template "build_info" .PatchedBuild}}[patched]{{end}}</td>
                    <th>
                        {{.Result}}
                        {{if .LogURI}}
                            <a href="/sessions/{{.SessionID}}/test_logs?name={{.TestName}}" class="modal-link-raw">[Log]</a>
                        {{end}}
                        {{if .ArtifactsArchiveURI}}
                            <a href="/sessions/{{.SessionID}}/test_artifacts?name={{.TestName}}">[Artifacts]</a>
                        {{end}}
                    </th>
                </tr>
                {{if .Findings}}
                <tr>
                  <td colspan="4">
                    <table class="table mb-0">
                      <tbody>
                      {{range .Findings}}
                      <tr>
                        <td>
                          {{if not .InvalidatedAt.IsNull}}<b>[invalidated]</b>{{end}}
                          {{if .ReportURI}}
                            <a href="/findings/{{.ID}}/report" class="modal-link-raw">{{.Title}}</a>
                          {{else}}
                            {{.Title}}
                          {{end}}
                        </td>
                        <td>
                          {{if .LogURI}}<a href="/findings/{{.ID}}/log" class="modal-link-raw">[Log]</a>{{end}}
                          {{if .SyzReproURI}}<a href="/findings/{{.ID}}/syz_repro" class="modal-link-raw">[Syz Repro]</a>{{end}}
                          {{if .CReproURI}}<a href="/findings/{{.ID}}/c_repro" class="modal-link-raw">[C Repro]</a>{{end}}
                        </td>
                      </tr>
                      {{end}}
                      </tbody>
                    </table>
                  </td>
                </tr>
                {{end}}
            {{end}}
            </tbody>
        </table>
        {{end}}
    </div>
{{end}}