Explorar o código

Added instance count to DeviceType view

Jeremy Stretch %!s(int64=9) %!d(string=hai) anos
pai
achega
4d40c015e4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      netbox/templates/dcim/devicetype.html

+ 4 - 0
netbox/templates/dcim/devicetype.html

@@ -72,6 +72,10 @@
                         {% endif %}
                     </td>
                 </tr>
+                <tr>
+                    <td>Instances</td>
+                    <td><a href="{% url 'dcim:device_list' %}?device_type_id={{ devicetype.pk }}">{{ devicetype.instances.count }}</a></td>
+                </tr>
             </table>
         </div>
         <div class="panel panel-default">