network_inventory/computers/templates/computers/computer_details.html

157 lines
5.0 KiB
HTML
Raw Normal View History

2020-01-11 17:41:03 +01:00
{% extends "core/base.html" %}
2020-02-16 14:20:06 +01:00
{% block section_title %}{{ device }}{% endblock %}
2017-12-25 13:38:31 +01:00
{% block content %}
2020-02-25 21:53:57 +01:00
<div class="row">
<div class="col">
2020-02-16 14:20:06 +01:00
{% block device_details %}
2020-02-16 14:47:29 +01:00
{% include "devices/device_details_block.html" %}
2020-02-16 14:20:06 +01:00
{% endblock %}
2020-02-25 20:25:20 +01:00
</div>
2020-02-16 14:20:06 +01:00
<div class="col">
2020-02-16 14:20:06 +01:00
{% block warranty %}
{% include "devices/warranty_block.html" %}
{% endblock %}
2020-02-25 20:25:20 +01:00
</div>
2020-02-16 14:20:06 +01:00
<div class="col">
2020-02-16 14:47:56 +01:00
{% block ips %}
{% include "devices/ip_block.html" %}
{% endblock %}
2020-02-25 20:25:20 +01:00
</div>
2020-02-25 21:53:57 +01:00
</div>
2020-02-25 20:25:20 +01:00
2020-02-27 22:13:36 +01:00
<div class="row">
{% if device.os or software_relations or backup_relations or license_list or device.host %}
<div class="col">
<div class="card mt-3">
<div class="card-body">
{% if device.host %}
<h2>Host</h2>
<ul>
<li><a href="{% url 'computer' device.host.id %}">{{ device.host }}</a></li>
</ul>
{% endif %}
2020-02-16 14:47:56 +01:00
{% if device.os %}
<h2>Operating System</h2>
<ul>
<li>{{ device.os }}</li>
</ul>
{% endif %}
2020-02-16 14:20:06 +01:00
{% if software_relations %}
<h2>Software</h2>
<ul>
{% for relation in software_relations %}
<li>{{ relation.software }}</li>
{% endfor %}
</ul>
{% endif %}
2020-02-16 14:20:06 +01:00
{% if license_list %}
{% block license %}
{% include "licenses/license_block.html" %}
{% endblock %}
{% endif %}
2020-02-16 14:20:06 +01:00
{% if backup_relations %}
<h2>Backup</h2>
<ul>
{% for backup in backup_relations %}
<li><a href="{% url 'backup' backup.id %}">{{ backup }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
2019-08-02 13:39:14 +02:00
</div>
{% endif %}
2019-08-02 14:19:08 +02:00
2020-04-30 15:40:00 +02:00
{% if cpu_relations or gpu_relations or ram_relations or disks_relations or raid_disk_pairs %}
<div class="col">
<div class="card mt-3">
<h2 class="card-header">Hardware</h2>
<div class="card-body">
2020-04-30 15:40:00 +02:00
{% if cpu_relations or gpu_relations or ram_relations or disks_relations or device.host %}
<table class="table table-bordered">
{% if cpu_relations %}
<tr>
<td><b>CPUs:</b></td>
<td>
{% for cpu in cpu_relations %}
{{ cpu.amount }}x {{ cpu.cpu }}<br>
{% endfor %}
</td>
2020-04-30 15:40:00 +02:00
</tr>
{% endif %}
{% if gpu_relations %}
<tr>
<td><b>GPUs:</b></td>
<td>
{% for gpu in gpu_relations %}
{{ gpu.amount }}x {{ gpu.gpu }}<br>
{% endfor %}
</td>
</tr>
{% endif %}
2020-02-16 14:20:06 +01:00
{% if ram_relations %}
<tr>
<td><b>RAM Modules:</b></td>
<td>
{% for module in ram_relations %}
{{ module.amount }}x {{ module.ram }}<br>
{% endfor %}
</td>
</tr>
{% endif %}
2019-08-02 14:19:08 +02:00
{% if disks_relations %}
<tr>
<td><b>Disks:</b></td>
<td>
{% for disk in disks_relations %}
{{ disk.amount }}x {{ disk.disk }}<br>
{% endfor %}
</td>
</tr>
{% endif %}
</table>
{% endif %}
2019-08-02 14:19:08 +02:00
{% if raid_disk_pairs %}
<h3>RAID</h3>
{% for raid, disks in raid_disk_pairs.items %}
<table class="table table-bordered">
<tr>
<td><b>Type:</b></td>
<td>{{ raid.raid_type }}</td>
</tr>
<tr>
<td><b>Usable Space</b></td>
<td>{{ raid.usable_space }}</td>
</tr>
{% if disks %}
{% for disk in disks %}
<tr>
<td><b>Disk Type</b></td>
<td>{{ disk.disk }}</td>
</tr>
<tr>
<td><b>Amount</b></td>
<td>{{ disk.disk_amount }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
{% endfor %}
{% endif %}
</div>
</div>
2019-08-02 13:39:14 +02:00
</div>
</div>
2020-04-30 15:44:52 +02:00
{% endif %}
2017-12-25 13:38:31 +01:00
{% endblock %}