1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Expanded inventory function to support submodules

This commit is contained in:
Jeremy Stretch
2016-03-28 17:56:00 -04:00
parent 690ad29ab8
commit 07952babe8
4 changed files with 39 additions and 24 deletions

View File

@@ -51,12 +51,19 @@
</tr>
</thead>
<tbody>
{% for module in modules %}
{% for m in modules %}
<tr>
<td>{{ module.name }}</td>
<td>{{ module.part_id }}</td>
<td>{{ module.serial }}</td>
<td>{{ m.name }}</td>
<td>{{ m.part_id }}</td>
<td>{{ m.serial }}</td>
</tr>
{% for m2 in m.submodules.all %}
<tr>
<td style="padding-left: 20px">{{ m2.name }}</td>
<td>{{ m2.part_id }}</td>
<td>{{ m2.serial }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>