Parcourir la source

Fixes #1542: Added cluster field to device view

Jeremy Stretch il y a 7 ans
Parent
commit
e2b2815545
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      netbox/templates/dcim/device.html

+ 12 - 0
netbox/templates/dcim/device.html

@@ -155,6 +155,18 @@
                         {% endif %}
                         {% endif %}
                     </td>
                     </td>
                 </tr>
                 </tr>
+                {% if device.cluster %}
+                    <tr>
+                        <td>Cluster</td>
+                        <td>
+                            {% if device.cluster.group %}
+                                <a href="{{ device.cluster.group.get_absolute_url }}">{{ device.cluster.group }}</a>
+                                <i class="fa fa-angle-right"></i>
+                            {% endif %}
+                            <a href="{{ device.cluster.get_absolute_url }}">{{ device.cluster }}</a>
+                        </td>
+                    </tr>
+                {% endif %}
             </table>
             </table>
         </div>
         </div>
         {% with device.get_custom_fields as custom_fields %}
         {% with device.get_custom_fields as custom_fields %}