Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b6f0e019

Přidáno uživatelem Matěj Zeman před téměř 3 roky(ů)

re #9575 Filtering Over logs and devices.

Zobrazit rozdíly:

server/templates/devices/devices.html
3 3
    <title>Devices Details</title>
4 4
</head>
5 5
<body>
6
<form action="" method="get">
7
  <label for="view">Choose view:</label>
8
  <select id="view" name="view" onchange="this.form.action=this.value;">
9
      <option value=""></option>
10
      <option value="/api/v1/logs-web">Logs</option>
11
      <option value="/api/v1/devices-web">Devices</option>
12
      <option value="/api/v1/teams-web">Teams</option>
13
      <option value="/api/v1/pcs-web">PCs</option>
14
  </select>
15
  <input type="submit" value="OK">
16
</form>
17
<form action="/api/v1/devices-web" method="post">
18
    <label for="lic">License:</label>
19
    <input id="lic" name="lic" type="text" list="licenses" value="" placeholder="all">
20
    <datalist id="licenses">
21
        {% for license in licenses %}
22
        <option value="{{license.name}}"></option>
23
        {% endfor %}
24
    </datalist>
25
  <input type="submit" value="Filter">
26
</form>
6 27
<table>
7 28
    <TR>
8 29
        <TH>ID</TH>
9 30
        <TH>Vendor ID</TH>
10 31
        <TH>Product ID</TH>
11 32
        <TH>Serial Number</TH>
33
        <TH>Licenses</TH>
12 34
    </TR>
13 35
    {% for device in devs %}
14 36
    <TR>
......
16 38
        <TD class="Vendor ID">{{device.vendor_id}}</TD>
17 39
        <TD class="Product ID">{{device.product_id}}</TD>
18 40
        <TD class="Serial Number">{{device.serial_number}}</TD>
41
        <TD class="License">
42
            {% for lic in device.licenses %}
43
                {{lic.licenses.name}}<BR>
44
            {% endfor %}
45
        </TD>
19 46
    </TR>
20 47
    {% endfor %}
21 48
</table>

Také k dispozici: Unified diff