Files
Netbox-Utilities/netbox_utilities/templates/netbox_utilities/raidgroup.html
T
MrBlakeandClaude Opus 5.5 adbd697c0a feat: add disk management tab for servers, NAS, SAN and MSA devices
Devices whose role is one of disk_device_roles (default Server, NAS, SAN,
MSA) get a "Datenträger" tab with slot layout, disks, RAID groups,
warranty and age warnings, replacement history, CSV import, REST API and
GraphQL.

- First-visit wizard for slot count, rows, first slot number, numbering
  and form factor; layouts can be saved as device type templates and
  applied with one click.
- Slot grid drawn like the device front, coloured by status, with
  warning icons; free slots open a pre-filled disk form.
- Bulk fill of selected slots with shared attributes and one serial per
  line (barcode scanner friendly), with live count and duplicate checks.
- Sizes in vendor notation (960 GB, 4 TB, 1,92 TB, 2 TiB); the tenant is
  always taken from the device and follows tenant changes.
- RAID groups (RAID 0/1/5/6/10/50/60, RAID-Z1/Z2/Z3, JBOD) with hot
  spares, usable capacity, tolerated failures and degraded state.
- "Ersetzen" marks a disk as removed and opens the successor form;
  removed disks stay as per-slot history.
- Warnings for failed disks, expired or expiring warranties and disks
  older than disk_age_warning_years.
- Global disk list with filters, export, global search by serial,
  optional device list column, CSV import, REST API and GraphQL.
- New settings: disks_enabled, disk_device_roles,
  disk_age_warning_years, disk_warranty_warning_days.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:01:56 +02:00

56 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'generic/object.html' %}
{% load helpers %}
{% load render_table from django_tables2 %}
{% block breadcrumbs %}
{{ block.super }}
<li class="breadcrumb-item"><a href="{% url 'dcim:device_disks' pk=object.device_id %}">{{ object.device }} – Datenträger</a></li>
{% endblock %}
{% block content %}
<div class="row mb-3">
<div class="col col-12 col-xl-6">
<div class="card">
<h2 class="card-header">RAID-Gruppe</h2>
<table class="table table-hover attr-table">
<tr><th scope="row">Gerät</th><td>{{ object.device|linkify }}</td></tr>
<tr><th scope="row">Name</th><td>{{ object.name }}</td></tr>
<tr><th scope="row">RAID-Level</th><td>{{ object.get_level_display }}{% if object.spans > 1 %} ({{ object.spans }} Spans){% endif %}</td></tr>
<tr><th scope="row">Beschreibung</th><td>{{ object.description|placeholder }}</td></tr>
</table>
</div>
{% include 'inc/panels/tags.html' %}
{% include 'inc/panels/custom_fields.html' %}
</div>
<div class="col col-12 col-xl-6">
<div class="card">
<h2 class="card-header">Kapazität</h2>
<table class="table table-hover attr-table">
<tr><th scope="row">Mitglieder</th><td>{{ object.members|length }}</td></tr>
<tr><th scope="row">Hot-Spares</th><td>{{ object.hot_spares|length }}</td></tr>
<tr>
<th scope="row">Nutzkapazität</th>
<td>{% if capacity_error %}<span class="text-warning">{{ capacity_error }}</span>{% else %}{{ usable_capacity|placeholder }}{% endif %}</td>
</tr>
<tr><th scope="row">Ausfalltoleranz</th><td>{% if tolerated_failures is not None %}{{ tolerated_failures }} Datenträger{% else %}{{ ""|placeholder }}{% endif %}</td></tr>
<tr>
<th scope="row">Zustand</th>
<td>
{% if object.is_degraded %}<span class="badge text-bg-danger">Degradiert</span>
{% elif capacity_error %}<span class="badge text-bg-warning">Unvollständig</span>
{% else %}<span class="badge text-bg-success">OK</span>{% endif %}
</td>
</tr>
</table>
<div class="card-footer small text-muted">
Bei unterschiedlich großen Datenträgern rechnet die Kapazität – wie ein RAID-Controller – mit dem kleinsten Mitglied.
</div>
</div>
</div>
</div>
<div class="card">
<h2 class="card-header">Datenträger</h2>
<div class="table-responsive">{% render_table members_table 'inc/table.html' %}</div>
</div>
{% endblock content %}