aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/dashboard/templates/index.html
blob: afaa87d73df7dab9086a018d9d39c8940041bbe4 (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
{{define "content"}}
    <div class="mx-3">
      <form action="{{.FilterFormURL}}">
        <div class="row align-items-center">
          <div class="col-auto col-sm-3">
            <label for="inputCc">Cc'd</label>
            <input type="text" name="cc" class="form-control mb-3" value="{{.Filter.Cc}}" id="inputCc">
          </div>
          <div class="col-auto col-sm-3">
            <label for="inputName">Patch/Series Name</label>
            <input type="text" name="name" class="form-control mb-3" value="{{.Filter.Name}}" id="inputName">
          </div>
          <div class="col-auto col-sm-3">
            <label for="inputStatus">Status</label>
            <select id="inputStatus" class="form-control mb-3" name="status">
              {{$filter := .Filter}}
              {{range .Statuses}}
                <option value="{{.Key}}" {{if eq .Key $filter.Status}} selected{{end}}>{{.Value}}</option>
              {{end}}
            </select>
          </div>
          <div class="form-check col-auto">
            <input class="form-check-input" type="checkbox" name="with_findings" value="true"
                   id="onlyWithFindings"{{if .Filter.WithFindings}} checked=""{{end}}>
            <label class="form-check-label" for="onlyWithFindings">
              Only with findings
            </label>
          </div>
          <div class="col-auto">
            <button type="submit" class="btn btn-primary">Filter</button>
          </div>
        </div>
      </form>
    </div>

    {{if or .PrevPageURL .NextPageURL}}
    <nav class="mx-3">
      <ul class="pagination">
        <li class="page-item {{if not .PrevPageURL}}disabled{{end}}">
          <a class="page-link" href="{{.PrevPageURL}}" tabindex="-1">Previous</a>
        </li>
        <li class="page-item {{if not .NextPageURL}}disabled{{end}}">
          <a class="page-link" href="{{.NextPageURL}}">Next</a>
        </li>
      </ul>
    </nav>
    {{end}}

    <table class="table">
      <thead class="thead-light">
        <tr>
          <th scope="col">Published</th>
          <th scope="col">Title</th>
          <th scope="col">Version</th>
          <th scope="col">Author</th>
          <th scope="col">Status</th>
        </tr>
      </thead>
      <tbody>
        {{range .List}}
        <tr>
          <td>{{.Series.PublishedAt.Format "2006-01-02 15:04 MST"}}</td>
          <td><a href="/series/{{.Series.ID}}">{{.Series.Title}}</a></td>
          <td>{{.Series.Version}}</td>
          <td>{{.Series.AuthorEmail}}</td>
          <td>
            {{if .Session}}
              {{.Session.Status}}
              {{if eq .Session.Status "finished"}}in {{.Session.Duration}}{{end}}
              {{if gt .Findings 0}}<br /><b>[{{.Findings}} findings]</b>{{end}}
            {{else}}
              -
            {{end}}
          </td>
        </tr>
        {{end}}
      </tbody>
    </table>
{{end}}