2022-01-13 15:08:55 +00:00
|
|
|
{% extends "ereuse_devicehub/base_site.html" %}
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
<div class="pagetitle">
|
|
|
|
<h1>Inventory</h1>
|
|
|
|
<nav>
|
|
|
|
<ol class="breadcrumb">
|
2022-03-15 13:33:27 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('inventory.devicelist')}}">Inventory</a></li>
|
2022-02-02 11:21:30 +00:00
|
|
|
<li class="breadcrumb-item active">{{ page_title }}</li>
|
2022-01-13 15:08:55 +00:00
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div><!-- End Page Title -->
|
|
|
|
|
|
|
|
<section class="section profile">
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-xl-12">
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body pt-3">
|
2022-08-11 07:51:17 +00:00
|
|
|
<h3>{{ placeholder.device.devicehub_id }}</h3>
|
2022-08-12 10:28:48 +00:00
|
|
|
<div class="tab-pane active show mb-5">
|
2022-08-30 11:10:35 +00:00
|
|
|
<div class="btn-group dropdown" uib-dropdown="" style="float: right; margin-right: 15px;">
|
|
|
|
<button id="btnUniqueID" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
|
<i class="bi bi-tag"></i>
|
|
|
|
Unique Identifiers (Tags)
|
|
|
|
</button>
|
|
|
|
<span class="d-none" id="unlinkTagAlertModal" data-bs-toggle="modal" data-bs-target="#unlinkTagErrorModal"></span>
|
|
|
|
<span class="d-none" id="addTagAlertModal" data-bs-toggle="modal" data-bs-target="#addingTagModal"></span>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="btnUniqueID">
|
|
|
|
<li>
|
|
|
|
<a href="javascript:addTag()" class="dropdown-item">
|
|
|
|
<i class="bi bi-plus"></i>
|
|
|
|
Add Unique Identifier
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="{{ url_for('inventory.tag_devices_del', dhid=placeholder.device.devicehub_id) }}" class="dropdown-item">
|
|
|
|
<i class="bi bi-x"></i>
|
|
|
|
Remove Unique Identifier
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2022-08-12 10:28:48 +00:00
|
|
|
{% if placeholder.status in ['Abstract', 'Real'] %}
|
2022-08-12 13:59:15 +00:00
|
|
|
<a type="button" href="{{ url_for('inventory.binding_search', dhid=placeholder.device.devicehub_id) }}" class="btn btn-primary" style="float: right; margin-right: 15px;">
|
2022-08-12 10:28:48 +00:00
|
|
|
Binding
|
|
|
|
</a>
|
|
|
|
{% elif placeholder.status == 'Twin' %}
|
|
|
|
<a type="button" href="{{ url_for('inventory.unbinding', phid=placeholder.phid) }}" class="btn btn-primary" style="float: right; margin-right: 15px;">
|
|
|
|
Unbinding
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<div style="display: block;"></div>
|
2022-08-30 11:10:35 +00:00
|
|
|
|
2022-08-12 10:28:48 +00:00
|
|
|
</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
<!-- Bordered Tabs -->
|
|
|
|
<ul class="nav nav-tabs nav-tabs-bordered">
|
|
|
|
|
|
|
|
<li class="nav-item">
|
2022-08-11 07:51:17 +00:00
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#details">General details</button>
|
2022-01-13 15:08:55 +00:00
|
|
|
</li>
|
2022-07-15 14:47:39 +00:00
|
|
|
|
2022-05-05 10:00:40 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{ device.public_link }}" target="_blank">Web</a>
|
|
|
|
</li>
|
|
|
|
|
2022-05-05 10:31:29 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#lots">Lots</button>
|
|
|
|
</li>
|
|
|
|
|
2022-01-13 15:08:55 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#status">Status</button>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#traceability">Traceability log</button>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#components">Components</button>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<div class="tab-content pt-2">
|
|
|
|
|
2022-08-12 13:59:15 +00:00
|
|
|
<div class="tab-pane fade show active" id="details">
|
2022-09-12 09:37:34 +00:00
|
|
|
<h5 class="card-title">Details Real part</h5>
|
2022-08-08 16:09:25 +00:00
|
|
|
<div class="row mb-3">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">
|
2022-08-11 07:51:17 +00:00
|
|
|
(<a href="{{ url_for('inventory.device_edit', id=placeholder.device.devicehub_id)}}">Edit Device</a>)
|
2022-08-08 16:09:25 +00:00
|
|
|
</div>
|
2022-08-11 12:50:47 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.status }}</div>
|
2022-08-08 16:09:25 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">Phid</div>
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.phid }}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">Type</div>
|
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.device.type }}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Manufacturer</div>
|
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.device.manufacturer or ''}}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Model</div>
|
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.device.model or ''}}</div>
|
2022-08-08 16:09:25 +00:00
|
|
|
</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Serial Number</div>
|
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.device.serial_number or ''}}</div>
|
|
|
|
</div>
|
|
|
|
|
2022-08-11 12:50:47 +00:00
|
|
|
{% if placeholder.binding %}
|
2022-09-12 09:37:34 +00:00
|
|
|
<h5 class="card-title">Details Abstract part</h5>
|
2022-01-13 15:08:55 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label ">Type</div>
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.binding.type }}</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Manufacturer</div>
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.binding.manufacturer or ''}}</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Model</div>
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.binding.model or ''}}</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4 label">Serial Number</div>
|
2022-08-11 07:51:17 +00:00
|
|
|
<div class="col-lg-9 col-md-8">{{ placeholder.binding.serial_number or ''}}</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
2022-08-11 12:50:47 +00:00
|
|
|
{% endif %}
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
|
2022-05-05 10:31:29 +00:00
|
|
|
<div class="tab-pane fade profile-overview" id="lots">
|
|
|
|
<h5 class="card-title">Incoming Lots</h5>
|
|
|
|
|
|
|
|
<div class="row">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% for lot in placeholder.device.lots %}
|
2022-05-05 10:31:29 +00:00
|
|
|
{% if lot.is_incoming %}
|
|
|
|
<div class="col">
|
|
|
|
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
|
|
|
<span>{{ lot.name }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h5 class="card-title">Outgoing Lots</h5>
|
|
|
|
|
|
|
|
<div class="row">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% for lot in placeholder.device.lots %}
|
2022-05-05 10:31:29 +00:00
|
|
|
{% if lot.is_outgoing %}
|
|
|
|
<div class="col">
|
|
|
|
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
|
|
|
<span>{{ lot.name }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h5 class="card-title">Temporary Lots</h5>
|
|
|
|
|
|
|
|
<div class="row">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% for lot in placeholder.device.lots %}
|
2022-05-05 10:31:29 +00:00
|
|
|
{% if lot.is_temporary %}
|
|
|
|
<div class="col">
|
|
|
|
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
|
|
|
<span>{{ lot.name }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-01-13 15:08:55 +00:00
|
|
|
<div class="tab-pane fade profile-overview" id="status">
|
|
|
|
<h5 class="card-title">Status Details</h5>
|
|
|
|
<div class="row">
|
2022-05-13 11:06:04 +00:00
|
|
|
<div class="col-lg-3 col-md-4 label">Physical State</div>
|
2022-05-13 11:11:00 +00:00
|
|
|
<div class="col-lg-9 col-md-8">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% if placeholder.device.physical_status %}
|
|
|
|
{{ placeholder.device.physical_status.type }}
|
2022-05-13 11:11:00 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2022-05-13 15:16:08 +00:00
|
|
|
<div class="col-lg-3 col-md-4 label">Lifecycle State</div>
|
2022-05-13 11:11:00 +00:00
|
|
|
<div class="col-lg-9 col-md-8">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% if placeholder.device.status %}
|
|
|
|
{{ placeholder.device.status.type }}
|
2022-05-13 11:11:00 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2022-05-13 15:16:08 +00:00
|
|
|
<div class="col-lg-3 col-md-4 label">Allocated State</div>
|
2022-05-13 11:11:00 +00:00
|
|
|
<div class="col-lg-9 col-md-8">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% if placeholder.device.allocated_status %}
|
|
|
|
{{ placeholder.device.allocated_status.type }}
|
2022-05-13 11:11:00 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab-pane fade profile-overview" id="traceability">
|
|
|
|
<h5 class="card-title">Traceability log Details</h5>
|
|
|
|
<div class="list-group col-6">
|
2022-08-11 07:51:17 +00:00
|
|
|
{% for action in placeholder.actions %}
|
2022-01-13 15:08:55 +00:00
|
|
|
<div class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
|
{{ action.type }} {{ action.severity }}
|
|
|
|
<small class="text-muted">{{ action.created.strftime('%H:%M %d-%m-%Y') }}</small>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab-pane fade profile-overview" id="components">
|
2022-09-12 09:37:34 +00:00
|
|
|
<h5 class="card-title">Components Real part</h5>
|
2022-01-13 15:08:55 +00:00
|
|
|
<div class="list-group col-6">
|
2022-08-11 12:50:47 +00:00
|
|
|
{{ placeholder.components or '' }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if placeholder.binding %}
|
2022-09-12 09:37:34 +00:00
|
|
|
<h5 class="card-title">Components Abstract part</h5>
|
2022-08-11 12:50:47 +00:00
|
|
|
<div class="list-group col-6">
|
|
|
|
{% for component in placeholder.binding.components|sort(attribute='type') %}
|
2022-01-13 15:08:55 +00:00
|
|
|
<div class="list-group-item">
|
|
|
|
<div class="d-flex w-100 justify-content-between">
|
|
|
|
<h5 class="mb-1">{{ component.type }}</h5>
|
|
|
|
<small class="text-muted">{{ component.created.strftime('%H:%M %d-%m-%Y') }}</small>
|
|
|
|
</div>
|
|
|
|
<p class="mb-1">
|
|
|
|
{{ component.manufacturer }}<br />
|
|
|
|
{{ component.model }}<br />
|
|
|
|
</p>
|
|
|
|
<small class="text-muted">
|
|
|
|
{% if component.type in ['RamModule', 'HardDrive', 'SolidStateDrive'] %}
|
|
|
|
{{ component.size }}MB
|
|
|
|
{% endif %}
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2022-08-09 08:49:56 +00:00
|
|
|
{% endif %}
|
2022-01-13 15:08:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2022-08-30 11:10:35 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
function addTag() {
|
|
|
|
const devices_id = [{{ placeholder.device.id }}];
|
|
|
|
if (devices_id.length == 1) {
|
|
|
|
$("#addingTagModal .pol").hide();
|
|
|
|
$("#addingTagModal .btn-primary").show();
|
|
|
|
} else {
|
|
|
|
$("#addingTagModal .pol").show();
|
|
|
|
$("#addingTagModal .btn-primary").hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#addTagAlertModal").click();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% include "inventory/addDevicestag.html" %}
|
2022-01-13 15:08:55 +00:00
|
|
|
{% endblock main %}
|