summaryrefslogtreecommitdiff
path: root/gae/webapp/static/device.html
blob: 87c309bd51cc64c71fea92e07b32c036bec9508c (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
<!DOCTYPE html>
{% autoescape true %}
<html>
  <head>
    <!-- [START css] -->
    <link type="text/css" rel="stylesheet" href="/bootstrap/css/bootstrap.css">
    <link type="text/css" rel="stylesheet" href="/bootstrap/css/bootstrap-responsive.css">
    <!-- [END css] -->
    <style type="text/css">
      body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
      }
      blockquote {
        margin-bottom: 10px;
        border-left-color: #bbb;
      }
      form {
        margin-top: 10px;
      }
      .form-signin input[type="text"] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }
      .row {
        margin-left: 0px;
        margin-top: 10px;
        overflow: scroll;
      }
    </style>
  </head>
  <body>
    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse"
               data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="#">VTS Test Scheduler</a>
           <a class="brand" href="/result">Result</a>
           <a class="brand" href="/build">Build</a>
           <a class="brand" href="/schedule">Schedule</a>
           <a class="brand" href="/device">Device &amp; Lab</a>
           <a class="brand" href="/job">Job Queue</a>
          <div class="nav-collapse collapse pull-right">
            <a href="{{ url|safe }}" class="btn">{{ url_linktext }}</a>
          </div>
        </div>
      </div>
    </div>
    <div class="container">
      <h1>Device List</h1>
      <!-- [START greetings] -->
      Now: {{ now }}
      <table border=1>
      <tr>
        <td>#
        <td>Host
        <td>Product
        <td>Serial
        <td>Status
        <td>Scheduling Status
        <td>Timestamp
      </tr>
      {% set index = 1 %}
      {% for device in devices %}
      <tr>
        <td>
          {{ index }}
          {% set index = index + 1 %}
        <td>
          {{ device.hostname }}
        <td>
          {{ device.product }}
        <td>
          {{ device.serial }}
        <td>
          {{ {0: "unknown",
              1: "fastboot",
              2: "online",
              3: "ready",
              4: "use",
              5: "error",
              6: "no-response"}[device.status] | default("status key error") }}
        <td>
          {{ {0: "free",
              1: "reserved",
              2: "use"}[device.scheduling_status] | default("status key error") }}
        <td>
          {{ device.timestamp }}
      </tr>
      {% endfor %}
      </table>
      <!-- [END greetings] -->
      <h1>Lab List</h1>
      <!-- [START greetings] -->
      <table border=1>
      <tr>
        <td>#
        <td>Name
        <td>Owner
        <td>Hostname
        <td>IP
        <td>Script
      </tr>
      {% set index = 1 %}
      {% for lab in labs %}
      <tr>
        <td>
          {{ index }}
          {% set index = index + 1 %}
        <td>
          {{ lab.name }}
        <td>
          {{ lab.owner }}
        <td>
          {{ lab.hostname }}
        <td>
          {{ lab.ip }}
        <td>
          {{ lab.script }}
      </tr>
      {% endfor %}
      </table>
      <hr>
    </div>
  </body>
</html>
{% endautoescape %}