network_inventory/computers/templates/computers/computer_details.html

133 lines
3.2 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 %}
2019-08-02 13:39:14 +02:00
<div class="ui cards">
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 %}
{% block warranty %}
{% include "devices/warranty_block.html" %}
{% endblock %}
{% if device.os or software_relations or backup_relations or license_list %}
2019-08-02 13:39:14 +02:00
<div class="card">
<div class="content">
2020-02-16 14:20:06 +01:00
{% if device.os %}
<div class="header">Operating System</div>
<ul>
<li>{{ device.os }}</li>
</ul>
{% endif %}
2020-01-12 16:55:16 +01:00
{% if software_relations %}
2019-08-02 13:39:14 +02:00
<div class="header">Software</div>
<ul>
2020-01-12 16:55:16 +01:00
{% for relation in software_relations %}
<li>{{ relation.software }}</li>
{% endfor %}
</ul>
2019-08-02 14:31:55 +02:00
{% endif %}
2020-02-16 14:20:06 +01:00
2020-01-12 16:55:16 +01:00
{% if license_list %}
2020-02-16 14:20:06 +01:00
{% block license %}
{% include "licenses/license_block.html" %}
{% endblock %}
{% endif %}
2020-02-16 14:20:06 +01:00
2020-01-12 16:55:16 +01:00
{% if backup_relations %}
2019-08-02 14:31:55 +02:00
<div class="header">Backup</div>
<ul>
2020-01-12 16:55:16 +01:00
{% for backup in backup_relations %}
2019-08-02 14:31:55 +02:00
<li><a href="{% url 'backup' backup.id %}">{{ backup }}</a></li>
{% endfor %}
</ul>
{% endif %}
2019-08-02 13:39:14 +02:00
</div>
</div>
{% endif %}
2019-08-02 14:19:08 +02:00
2020-02-16 14:20:06 +01:00
{% if cpu_relations or ram_relations or disks_relations or raid_disk_pairs or device.host %}
2019-08-02 13:39:14 +02:00
<div class="card">
<div class="content">
2020-02-16 14:20:06 +01:00
{% if cpu_relations or ram_relations or disks_relations or device.host %}
2019-08-02 13:39:14 +02:00
<div class="header">Hardware</div>
<table class="ui celled table">
2020-02-16 14:20:06 +01:00
2020-01-12 16:55:16 +01:00
{% if cpu_relations %}
<tr>
2020-01-03 03:30:31 +01:00
<td><b>CPUs:</b></td>
<td>
2020-01-12 16:55:16 +01:00
{% for cpu in cpu_relations %}
{{ cpu.amount }}x {{ cpu.cpu }}<br>
2019-06-16 22:54:25 +02:00
{% endfor %}
</td>
</tr>
2019-06-16 22:54:25 +02:00
{% endif %}
2020-02-16 14:20:06 +01:00
2020-01-12 16:55:16 +01:00
{% if ram_relations %}
<tr>
2020-01-03 03:30:31 +01:00
<td><b>RAM Modules:</b></td>
<td>
2020-01-12 16:55:16 +01:00
{% for module in ram_relations %}
{{ module.amount }}x {{ module.ram }}<br>
2019-06-16 22:54:25 +02:00
{% endfor %}
</td>
</tr>
2019-06-16 22:54:25 +02:00
{% endif %}
2020-02-16 14:20:06 +01:00
2020-01-12 16:55:16 +01:00
{% if disks_relations %}
<tr>
2020-01-03 03:30:31 +01:00
<td><b>Disks:</b></td>
<td>
2020-01-12 16:55:16 +01:00
{% 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
2020-01-03 03:29:44 +01:00
{% if raid_disk_pairs %}
2019-08-02 13:39:14 +02:00
<div class="header">RAID</div>
2020-01-03 03:29:44 +01:00
{% for raid, disks in raid_disk_pairs.items %}
2019-08-02 13:39:14 +02:00
<table class="ui celled table">
<tr>
2020-01-03 03:30:31 +01:00
<td><b>Type:</b></td>
<td>{{ raid.raid_type }}</td>
</tr>
<tr>
2020-01-03 03:30:31 +01:00
<td><b>Usable Space</b></td>
2020-01-03 03:30:41 +01:00
<td>{{ raid.usable_space }}</td>
</tr>
2020-01-03 03:29:44 +01:00
{% 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 %}
2019-08-02 14:19:08 +02:00
2020-02-16 14:20:06 +01:00
{% if device.host %}
2019-08-02 14:19:08 +02:00
<div class="header">Host</div>
<div class="description">
2020-02-16 14:20:06 +01:00
<a href="{% url 'device' device.host.id %}">{{ device.host }}</a>
2019-08-02 14:19:08 +02:00
</div>
2017-12-28 01:20:05 +01:00
{% endif %}
2019-08-02 13:39:14 +02:00
</div>
</div>
2019-08-02 14:19:08 +02:00
{% endif %}
2019-08-02 13:39:14 +02:00
</div>
2017-12-25 13:38:31 +01:00
{% endblock %}