{% if devicetype.comments %}
{{ devicetype.comments|gfm }}
{% else %}
diff --git a/netbox/templates/dcim/inc/interface.html b/netbox/templates/dcim/inc/interface.html
index f169d2e28..f976d7f85 100644
--- a/netbox/templates/dcim/inc/interface.html
+++ b/netbox/templates/dcim/inc/interface.html
@@ -1,3 +1,4 @@
+{% load helpers %}
{# Checkbox #}
@@ -13,17 +14,32 @@
{{ iface }}
+ {% if iface.mac_address %}
+
{{ iface.mac_address }}
+ {% endif %}
{# LAG #}
{% if iface.lag %}
- {{ iface.lag }}
+ {{ iface.lag }}
{% endif %}
|
- {# Description #}
- {{ iface.description|default:"—" }} |
+ {# Description/tags #}
+
+ {% if iface.description %}
+ {{ iface.description }}
+ {% endif %}
+ {% for tag in iface.tags.all %}
+ {% tag tag %}
+ {% empty %}
+ {% if not iface.description %}—{% endif %}
+ {% endfor %}
+ |
+
+ {# MTU #}
+ {{ iface.mtu|default:"—" }} |
{# 802.1Q mode #}
{{ iface.get_mode_display|default:"—" }} |
@@ -44,7 +60,13 @@
{% if iface.is_lag %}
LAG interface
- {{ iface.member_interfaces.all|join:", "|default:"No members" }}
+
+ {% for member in iface.member_interfaces.all %}
+ {{ member }}{% if not forloop.last %}, {% endif %}
+ {% empty %}
+ No members
+ {% endfor %}
+
|
{% elif iface.is_virtual %}
Virtual interface |
@@ -138,7 +160,7 @@
{% endif %}
{# IP addresses table #}
-
+ |
diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html
index f78fb9503..84074b668 100644
--- a/netbox/templates/dcim/rack.html
+++ b/netbox/templates/dcim/rack.html
@@ -182,7 +182,7 @@
Comments
-
+
{% if rack.comments %}
{{ rack.comments|gfm }}
{% else %}
diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html
index 1b35b0db9..0407b67f6 100644
--- a/netbox/templates/dcim/site.html
+++ b/netbox/templates/dcim/site.html
@@ -200,7 +200,7 @@
Comments
-
+
{% if site.comments %}
{{ site.comments|gfm }}
{% else %}
diff --git a/netbox/templates/extras/configcontext_list.html b/netbox/templates/extras/configcontext_list.html
index c35ba76ff..16a1dc220 100644
--- a/netbox/templates/extras/configcontext_list.html
+++ b/netbox/templates/extras/configcontext_list.html
@@ -10,7 +10,7 @@
{% block title %}Config Contexts{% endblock %}
- {% include 'utilities/obj_table.html' with bulk_delete_url='extras:configcontext_bulk_delete' %}
+ {% include 'utilities/obj_table.html' with bulk_edit_url='extras:configcontext_bulk_edit' bulk_delete_url='extras:configcontext_bulk_delete' %}
{% include 'inc/search_panel.html' %}
diff --git a/netbox/templates/extras/tag.html b/netbox/templates/extras/tag.html
new file mode 100644
index 000000000..aceb0ca94
--- /dev/null
+++ b/netbox/templates/extras/tag.html
@@ -0,0 +1,69 @@
+{% extends '_base.html' %}
+{% load helpers %}
+
+{% block header %}
+
+
+ {% block title %}Tag: {{ tag }}{% endblock %}
+{% endblock %}
+
+{% block content %}
+
+
+
+
+ Tag
+
+
+
+ Name |
+
+ {{ tag.name }}
+ |
+
+
+ Slug |
+
+ {{ tag.slug }}
+ |
+
+
+ Tagged Items |
+
+ {{ items_count }}
+ |
+
+
+
+
+
+ {% include 'panel_table.html' with table=items_table heading='Tagged Objects' %}
+
+
+{% endblock %}
diff --git a/netbox/templates/extras/tag_list.html b/netbox/templates/extras/tag_list.html
index 3136991a0..8178e5538 100644
--- a/netbox/templates/extras/tag_list.html
+++ b/netbox/templates/extras/tag_list.html
@@ -4,8 +4,11 @@
{% block content %}
{% block title %}Tags{% endblock %}
-
+
{% include 'utilities/obj_table.html' with bulk_delete_url='extras:tag_bulk_delete' %}
+
+ {% include 'inc/search_panel.html' %}
+
{% endblock %}
diff --git a/netbox/templates/tenancy/tenant.html b/netbox/templates/tenancy/tenant.html
index 67f3c72fe..91d3ce986 100644
--- a/netbox/templates/tenancy/tenant.html
+++ b/netbox/templates/tenancy/tenant.html
@@ -81,7 +81,7 @@
Comments
-
+
{% if tenant.comments %}
{{ tenant.comments|gfm }}
{% else %}
diff --git a/netbox/templates/virtualization/cluster.html b/netbox/templates/virtualization/cluster.html
index 69ed4e212..d3606e624 100644
--- a/netbox/templates/virtualization/cluster.html
+++ b/netbox/templates/virtualization/cluster.html
@@ -99,7 +99,7 @@
Comments
-
+
{% if cluster.comments %}
{{ cluster.comments|gfm }}
{% else %}
diff --git a/netbox/templates/virtualization/virtualmachine.html b/netbox/templates/virtualization/virtualmachine.html
index 410ab32e5..1556c5af0 100644
--- a/netbox/templates/virtualization/virtualmachine.html
+++ b/netbox/templates/virtualization/virtualmachine.html
@@ -143,7 +143,7 @@
Comments
-
+
{% if virtualmachine.comments %}
{{ virtualmachine.comments|gfm }}
{% else %}
diff --git a/netbox/virtualization/api/serializers.py b/netbox/virtualization/api/serializers.py
index 1f2b957fc..1b06dab3b 100644
--- a/netbox/virtualization/api/serializers.py
+++ b/netbox/virtualization/api/serializers.py
@@ -52,7 +52,7 @@ class ClusterSerializer(TaggitSerializer, CustomFieldModelSerializer):
class VirtualMachineSerializer(TaggitSerializer, CustomFieldModelSerializer):
status = ChoiceField(choices=VM_STATUS_CHOICES, required=False)
site = NestedSiteSerializer(read_only=True)
- cluster = NestedClusterSerializer(required=False, allow_null=True)
+ cluster = NestedClusterSerializer()
role = NestedDeviceRoleSerializer(required=False, allow_null=True)
tenant = NestedTenantSerializer(required=False, allow_null=True)
platform = NestedPlatformSerializer(required=False, allow_null=True)
diff --git a/netbox/virtualization/tests/test_api.py b/netbox/virtualization/tests/test_api.py
index 4c03dddc5..ca66f1d2f 100644
--- a/netbox/virtualization/tests/test_api.py
+++ b/netbox/virtualization/tests/test_api.py
@@ -378,6 +378,18 @@ class VirtualMachineTest(APITestCase):
self.assertEqual(virtualmachine4.name, data['name'])
self.assertEqual(virtualmachine4.cluster.pk, data['cluster'])
+ def test_create_virtualmachine_without_cluster(self):
+
+ data = {
+ 'name': 'Test Virtual Machine 4',
+ }
+
+ url = reverse('virtualization-api:virtualmachine-list')
+ response = self.client.post(url, data, format='json', **self.header)
+
+ self.assertHttpStatus(response, status.HTTP_400_BAD_REQUEST)
+ self.assertEqual(VirtualMachine.objects.count(), 3)
+
def test_create_virtualmachine_bulk(self):
data = [
|