Revize 35168e5f
Přidáno uživatelem Matěj Zeman před téměř 3 roky(ů)
server/templates/devices/devices.html | ||
---|---|---|
1 | 1 |
<html> |
2 | 2 |
<head> |
3 |
<style> |
|
4 |
#devices { |
|
5 |
font-family: Arial, Helvetica, sans-serif; |
|
6 |
border-collapse: collapse; |
|
7 |
width: 100%; |
|
8 |
} |
|
9 |
|
|
10 |
#devices td, #devices th { |
|
11 |
border: 1px solid #ddd; |
|
12 |
padding: 8px; |
|
13 |
} |
|
14 |
|
|
15 |
#devices tr:nth-child(even){background-color: #f2f2f2;} |
|
16 |
|
|
17 |
#devices tr:hover {background-color: #ddd;} |
|
18 |
|
|
19 |
#devices th { |
|
20 |
padding-top: 12px; |
|
21 |
padding-bottom: 12px; |
|
22 |
text-align: left; |
|
23 |
background-color: #47BBF5; |
|
24 |
color: black; |
|
25 |
} |
|
26 |
</style> |
|
3 | 27 |
<title>Devices Details</title> |
4 | 28 |
</head> |
5 | 29 |
<body> |
... | ... | |
22 | 46 |
<form action="" method="get"> |
23 | 47 |
<label for="view">Choose view:</label> |
24 | 48 |
<select id="view" name="view" onchange="this.form.action=this.value;"> |
25 |
<option value=""></option> |
|
26 |
<option value="/logs-web">Logs</option> |
|
27 |
<option value="/ldlogs-web">LD Logs</option> |
|
28 |
<option value="/devices-web">Devices</option> |
|
49 |
<option value="/logs-web">Vector Logs</option> |
|
50 |
<option value="/ldlogs-web">Lauterbach Logs</option> |
|
51 |
<option value="/devices-web" selected>Devices</option> |
|
29 | 52 |
<option value="/body-devices-web">Body Devices</option> |
30 | 53 |
<option value="/teams-web">Teams</option> |
31 | 54 |
<option value="/pcs-web">PCs</option> |
... | ... | |
35 | 58 |
<input type="submit" value="OK"> |
36 | 59 |
</form> |
37 | 60 |
<form action="/devices-web" method="post"> |
38 |
<label for="lic">License:</label> |
|
39 |
<input id="lic" name="lic" type="text" list="licenses" value="" placeholder="all"> |
|
40 |
<datalist id="licenses"> |
|
61 |
<label for="keyman_id">Keyman ID:</label> |
|
62 |
<input id="keyman_id" name="keyman_id" type="text" list="keyman_ids" value="" placeholder="all"> |
|
63 |
<datalist id="keyman_ids"> |
|
64 |
{% for dev in devs %} |
|
65 |
<option value="{{dev.serial_number}}"></option> |
|
66 |
{% endfor %} |
|
67 |
</datalist> |
|
68 |
<label for="lic_name">License Name:</label> |
|
69 |
<input id="lic_name" name="lic_name" type="text" list="licenses_names" value="" placeholder="all"> |
|
70 |
<datalist id="licenses_names"> |
|
41 | 71 |
{% for license in licenses %} |
42 | 72 |
<option value="{{license.name}}"></option> |
43 | 73 |
{% endfor %} |
44 | 74 |
</datalist> |
75 |
<label for="lic_id">License ID:</label> |
|
76 |
<input id="lic_id" name="lic_id" type="text" list="licenses_ids" value="" placeholder="all"> |
|
77 |
<datalist id="licenses_ids"> |
|
78 |
{% for license in licenses %} |
|
79 |
<option value="{{license.license_id}}"></option> |
|
80 |
{% endfor %} |
|
81 |
</datalist> |
|
82 |
<label for="team">Team:</label> |
|
83 |
<input id="team" name="team" type="text" list="teams" value="" placeholder="all"> |
|
84 |
<datalist id="teams"> |
|
85 |
{% for team in teams %} |
|
86 |
<option value="{{team.name}}">{{team.name}}</option> |
|
87 |
{% endfor %} |
|
88 |
</datalist> |
|
45 | 89 |
<input type="submit" value="Filter"> |
46 | 90 |
</form> |
47 |
<table> |
|
91 |
<table id="devices">
|
|
48 | 92 |
<TR> |
49 | 93 |
<TH>ID</TH> |
50 |
<TH>Vendor ID</TH> |
|
51 |
<TH>Product ID</TH> |
|
52 |
<TH>Serial Number</TH> |
|
53 |
<TH>Licenses</TH> |
|
94 |
<TH>Keyman ID</TH> |
|
95 |
<TH>License Type</TH> |
|
96 |
<TH>License ID</TH> |
|
97 |
<TH>Inventory Number</TH> |
|
98 |
<TH>Team</TH> |
|
99 |
<TH>Last Username</TH> |
|
100 |
<TH>Last Hostname</TH> |
|
101 |
<TH>Last Detection</TH> |
|
54 | 102 |
<TH>Status</TH> |
103 |
<TH>Comment</TH> |
|
55 | 104 |
</TR> |
56 |
{% for i in range(devs) %}
|
|
105 |
{% for dev in devices %}
|
|
57 | 106 |
<TR> |
58 |
<TD class="ID"><a href="/device-license/{{devices[i].id}}">{{devices[i].id}}</a></TD> |
|
59 |
<TD class="Vendor ID">{{devices[i].vendor_id}}</TD> |
|
60 |
<TD class="Product ID">{{devices[i].product_id}}</TD> |
|
61 |
<TD class="Serial Number">{{devices[i].serial_number}}</TD> |
|
62 |
<TD class="License"> |
|
63 |
{% for lic in devices[i].licenses %} |
|
64 |
{{lic.licenses.name}}<BR> |
|
65 |
{% endfor %} |
|
66 |
</TD> |
|
67 |
<TD class="Status">{{statuses[i]}}</TD> |
|
107 |
<TD class="ID"><a href="/device-license/{{dev['device'].id}}">{{dev['device'].id}}</a></TD> |
|
108 |
<TD class="Serial Number">{{dev['device'].serial_number}}</TD> |
|
109 |
<TD class="License">{{dev['license'].name}}</TD> |
|
110 |
<TD class="License ID">{{dev['license'].license_id}}</TD> |
|
111 |
<TD class="Inventory Number">{{dev['device'].inventory_number}}</TD> |
|
112 |
<TD class="Team">{{dev['device'].team.name}}</TD> |
|
113 |
<TD class="Last Username">{{dev['log'].pc.username}}</TD> |
|
114 |
<TD class="Last Hostname">{{dev['log'].pc.hostname}}</TD> |
|
115 |
<TD class="Last Detection">{{dev['log'].timestamp}}</TD> |
|
116 |
<TD class="Status">{{dev['log'].status}}</TD> |
|
117 |
<TD class="Comment">{{dev['device'].comment}}</TD> |
|
68 | 118 |
</TR> |
69 | 119 |
{% endfor %} |
70 |
<TR> |
|
71 |
<TD class="ID"></TD> |
|
72 |
<TD class="Vendor ID"></TD> |
|
73 |
<TD class="Product ID"></TD> |
|
74 |
<TD class="Serial Number"></TD> |
|
75 |
<TD class="License"> |
|
76 |
<form action="/license-create" method="get"> |
|
77 |
<input type="submit" value="Add"> |
|
78 |
</form> |
|
79 |
</TD> |
|
80 |
</TR> |
|
81 | 120 |
</table> |
82 | 121 |
</body> |
83 | 122 |
</html> |
Také k dispozici: Unified diff
Fixed minor issues. View on keyman devices changed. Changed database for new keyman x license connection.