Merge pull request 'add shortid and refactor unassigned devices table' (#5) from tau_shortid into tau
Reviewed-on: #5
This commit is contained in:
commit
76457893f5
|
@ -33,7 +33,19 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" data-sortable="">
|
<th scope="col" data-sortable="">
|
||||||
<a class="dataTable-sorter" href="#">Title</a>
|
select
|
||||||
|
</th>
|
||||||
|
<th scope="col" data-sortable="">
|
||||||
|
shortid
|
||||||
|
</th>
|
||||||
|
<th scope="col" data-sortable="">
|
||||||
|
type
|
||||||
|
</th>
|
||||||
|
<th scope="col" data-sortable="">
|
||||||
|
manufacturer
|
||||||
|
</th>
|
||||||
|
<th scope="col" data-sortable="">
|
||||||
|
model
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -45,9 +57,18 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'device:details' dev.id %}">
|
<a href="{% url 'device:details' dev.id %}">
|
||||||
{{ dev.type }} {{ dev.manufacturer }} {{ dev.model }}
|
{{ dev.shortid }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ dev.type }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ dev.manufacturer }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ dev.model }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Device:
|
||||||
# the id is the chid of the device
|
# the id is the chid of the device
|
||||||
self.id = kwargs["id"]
|
self.id = kwargs["id"]
|
||||||
self.pk = self.id
|
self.pk = self.id
|
||||||
|
self.shortid = self.pk[:6]
|
||||||
self.algorithm = None
|
self.algorithm = None
|
||||||
self.owner = None
|
self.owner = None
|
||||||
self.annotations = []
|
self.annotations = []
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h3>{{ object.id }}</h3>
|
<h3>{{ object.shortid }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue