2024-07-05 13:32:07 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2024-07-18 15:21:22 +00:00
|
|
|
<h3>{{ object.id }}</h3>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2024-07-18 15:21:22 +00:00
|
|
|
<ul class="nav nav-tabs nav-tabs-bordered">
|
2024-07-05 13:32:07 +00:00
|
|
|
<li class="nav-items">
|
|
|
|
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#details">General details</button>
|
|
|
|
</li>
|
|
|
|
<li class="nav-items">
|
2024-07-18 15:21:22 +00:00
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#annotations">User annotations</button>
|
2024-07-05 13:32:07 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-items">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#documents">Documents</button>
|
|
|
|
</li>
|
|
|
|
<li class="nav-items">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#lots">Lots</button>
|
|
|
|
</li>
|
|
|
|
<li class="nav-items">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#components">Components</button>
|
|
|
|
</li>
|
2024-07-18 15:21:22 +00:00
|
|
|
<li class="nav-items">
|
2024-07-26 15:59:34 +00:00
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#evidences">Evidences</button>
|
2024-07-18 15:21:22 +00:00
|
|
|
</li>
|
2024-07-05 13:32:07 +00:00
|
|
|
<li class="nav-items">
|
|
|
|
<a class="nav-link" href="">Web</a>
|
|
|
|
</li>
|
2024-07-18 15:21:22 +00:00
|
|
|
</ul>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tab-content pt-2">
|
|
|
|
|
|
|
|
<div class="tab-pane fade show active" id="details">
|
|
|
|
<h5 class="card-title">Details</h5>
|
|
|
|
<div class="row mb-3">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">Phid</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ object.id }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">Type</div>
|
2024-07-19 15:40:01 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ object.type }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
2024-08-05 13:06:34 +00:00
|
|
|
{% if object.is_websnapshot %}
|
|
|
|
{% for k, v in object.last_user_evidence %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">{{ k }}</div>
|
|
|
|
<div class="col-lg-9 col-md-8">{{ v|default:"" }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Manufacturer</div>
|
2024-07-19 15:40:01 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ object.manufacturer|default:"" }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Model</div>
|
2024-07-19 15:40:01 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ object.model|default:"" }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Serial Number</div>
|
2024-07-26 15:59:34 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ object.last_evidence.doc.device.serialNumber|default:"" }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
2024-08-05 13:06:34 +00:00
|
|
|
{% endif %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="row">
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="col-lg-3 col-md-4 label">Identifiers</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
{% for chid in object.hids %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="row">
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="col">{{ chid |default:"" }}</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="tab-pane fade profile-overview" id="annotations">
|
|
|
|
<div class="btn-group dropdown ml-1 mt-1" uib-dropdown="">
|
|
|
|
<a href="{% url 'device:add_annotation' object.pk %}" class="btn btn-primary">
|
|
|
|
<i class="bi bi-plus"></i>
|
|
|
|
Add new annotation
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
2024-07-30 11:37:08 +00:00
|
|
|
<h5 class="card-title mt-2">Annotations</h5>
|
2024-07-18 15:21:22 +00:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Key</th>
|
|
|
|
<th scope="col">Value</th>
|
|
|
|
<th scope="col" data-type="date" data-format="YYYY-MM-DD hh:mm">Created on</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-07-30 11:37:08 +00:00
|
|
|
{% for a in object.get_user_annotations %}
|
2024-07-18 15:21:22 +00:00
|
|
|
<tr>
|
|
|
|
<td>{{ a.key }}</td>
|
|
|
|
<td>{{ a.value }}</td>
|
|
|
|
<td>{{ a.created }}</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade profile-overview" id="lots">
|
2024-07-18 15:21:22 +00:00
|
|
|
{% for tag in lot_tags %}
|
|
|
|
<h5 class="card-title">{{ tag }}</h5>
|
2024-07-05 13:32:07 +00:00
|
|
|
|
2024-07-31 11:21:54 +00:00
|
|
|
{% for lot in object.lots %}
|
2024-07-18 15:21:22 +00:00
|
|
|
{% if lot.type == tag %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="row">
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="col">
|
|
|
|
<a href="{% url 'dashboard:lot' lot.id %}">{{ lot.name }}</a>
|
|
|
|
</div>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab-pane fade profile-overview" id="documents">
|
|
|
|
<div class="btn-group dropdown ml-1 mt-1" uib-dropdown="">
|
2024-07-30 11:37:08 +00:00
|
|
|
<a href="{% url 'device:add_document' object.pk %}" class="btn btn-primary">
|
|
|
|
|
2024-07-05 13:32:07 +00:00
|
|
|
<i class="bi bi-plus"></i>
|
|
|
|
Add new document
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2024-07-30 11:37:08 +00:00
|
|
|
<h5 class="card-title mt-2">Documents</h5>
|
|
|
|
<table class="table table-striped">
|
2024-07-05 13:32:07 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-07-30 11:37:08 +00:00
|
|
|
<th scope="col">Key</th>
|
|
|
|
<th scope="col">Value</th>
|
|
|
|
<th scope="col" data-type="date" data-format="YYYY-MM-DD hh:mm">Created on</th>
|
2024-07-05 13:32:07 +00:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-07-30 11:37:08 +00:00
|
|
|
{% for a in object.get_user_documents %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ a.key }}</td>
|
|
|
|
<td>{{ a.value }}</td>
|
|
|
|
<td>{{ a.created }}</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2024-07-05 13:32:07 +00:00
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab-pane fade profile-overview" id="components">
|
2024-07-26 15:59:34 +00:00
|
|
|
<h5 class="card-title">Components last evidence</h5>
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="list-group col-6">
|
2024-09-25 10:51:08 +00:00
|
|
|
{% for c in object.components %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="list-group-item">
|
|
|
|
<div class="d-flex w-100 justify-content-between">
|
2024-07-18 15:21:22 +00:00
|
|
|
<h5 class="mb-1">{{ c.type }}</h5>
|
2024-07-26 15:59:34 +00:00
|
|
|
<small class="text-muted">{{ evidence.created }}</small>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
<p class="mb-1">
|
2024-07-18 15:21:22 +00:00
|
|
|
{{ c.manufacturer }}<br />
|
|
|
|
{{ c.model }}<br />
|
|
|
|
{{ c.serialNumber }}<br />
|
2024-07-05 13:32:07 +00:00
|
|
|
</p>
|
|
|
|
<small class="text-muted">
|
|
|
|
</small>
|
|
|
|
</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-07-26 15:59:34 +00:00
|
|
|
<div class="tab-pane fade profile-overview" id="evidences">
|
|
|
|
<h5 class="card-title">List of evidences</h5>
|
2024-07-18 15:21:22 +00:00
|
|
|
<div class="list-group col-6">
|
2024-07-26 15:59:34 +00:00
|
|
|
{% for snap in object.evidences %}
|
2024-07-05 13:32:07 +00:00
|
|
|
<div class="list-group-item">
|
|
|
|
<div class="d-flex w-100 justify-content-between">
|
2024-07-18 15:21:22 +00:00
|
|
|
<h5 class="mb-1"></h5>
|
|
|
|
<small class="text-muted">{{ snap.created }}</small>
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
<p class="mb-1">
|
2024-07-31 17:24:22 +00:00
|
|
|
<a href="{% url 'evidence:details' snap.uuid %}">{{ snap.uuid }}</a>
|
2024-07-05 13:32:07 +00:00
|
|
|
</p>
|
|
|
|
<small class="text-muted">
|
|
|
|
</small>
|
|
|
|
</div>
|
2024-07-18 15:21:22 +00:00
|
|
|
{% endfor %}
|
2024-07-05 13:32:07 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|