diff --git a/docs/models/extras/imageattachment.md b/docs/models/extras/imageattachment.md new file mode 100644 index 000000000..da15462ab --- /dev/null +++ b/docs/models/extras/imageattachment.md @@ -0,0 +1,3 @@ +# Image Attachments + +Certain objects in NetBox support the attachment of uploaded images. These will be saved to the NetBox server and made available whenever the object is viewed. diff --git a/docs/release-notes/version-2.8.md b/docs/release-notes/version-2.8.md index d3f566e59..fb5e8277f 100644 --- a/docs/release-notes/version-2.8.md +++ b/docs/release-notes/version-2.8.md @@ -1,5 +1,14 @@ # NetBox v2.8 +## v2.8.9 (FUTURE) + +### Bug Fixes + +* [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments +* [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status + +--- + ## v2.8.8 (2020-07-21) ### Enhancements diff --git a/netbox/dcim/models/__init__.py b/netbox/dcim/models/__init__.py index 787b3bd55..7fb6d3a4b 100644 --- a/netbox/dcim/models/__init__.py +++ b/netbox/dcim/models/__init__.py @@ -260,8 +260,10 @@ class Site(ChangeLoggedModel, CustomFieldModel): ] STATUS_CLASS_MAP = { - SiteStatusChoices.STATUS_ACTIVE: 'success', SiteStatusChoices.STATUS_PLANNED: 'info', + SiteStatusChoices.STATUS_STAGING: 'primary', + SiteStatusChoices.STATUS_ACTIVE: 'success', + SiteStatusChoices.STATUS_DECOMMISSIONING: 'warning', SiteStatusChoices.STATUS_RETIRED: 'danger', } diff --git a/netbox/utilities/templatetags/buttons.py b/netbox/utilities/templatetags/buttons.py index da40ce9d5..e7f00cacf 100644 --- a/netbox/utilities/templatetags/buttons.py +++ b/netbox/utilities/templatetags/buttons.py @@ -27,12 +27,12 @@ def _get_viewname(instance, action): @register.inclusion_tag('buttons/clone.html') def clone_button(instance): - viewname = _get_viewname(instance, 'add') + url = reverse(_get_viewname(instance, 'add')) # Populate cloned field values param_string = prepare_cloned_fields(instance) if param_string: - url = '{}?{}'.format(reverse(viewname), param_string) + url = f'{url}?{param_string}' return { 'url': url,