mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 19:19:22 -06:00
Merge branch 'develop' into veit/fix-3964
This commit is contained in:
commit
a7a166a9cb
@ -10,6 +10,10 @@
|
|||||||
* [#3721](https://github.com/netbox-community/netbox/issues/3721) - Allow Unicode characters in tag slugs
|
* [#3721](https://github.com/netbox-community/netbox/issues/3721) - Allow Unicode characters in tag slugs
|
||||||
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
||||||
* [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices
|
* [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices
|
||||||
|
* [#3960](https://github.com/netbox-community/netbox/issues/3960) - Fix legacy device status choice
|
||||||
|
* [#3962](https://github.com/netbox-community/netbox/issues/3962) - Fix display of unnamed devices in rack elevations
|
||||||
|
* [#3963](https://github.com/netbox-community/netbox/issues/3963) - Restore tooltip for devices in rack elevations
|
||||||
|
* [#3967](https://github.com/netbox-community/netbox/issues/3967) - Resolve migration of "other" interface type
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ pages:
|
|||||||
- 4. LDAP (Optional): 'installation/4-ldap.md'
|
- 4. LDAP (Optional): 'installation/4-ldap.md'
|
||||||
- Upgrading NetBox: 'installation/upgrading.md'
|
- Upgrading NetBox: 'installation/upgrading.md'
|
||||||
- Migrating to Python3: 'installation/migrating-to-python3.md'
|
- Migrating to Python3: 'installation/migrating-to-python3.md'
|
||||||
|
- Migrating to systemd: 'installation/migrating-to-systemd.md'
|
||||||
- Configuration:
|
- Configuration:
|
||||||
- Configuring NetBox: 'configuration/index.md'
|
- Configuring NetBox: 'configuration/index.md'
|
||||||
- Required Settings: 'configuration/required-settings.md'
|
- Required Settings: 'configuration/required-settings.md'
|
||||||
|
@ -802,6 +802,7 @@ class InterfaceTypeChoices(ChoiceSet):
|
|||||||
TYPE_SUMMITSTACK128: 5310,
|
TYPE_SUMMITSTACK128: 5310,
|
||||||
TYPE_SUMMITSTACK256: 5320,
|
TYPE_SUMMITSTACK256: 5320,
|
||||||
TYPE_SUMMITSTACK512: 5330,
|
TYPE_SUMMITSTACK512: 5330,
|
||||||
|
TYPE_OTHER: 32767,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
20
netbox/dcim/migrations/0091_interface_type_other.py
Normal file
20
netbox/dcim/migrations/0091_interface_type_other.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def interface_type_to_slug(apps, schema_editor):
|
||||||
|
Interface = apps.get_model('dcim', 'Interface')
|
||||||
|
Interface.objects.filter(type=32767).update(type='other')
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0090_cable_termination_models'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
# Missed type "other" in the initial migration (see #3967)
|
||||||
|
migrations.RunPython(
|
||||||
|
code=interface_type_to_slug
|
||||||
|
),
|
||||||
|
]
|
@ -395,14 +395,23 @@ class RackElevationHelperMixin:
|
|||||||
fill='black'
|
fill='black'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
link.set_desc('{} — {} ({}U) {} {}'.format(
|
||||||
|
device.device_role, device.device_type.display_name,
|
||||||
|
device.device_type.u_height, device.asset_tag or '', device.serial or ''
|
||||||
|
))
|
||||||
link.add(drawing.rect(start, end, style='fill: #{}'.format(color), class_='slot'))
|
link.add(drawing.rect(start, end, style='fill: #{}'.format(color), class_='slot'))
|
||||||
hex_color = '#{}'.format(foreground_color(color))
|
hex_color = '#{}'.format(foreground_color(color))
|
||||||
link.add(drawing.text(device.name, insert=text, fill=hex_color))
|
link.add(drawing.text(str(device), insert=text, fill=hex_color))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _draw_device_rear(drawing, device, start, end, text):
|
def _draw_device_rear(drawing, device, start, end, text):
|
||||||
drawing.add(drawing.rect(start, end, class_="blocked"))
|
rect = drawing.rect(start, end, class_="blocked")
|
||||||
drawing.add(drawing.text(device.name, insert=text))
|
rect.set_desc('{} — {} ({}U) {} {}'.format(
|
||||||
|
device.device_role, device.device_type.display_name,
|
||||||
|
device.device_type.u_height, device.asset_tag or '', device.serial or ''
|
||||||
|
))
|
||||||
|
drawing.add(rect)
|
||||||
|
drawing.add(drawing.text(str(device), insert=text))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _draw_empty(drawing, rack, start, end, text, id_, face_id, class_):
|
def _draw_empty(drawing, rack, start, end, text, id_, face_id, class_):
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.dcim.napalm_read %}
|
{% if perms.dcim.napalm_read %}
|
||||||
{% if device.status != 1 %}
|
{% if device.status != 'active' %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
||||||
{% elif not device.platform %}
|
{% elif not device.platform %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %}
|
||||||
|
Loading…
Reference in New Issue
Block a user